kostka's blog

By kostka, 10 years ago, In English

Hello and welcome in Codeforces Round 279 (Div. 2) — description of hacks.

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
490A - Team Olympiad 13 (27.66%) 22 (46.81%) 12 (25.53%) 47 80 (3.55%) 2174 (96.45%) 2254
490B - Queue 9 (15.79%) 21 (36.84%) 27 (47.37%) 57 268 (20.12%) 1064 (79.88%) 1332
490C - Hacking Cypher 218 (52.40%) 102 (24.52%) 96 (23.08%) 416 376 (42.11%) 517 (57.89%) 893
490D - Chocolate 15 (60.00%) 9 (36.00%) 1 (4.00%) 25 172 (39.27%) 266 (60.73%) 438
490E - Restoring Increasing Sequence 0 (0.00%) 1 (100.00%) 0 (0.00%) 1 68 (33.33%) 136 (66.67%) 204
490F - Treeland Tour 5 (71.43%) 2 (28.57%) 0 (0.00%) 7 30 (40.54%) 44 (59.46%) 74

* one of the: INVALID_INPUT, GENERATOR_INCOMPILABLE, GENERATOR_CRASHED, IGNORED, OTHER

Here should be graph.
Here should be graph.

Hacks and possible hacks description

490A - Team Olympiad

Here should be graph.

The most common errors were:

  1. using too small array (or other container), which can result in runtime error

  2. wrong usage of min function: for example in C++ such code will compile:

int x = 2, y = 3, z = 4;
cout << min((x,y),z);

and the result would be 3. Why? The min function take two integers — the second one would be z, the first one would be naturally (x, y). What would be result of such thing? Using comma will result in taking the result of the last argument.

More specifically (by Wikipedia): "Comma is a binary operator that evaluates its first operand and discards the result, and then evaluates the second operand and returns this value (and type)."

For another example:

int x = (abs(-4), abs(-3));
cout << x;

returns 3. It won't work without this brackets (think why).

How to correct such thing? It's pretty simple:

min(x,min(y,z))

490B - Queue

Here should be graph.

In this problem, there weren't many hacks, most common mistake was simply using too small table.

490C - Hacking Cypher

Here should be graph.

At first, there were no pretests with large n, so big tests with for example answer -1 can grant some points.

Second, the time limit was quite strict for some languages — for example, there were only 1 accept in Python!

Third, some people used strlen function in C++, which has O(n) complexity, so if you use it n times you gain O(n2) solution. Good option is to change it to the string and use method size() instead.

490D - Chocolate

Here should be graph.

You may get tle or mle, when you use recursion without memoization. Pretty nice test was:

967458816 967458816
967458816 967458816

967458816 = 214·310

490E - Restoring Increasing Sequence

Here should be graph.

490F - Treeland Tour

Here should be graph.

Fastest hackers

Congratulations for ShawnDong and dreamoon_love_AA for being first in two different problems!

Problem Time Hacker Defender Hack
490A - Team Olympiad 0:17:55 choosemyname I_Love_Balabala 125728
490B - Queue 1:16:02 ShawnDong bullshit.ass 125766
490C - Hacking Cypher 0:29:02 ShawnDong heat_wave 125732
490D - Chocolate 1:26:39 dreamoon_love_AA sd0061 125784
490F - Treeland Tour 2:05:20 dreamoon_love_AA pulkitg10 126028

Best hackers

Hacker Stats Successful hacks Unsuccessful hacks
IAm10110o1011 +15-8 (1100) A: 126213
C: 125764 125768 125770 125774 125775 125789 125890 125909 125986 126111 126135
D: 126017 126034 126263

C: 125756 125780 125898 126057 126068 126096
D: 126026 126254
Yura_Sultonov +11-1 (1050) B: 125910
C: 125837 125842 125848 125851 125859 125863 125870 125978 126233 126246
B: 126147

anta +9-0 (900) C: 125829 125849 125852 125857 125918 126060
D: 125995
F: 126118 126174



hq9907 +9-0 (900) C: 125927 125971 125999 126021 126029 126050 126071 126083 126273

rtriangle +7-0 (700) C: 125814 125821 125839 125843 125861 125966 126012

dreamoon_love_AA +7-1 (650) C: 125939
D: 125784 125831 125876 125969
F: 126028 126040


F: 126046
monkey_king +8-5 (550)
C: 125782 125795 125800 125811 125879 126085 126239 126251
A: 126171
C: 125769 125810 125908 126229
uwi +5-0 (500) C: 125905 125930 125997
D: 126056 126110


ShawnDong +6-2 (500) B: 125766
C: 125732 125785 125792 125822 125889

C: 125808 125895
GoDDoS +6-2 (500) C: 126089 126097 126114 126129 126228 126256
C: 126220 126238
Anuar +5-0 (500) C: 125965 125968 125972 125987 126003

arturom +5-1 (450) C: 126033 126043 126049 126115 126140
C: 126244
Dr.I_m_possible +5-1 (450) C: 125998 126035 126042 126170 126214
C: 126102

Best rooms

Room #hacks Hackers
74 15 IAm10110o1011 [15]
37 11 Yura_Sultonov [11]
11 10 monkey_king [8], Risers [2]
1005 10 anta [9], Amir.bh [1]
73 9 hq9907 [9]
1000 9 uwi [5], Kaban-5 [2], xxTastyHypeBeast666xx [2]
1011 9 dreamoon_love_AA [7], Programist [2]
77 8 Branimir [4], abhra73 [4]
17 7 choosemyname [6], I_Love_Balabala [1]
42 7 rtriangle [7]
66 7 Anuar [5], alex_bucevschi [2]
75 7 Horea [4], Tima [3]

Best countries

Country #hacks Hackers
Japan 26 anta [9], uwi [5], atetubou [4], deflat [4], kmjp [2], sugim48 [2]
Russia 26 rtriangle [7], GoDDoS [6], arturom [5], HellKitsune [3], solonkovda [3], SpyCheese [1], Flyrise [1]
India 24 Dr.I_m_possible [5], b4world [4], abhra73 [4], ddt [3], PrashantM [3], achaitanyasai [3], grayhathacker [1], vignesh_m [1]
Uzbekistan 23 Yura_Sultonov [11], monkey_king [8], D05T0N [3], Ozodov__Jamshidbek [1]
Kazakhstan 13 Anuar [5], Tima [3], SmallBoy [3], amiro [1], amanchik [1]
China 11 hq9907 [9], I_Love_Balabala [1], q444372930 [1]
Egypt 11 7asn_a7md [4], ahmedameen [3], Killever [1], Omar [1], Druid [1], mahmoud_arafa [1]
  • Vote: I like it
  • +41
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks for making this analysis!