Блог пользователя kostka

Автор kostka, 10 лет назад, По-английски

Welcome again!

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.

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

Fastest hackers

Problem Time Hacker Defender Hack
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

Remarks

462A - Appleman and Easy Task

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).

462B - Appleman and Card Game

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 (10000000000).

462C - Appleman and Toastman

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[0] + a[1], but we can split this set into two subsets (a[0]) and (a[1]), then give it back to Toastmen and get in the end 2(a[0] + a[1]).

462D - Appleman and Tree

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

462E - Appleman and a Sheet of Paper

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.

Best hackers

Hacker Stats Successful hacks Unsuccessful hacks
hetanglianyi +19-0 B: 111129 111156 111193 111223 111235 111248 111277 111293 111310 111328 111353 111373 111399 111438 111777 111810 111826 111838 111854
mosiomohsen +19-1 B: 110070 110108 110115 110134 110141 110151 110173 110182 110189 110206 110439 110553 110868 110919 110947 111089 111119 111619 111844 B: 110156
nenu_x1p +17-3 B: 110497 110517 110540 110558 110571 110590 110610 110613 110628 110639 110649 111046 111092 111108 111133 111178 111218 B: 110113 111062 111243
SameerGulati +15-2
B: 110061 110067 110092 110097 110125 110130 110166 110228 110373 110382 110393 110475 110488 110855 111347
A: 110342
B: 110790
user:dcms2,2014-08-26] +13-0 B: 110765 110795 110815 110845 110860 110880 110940 110980 110991 111179 111483 111495 111882
cup_of_tea +13-0 B: 110177 110186 110190 110200 110202 110209 110212 110221 110231 110388 110399 110410 111797
chinesejiang +13-0 B: 110480 110545 110601 110653 110705 110771 110794 110819 110844 110875 110903 111044 111635
1e9 +13-0 B: 110239 110247 110274 110283 110287 110294 110316 110326 110606 111086 111124 111509 111818

Best rooms

Room #hacks Hackers
63 21 IMAN_GH [13], bolyeria [6], xiaxiaosheng [1], TimeMachine [1]
66 20 nenu_x1p [17], rishi_saraswat [2], shobhit6993 [1]
98 19 SameerGulati [15], hamedArafa [3], Kouichi [1]
97 19 mosiomohsen [19]
46 19 hetanglianyi [19]
23 19 loujunjie [10], vijayarsenal10 [5], cainiao_tooweak [2], the_redback [1], jokkebk [1]
93 17 I_Love_Balabala [9], VeniVidiVici [7], ultimatemaster [1]
84 17 hball1st [11], purple_jwl [6]
80 17 NiceDay [10], korun [6], nxphuc [1]
38 17 lamnguyen.rs [12], 53645 [4], jnalanko [1]
28 17 DemoVersion [11], tap628LJ [6]
90 16 stupida [13], round_0 [3]
33 16 chinesejiang [13], osama [3]
29 16 cup_of_tea [13], Morgan_HackProg [2], ho-jo-bo-ro-lo [1]

Countries

Country #hacks Hackers (with more than one successful hack)
China 233 hetanglianyi [19], stupida [13], chinesejiang [13], Jack_whj [13], loujunjie [10], fzyz999 [10], NoSoul [10], ohweonfire [10], wandering [9], suliang [9], aswmtjdsj [9], I_Love_Balabala [9], dnkaito [8], catfish [7], wwunxc959 [7], 545529689 [7], 31201153 [7], korun [6], kojimai [6], bolyeria [6], learningmou [5], tsxhl111 [4], Naturain [4], fswuweis [4], sucan [3], akxxsb [3], LuxakyLuee [3], worfzyq [2], squee_spoon [2], qingping95 [2], dnvtmf [2], zjbztianya [2]
India 145 SameerGulati [15], xennygrimmato [11], const_int_magic [11], tussharsingh13 [10], aditya_kakarot [8], tarang1610 [7], rarora7777 [7], codeDREAMER [6], agamgupta_79 [6], shubh09 [5], abhra73 [5], MysticAndSevere [5], shiva_r31 [4], kuldeepfouzdar [4], warlock [3], radhey_maa [3], prakhar3agrwal [3], kunal361 [3], Cellar_Door [3], shank_punk [2], mayank_kumar [2], rishi_saraswat [2], vidyut_7 [2], StoneCold_ [2]
Russia 108 mr_justadog [12], hball1st [11], NiceDay [10], worse [9], nikiror [9], Miracle [9], watson [8], nic11 [7], redjohn [7], knst [5], knok16 [5], MakArt [4], arturom [3], veschii_nevstrui [2], poma.prs [2], _ant_ant [2]
Bangladesh 65 nightfury1204 [12], underSpirit [11], faisal47 [7], bertho_coder [7], Mukit09 [7], md.alam [5], mahbubcseju [4], .PEIN. [4], mochow [2], gaurab_sust [2], nighthowler [2]
Iran 59 mosiomohsen [19], IMAN_GH [13], DemoVersion [11], pawky [9], ehsanoo [5], argooogooly [2]
Japan 35 isurugieri [11], tomoki [10], kmatsunaga [7], purple_jwl [6]
Egypt 35 Mohammad_Yasser [10], Killever [7], abdou_93 [6], NourElRashidy [4], osama [3], hamedArafa [3]
Country #hacks / #hackers Hackers (with at least one successful hack)
France 13.00 cup_of_tea [13]
Brazil 13.00 dcms2 [13]
Bolivia 11.00 DrPaulVazo [11]
Iran 8.43 mosiomohsen [19], IMAN_GH [13], DemoVersion [11], pawky [9], ehsanoo [5], argooogooly [2]
Macedonia 8.00 add1ctus [8]
Mongolia 7.50 Enkhsanaa [11], Nuadra [4]

Biggest gap

Hack Hacker Defender
110746 worse [153] BlakeGriffin [1596]
110731 worse [153] cosmin [1453]
110997 worse [153] ZOTAC89 [1399]
110670 worse [153] dozycat [1357]
111249 worse [153] mag20174301 [1313]
110640 worse [153] karthikkamal [1232]
110702 worse [153] VKundas [1159]
110680 worse [153] HujanLebat [1058]
110945 Zoli [1134] fro11o [1598]
111341 nguyenchicuong [1202] YannLuo [1609]

worse is attacking with 9 hacks (and 77 unsuccessful ones).

Charts

Here should be graph.

Successful hacks over time

Pretty boring this time.

Here should be graph.

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!

  • Проголосовать: нравится
  • +113
  • Проголосовать: не нравится

»
10 лет назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Always wanted to see this kind of analysis, very interesting to know what can be the principals wrong algorithms or bugs. Thanks a lot, I hope we'll see similar analysis with next contests.

»
10 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Thanks to these I'm now in div 1 :D

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

You are soooo good at this, DO THIS FOR EVERY CONTEST! :D

»
10 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

I'm sure that after several of this post in the future, simple mistakes like integer overflow in Div.2 will reduce A LOT :D

And we will see how worse can push his rating down to ........ negative!?

EDIT: worse has achieved negative rating! May I say "congratulations" to him? :D

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Good job! I have learned a lot from this analysis. And I will care more details when I am programing!

»
10 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Do this for every contest, I wish your contribution would be higher than DmitriyH