My solution for Round #310 (Div 1) C and D (555C, 555D)

Правка en1, от microtony, 2015-06-28 05:35:52

555C - Case of Chocolate

Initially there is only one single piece of chocolate. It is the problem's requirement that subsequent same coordinates should return 0 so we can use a set to store those coordinates. (For example, the sample two has two 10 1 so the second 10 1 should return 0.

Continuing the concept of pieces, observe that after one valid operation, the chocolate would be split into two (possibly zero area) pieces. For example, in the second sample, the first operation splits the chocolate into x = [1, 1] and x = [3, 10]

Теги 555c, 555d

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en11 Английский microtony 2015-06-28 09:38:43 47 Tiny change: 'ution in $lg\ n\ \text' -> 'ution in $\text{lg}\ n\ \text'
en10 Английский microtony 2015-06-28 06:35:32 0 (published)
en9 Английский microtony 2015-06-28 06:34:57 30
en8 Английский microtony 2015-06-28 06:34:02 2 Tiny change: '$peg_1 = 1 and peg_2 = 2$' -> '$peg_1 = 1$ and $peg_2 = 2$'
en7 Английский microtony 2015-06-28 06:31:59 1027
en6 Английский microtony 2015-06-28 06:17:06 96 Tiny change: '419da.png)' -> '419da.png)\n\n[problem:555C]\n=================='
en5 Английский microtony 2015-06-28 06:14:25 61
en4 Английский microtony 2015-06-28 06:13:25 56 Tiny change: 'orces.com/668842/555C2.png' -> 'orces.com/5649bc/555C2.png'
en3 Английский microtony 2015-06-28 06:11:46 192
en2 Английский microtony 2015-06-28 06:04:16 938
en1 Английский microtony 2015-06-28 05:35:52 620 Initial revision (saved to drafts)