Welcome after the long break in Hack me! (Codeforces Round 277.5 (Div. 2)).
Previous posts can be found here.
Stats
Problem | Successful hacks | Unsuccessful hacks | Other* | Sum | Solutions which can be hacked | Accepted solutions | All solutions on final tests |
---|---|---|---|---|---|---|---|
489A - SwapSort | 11 (28.21%) | 24 (61.54%) | 4 (10.26%) | 39 | 400 (17.22%) | 1923 (82.78%) | 2323 |
489B - BerSU Ball | 185 (61.26%) | 102 (33.77%) | 15 (4.97%) | 302 | 427 (18.09%) | 1934 (81.91%) | 2361 |
489C - Given Length and Sum of Digits... | 8 (11.59%) | 59 (85.51%) | 2 (2.90%) | 69 | 158 (8.90%) | 1618 (91.10%) | 1776 |
489D - Unbearable Controversy of Being | 2 (14.29%) | 6 (42.86%) | 6 (42.86%) | 14 | 38 (4.99%) | 724 (95.01%) | 762 |
489E - Hiking | 0 | 0 | 0 | 0 | 23 (41.07%) | 33 (58.93%) | 56 |
489F - Special Matrices | 21 (55.26%) | 13 (34.21%) | 4 (10.53%) | 38 | 80 (36.87%) | 137 (63.13%) | 217 |
* one of the: INVALID_INPUT, GENERATOR_INCOMPILABLE, GENERATOR_CRASHED, IGNORED, OTHER
Really interesting is fact that the second most hacked problem was the last one, what is not so typical.
Hacks and possible hacks description
489A - SwapSort
In some solutions where people are finding minimum every time, they used the wrong limit for the minimum itself.
For example:
min := -100000000
wskmin := -1 <- where is min
for i in 0,1,...,n-1:
if(min > tab[i])
min = tab[i];
wskmin = i;
was killed by the test:
2
200000000 -200000000
How to deal with it? The first possibility is to set min lower than lower bound of numbers on input (for -200000000 we can choose -200007000 or something similar). Or start with the first element as minimum:
min := tab[0]
wskmin := 0 <- where is min
489B - BerSU Ball
Let's take a look at these submissions: 8725982 and 8731808. The first one was hacked and the second accepted, the only difference is sorting vectors. So the following testcase:
2
2 4
2
3 1
was used to hack the first solution. That was not so rare mistake and such tests were used dozen or so times.
489C - Given Length and Sum of Digits...
Interesting bug (and hard to find) was wrong checking of the condition for solution to exist.
The solution exist if the sum is less or equal than 9*m (from obvious reasons). Some people are forgetting about equal part and the proper test like:
2 18
can kill the nearly good submission.
489D - Unbearable Controversy of Being
The only two hacks for this problem was maximal testcases which resulted in time limit ex.
489E - Hiking
No hacks were used for this problem.
489F - Special Matrices
Nearly all hacks was killing the slow solution with time complexity O(n^3).
Example of such testcase:
500 0 10000007
Fastest hackers
Problem | Time | Hacker | Defender | Hack |
---|---|---|---|---|
489A - SwapSort | 01:17:56 | taxicoo | Amon | 124095 |
489B - BerSU Ball | 00:49:53 | atom_andythomas | Staelth | 124072 |
489C - Given Length and Sum of Digits... | 01:11:20 | whiteshadow1992 | dkat | 124084 |
489D - Unbearable Controversy of Being | 01:56:35 | NVAL | kasitan | 124243 |
489F - Special Matrices | 01:38:42 | xiaoshua | PAP | 124139 |
Best hackers
Hacker | Stats | Successful hacks | Unsuccessful hacks |
---|---|---|---|
Erkin97 | +9-2 (800) | B: 124245 124249 124255 124268 124276 124282 124290 124320 124384 | B: 124300 124398 |
atetubou | +7-1 (650) | B: 124166 F: 124292 124301 124309 124312 124328 124351 | F: 124357 |
mosiomohsen | +6-0 (600) | B: 124155 124170 124173 124176 124226 124353 | |
khandeshb1 | +6-0 (600) | B: 124172 124179 124197 124203 124219 124346 | |
ChronoireSchwarzVI | +6-0 (600) | B: 124104 124121 124123 124128 124145 124182 | |
abhra73 | +6-1 (550) | B: 124073 124074 124075 124079 124097 124100 | C: 124132 |
Best rooms
Room | #hacks | Hackers |
---|---|---|
69 | 11 | khandeshb1 [6], mmatrosov [4], bktl4ever [1] |
92 | 9 | Erkin97 [9] |
50 | 7 | SEFI2 [5], prana [2] |
82 | 7 | Azret [5], rtheman [1], _PeTruS_ [1] |
84 | 7 | ChronoireSchwarzVI [6], fiter [1] |
1010 | 7 | atetubou [7] |
35 | 6 | abhra73 [6] |
66 | 6 | Guts [5], hatsuyuki15 [1] |
70 | 6 | mosiomohsen [6] |
Best countries
Country | #hacks | Hackers |
---|---|---|
India | 26 | abhra73 [6], khandeshb1 [6], atulshgl [4], bernett [2], girish347 [2], ramprakash_k [1], StoneCold_ [1], vishwacs111 [1], rtheman [1], gorv [1], sensiblemadman [1] |
Japan | 25 | atetubou [7], ChronoireSchwarzVI [6], anta [4], zerokugi [3], yuusti [2], zeosutt [2], kmjp [1] |
Russia | 18 | knst [4], mmatrosov [4], kharvd [3], lunawyll [2], danildudin [2], w0w [2], NVAL [1] |
Kyrgyzstan | 16 | Erkin97 [9], Azret [5], tokonuuLu [2] |
Egypt | 12 | Guts [5], mohamednabil00000 [3], Mohammad_Yasser [1], khaledA [1], Killever [1], xa.mohsen [1] |
Iran | 11 | mosiomohsen [6], ashkan_d13 [2], Majid [2], Batman [1] |
Ukraine | 9 | kit9ra [3], vlad8 [2], BigBag [2], aangairbender [1], fiter [1] |
Colombia | 9 | pin3da [4], alan_navarro [3], mavd09 [2] |
Uzbekistan | 8 | Eldor_Zoirov [4], Yura_Sultonov [2], Sirojiddin [1], Shavkat_Aminov [1] |
Bangladesh | 8 | the_redback [4], sahedsohel [3], ImagineWarrior [1] |
Thanks for making this analysis!
In graph for problem B I can't see colors, black border is too big.
UPD. Also, in problem B links to submissions are not relative
Thanks
Solved.
Now they should be, I didn't know that it can be a problem — sorry.