### aram90's blog

By aram90, 9 years ago,

CodeFights just went out of beta and the biggest change is that there are 3 new languages supported — C++, Python and Java (previously tasks were only in JS). My favorite feature is solving challenges where most people seem to compete for getting shortest source code to given task (tasks are mostly easy so main challenge is usually solving it with a shortest code among all solvers). One issue I see is that Python solutions have big advantage since they are very short, also it is pretty annoying to see people copy-pasting solutions from each other, hopefully it will be given some solution soon.

By the way, users who perform good enough can post challenges themselves, would love to see new ones!

• +62

By aram90, 12 years ago,

I have noticed that during Codeforces standard rounds some people are trying to solve the high-point problems before easier tasks to gain a better score, because points of hard problems decrease faster during time. At first glance it may seem that if in the total you can solve the hard problem, then it may be better to start from it, but it is not always so. For example let's see example on 500 and 1000 point problems. We know that for 500 point problem the decrease speed is 2 points/min, and for 1000 point problem it is 4 points/min. If we consider that they both can be solved in 10 minutes, then we get this total score for them:

Case 1) Solving 500, then 1000: (500 — 10 * 2) + (1000 — 20 * 4) = 480 + 920 = 1400

Case 2) Solving 1000, then 500: (1000 — 10 * 4) + (500 — 20 * 2) = 960 + 460 = 1420

So in that case it is possible to get extra 20 points by choosing right order.

Now let's assume that solving 1000 point problem takes more time than 500, because it is more natural, let's raise that time up to 20 minutes.

Case 1) Solving 500, then 1000: (500 — 10 * 2) + (1000 — 30 * 4) = 480 + 880 = 1360

Case 2) Solving 1000, then 500: (1000 — 20 * 4) + (500 — 30 * 2) = 920 + 440 = 1360

So — in this case there is no difference between choosing one order or another. And if we increase the time for solving 1000 point problem, so that it will become more than two times greater than time necessary for solving 500 point problem, we can figure out that in that case it is better to solve the 500 point at first.

But anyway, this is not a thing to worry about much during contest, it is better to concentrate on solving tasks rather than choosing right order of solving.

• +38

By aram90, 12 years ago,

I have found a little trick recently that can help you to grab not big tests when solving tasks from problemset. A lot of people were complaining that when showing the test on which program gives a wrong answer, only some part of it is shown, so that complete test case couldn't be seen. If test case contains for example 100 lines, but system displays only first 20 lines of input, as well as 20 lines of the standard output of the program, then such strategy could be used: we add a check in the program — if the certain test case is given, it outputs lines 21 — 40 of the input file. In the next submission — output 41 — 60 lines, etc. So you can grab the input file part by part if it is not too big. Or if it is too big, you can just add the same check for certain input file, and use the output for debugging info (for example, output minimum from the numbers given, etc.). This method just helped me to find the bug in the program on which I got stuck about 3 hours.

• +22