I decided to split statistics for both division. Post for first division
will be added later is here.
So, let's look at hacks in Codeforces Round #263 (Div. 2).
Some statistics are missing — I have some problems with downloading all data (Codeforces seems little crowded today). They will be also added later.
Update: Europe went asleep, so I added missing stats.
|Problem||Successful hacks||Unsuccessful hacks||Other||Sum|
|462A - Appleman and Easy Task||5 (17%)||25 (83%)||0 (0%)||30|
|462B - Appleman and Card Game||1193 (71%)||188 (11%)||306 (18%)||1687|
|462C - Appleman and Toastman||0 (0%)||55 (36%)||98 (64%)||153|
|462A - Appleman and Easy Task||00:50:08||ak.bewildered||A__H||110493|
|462B - Appleman and Card Game||00:20:49||Jack_whj||ayushrocker92||110023|
The problem was pretty simple, but still there were some mistakes (there were only 4 successful hacks and over 150 solutions which passed pretests, but didn't pass all tests).
The "killer" tests:
2 oo xx
Some solutions just count the overall number of all neighbouring o's and check if this number is divisible by 2.
This test was just checking maximum value of n, which was 100. Depends on mistake, solutions got Runtime error or Wrong answer (because of checking values for i = 101 and so on).
The main problem for these solutions was using break command in double for. What it did is just break from the inner for, staying in the outer one, which sometimes finished with Wrong answer.
Pretty interesting mistake failing on this case was this one (the code is in C++):
if (a[i][j] = 'o')
Somehow, this solution passed first 10 tests. The problem is that the condition in if in such case is always fulfilled. Why? It is assignment operator, so from this time a[i][j] was equal to 'o', and it was always true. The problem is that a[i][j] might be changed (and we didn't want it).
At first, I was pretty afraid looking at this task (1193 successful hacks!). But the problems were pretty simple. I should say problem, because it was one: long longs!
We just need to notice that result could be even n2, which was about 1010.
Another problem with pretty big numbers is shown below (code written in C++):
long long ans = 0; int n = 100000; ans += n*n; cout << ans;
The result will be
1410065408. Why? The problem is when we are multiplying two ints, the result wants to be int, but it is bigger than 232, so it distorts.
The proper way to solve this problem:
ans += 1LL*n*n;
Now the program knows that the product should be long long and the result is correct (
We would just look at test #19, which was pretty simple:
2 1 2
Most of the hacks (if not all) in div. 1 were based on such testcase. Many people had if in case n = 2 and printed the sum a + a, but we can split this set into two subsets (a) and (a), then give it back to Toastmen and get in the end 2(a + a).
There was no hacks for this problem, but there was one mistake. The problem is with proper using of modulo. In such case:
x = a%MOD + b%MOD
sometimes x can be grater than MOD (for example for a=6, b=7 and MOD=4), so we should use:
x = (a%MOD + b%MOD)%MOD
Again, there was not a single hack, but still there were some solutions which passed pretests, but didn't pass test #13. Unfortunately, we cannot look at it, because it is too big.
Most of these solutions were just brute-force approach. Pretests weren't too hard to pass.
|63||21||IMAN_GH , bolyeria , xiaxiaosheng , TimeMachine |
|66||20||nenu_x1p , rishi_saraswat , shobhit6993 |
|98||19||SameerGulati , hamedArafa , Kouichi |
|23||19||loujunjie , vijayarsenal10 , cainiao_tooweak , the_redback , jokkebk |
|93||17||I_Love_Balabala , VeniVidiVici , ultimatemaster |
|84||17||hball1st , purple_jwl |
|80||17||NiceDay , korun , nxphuc |
|38||17||lamnguyen.rs , 53645 , jnalanko |
|28||17||DemoVersion , tap628LJ |
|90||16||stupida , round_0 |
|33||16||chinesejiang , osama |
|29||16||cup_of_tea , Morgan_HackProg , ho-jo-bo-ro-lo |
|Country||#hacks / #hackers||Hackers (with at least one successful hack)|
|Iran||8.43||mosiomohsen , IMAN_GH , DemoVersion , pawky , ehsanoo , argooogooly |
|Mongolia||7.50||Enkhsanaa , Nuadra |
|110746||worse ||BlakeGriffin |
|110731||worse ||cosmin |
|110997||worse ||ZOTAC89 |
|110670||worse ||dozycat |
|111249||worse ||mag20174301 |
|110640||worse ||karthikkamal |
|110702||worse ||VKundas |
|110680||worse ||HujanLebat |
|110945||Zoli ||fro11o |
|111341||nguyenchicuong ||YannLuo |
worse is attacking with 9 hacks (and 77 unsuccessful ones).
Successful hacks over time
Pretty boring this time.
Thanks and again: sorry for all my mistakes, feel free to correct me. Previous post can be found here.
I have some other ideas about such stats and reports, so I will try to work on them — look forward to see them in nearby future!