# UVa Online Judge

## UVa Online Judge New Platform

We at MathBlog have written about a couple of problems from the UVa Online Judge. The current UVa OJ platform is almost 7 years old, and so the UVa OJ team thinks it’s time for an upgrade. They intend to build the platform up from scratch, but to do that, they need funding. Therefore, they’ve set up a campaign, located here, where you can donate and help fund the project. Note that MathBlog is not affiliated with UVa Online Judge in any way.

There are 6 days left of the campaign, so we encourage you to let others know, and perhaps even donate yourself.

Again, here is the campaign, and here is the main UVa OJ website.

Posted by Bjarki Ágúst in UVa Online Judge, 1 comment

## UVa 102: Ecological Bin Packing

We’re back to doing another simple UVa Online Judge problem, and this time we take on problem 102, Ecological Bin Packing. In the problem we are asked to solve a bin packing problem about recycling glass. It can be easily solved with brute force, but requires careful coding. Enough yapping, let’s take a look at the problem description.

## Interpretation

We have three bins, each of which contains some number of bottles. There are three types of bottles; brown, green and clear, denoted by “B”, “G” and “C”, respectively. We are given how many  bottles of each type are in each bin. Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 2 comments

## UVa 10055: Hashmat the brave warrior

In problem 10055 at the UVa online judge, we are asked to help Hashmat the brave warrior to decide whether he should fight against his opponents. We do that by calculating the difference between the number of Hashmat’s soldiers and the number of his opponent’s soldiers. Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 18 comments

## UVa 530: Binomial Showdown

Problem 530 at the UVa Online Judge, also known as Binomial Showdown, asks us to compute the number of ways one can choose elements out of elements, not taking order into account. The problem is a classical one ( choose , anyone?), but with a twist. The input numbers are big, and we need to be really careful not to overflow integers in our intermediate computations. We discover a formula that has smaller intermediate values than the direct formula, and with one more small observation, we’re done. Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 3 comments

## UVa 10268: 498-bis

Problem 10268 at the UVa Online Judge, 498′, asks us to evaluate the derivative of a polynomial. It is, like the name suggests, a version of problem 498, which we’ve already covered here. We solved problem 498 with code reuse in mind. We created a Polynomial class which we can extend to solve this problem. Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 0 comments

## UVa 498: Polly the Polynomial

In Problem 498 at UVa Online Judge, Polly the Polynomial, we are asked to evaluate a polynomial. The problem is easier that usual, but its designed to help engineers remember the basic algebra skills, which they supposedly forget as they progress further in their studies. Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 0 comments

## UVa 10127: Ones

Problem 10127 at UVa Online Judge, Ones, is a neat little problem. We are given an integer and are asked to find its smallest multiple that consists only of ones. More specifically, we are asked for the number of ones in that multiple.

## Interpretation

We are given an integer that is neither divisible by nor . We have to find the smallest multiple of that consists entirely of ones. For example, when , is the smallest multiple of that consists only of ones. For this problem, we only need the digit count of that multiple, which in the case of is (because  has digits). Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 4 comments

## UVa 10229: Modular Fibonacci

In problem 10229 at UVa Online Judge, Modular Fibonacci, our task is to calculate huge Fibonacci numbers, modulo some given integer. Continue reading →

Posted by Bjarki Ágúst in UVa Online Judge, 3 comments

## The new kid on the blog

As you (of course) must have noticed, not all of the posts are written by me anymore. I have gotten a new guy on board in order to serve you even more goodies than I my self was able to. So I would like to formally welcome Bjarki on board on the blog and hope that you will all receive his contributions well and learn a lot from them. I know I do.

Bjarki aka Suprdewd have been hanging around the blog for quite a while now giving me some very useful sparring on problems as well as encouraging me to continue writing even through periods where time or interest was missing. I am grateful for that.

As a start (and as you have noticed) Bjarki will cover some of the problems posed by UVA online judge. It is problems which are a bit more algorithmic than most of the Project Euler problems. But just as fun non-the-less. These problems will be covered in Java, at least as a start since that is one of the accepted languages on the site.

We have lots of ideas for new topics and actions on the site that we want to implement and develop, so I think that we will all go into an exciting time and hope you will enjoy it.

So once again, welcome Bjarki. I am really looking forward to this.

Posted by Kristian in Other, 2 comments