Comments
On pkhaustovCodeforces Round #152, 13 years ago
+5

The CF system doesn't support "%lld" specification. Please use "%I64d", instead. BTW, the pow() function may return unexpected value. For the integer problem, you shouldn't use the function for float and double (, like pow()). pow(10, 4) returns 9999. Please make sure with custom test.

On pkhaustovCodeforces Round #152, 13 years ago
+22

No, you are. The situation you and Zero_sharp are discussing may be below.

On pkhaustovCodeforces Round #152, 13 years ago
0

Hmm.. I found no problem. The answer is not limited by r.

On pkhaustovCodeforces Round #152, 13 years ago
0

The answer must lie in the range 0 < x < xb = 4. What is the problem?

On pkhaustovCodeforces Round #152, 13 years ago
0

Though I haven't analyzed your code, but I expect that the failure in test 7 may happen in the case you consider the ball as a point when it is reflected on the wall.

On pkhaustovCodeforces Round #152, 13 years ago
0

I think the problem is the precision of pow(). pow(10,2) returns 99 in CF system, though pow(10,2) returns 100 in your local machine. (99+20 = 119 = 7*17, then your method return 119) This is because the pow() function is only for float and double, not integer.

0

I was wondering how to make sure that the total beauty is different from other combinations. Now it's clear. Thank you very much!

+4

What is the main idea of problem C? Though I could managed to make it accepted by randomized algorithm(2616018), but I think it's not beautiful...

On ir5Codeforces Beta Round #71, 15 years ago
0
Problem D and E are very, very difficult for me!
I could find no clue to solve...
I'm waiting for editorials.