Editorial of Educational Codeforces Round 8

Revision en1, by Edvard, 2016-02-19 16:11:13

628A - Теннисный турнир

The problem suggested by unprost.

Here you can simply model the process. Or you can note that after each match some player drops out. In total n - 1 players will drop out. So the first answer is (n - 1) * (2b + 1). Obviously the second answer is np.

С++ solution 1

С++ solution 2

Complexity: O(log2n), O(logn) or O(1) depends on the realization.

Tags education round 8, editorial

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru6 Russian Edvard 2016-02-19 23:07:43 1319
ru5 Russian Edvard 2016-02-19 22:49:52 37
en10 English Edvard 2016-02-19 20:29:32 29 Tiny change: '16-02-19].\n\nAt th' -> '16-02-19]. He also wrote the editorial.\n\nAt th'
en9 English Edvard 2016-02-19 20:28:14 1288
en8 English Edvard 2016-02-19 20:01:07 0 (published)
en7 English Edvard 2016-02-19 19:53:34 72
en6 English Edvard 2016-02-19 19:51:34 1255
en5 English Edvard 2016-02-19 18:39:13 1526
ru4 Russian Edvard 2016-02-19 18:31:29 11 Мелкая правка: ' точке $y$. Теперь б' -> ' точке $y$ на единицу. Теперь б'
en4 English Edvard 2016-02-19 18:12:12 9
en3 English Edvard 2016-02-19 17:55:04 1837
en2 English Edvard 2016-02-19 16:18:14 661
en1 English Edvard 2016-02-19 16:11:13 514 Initial revision for English translation
ru3 Russian Edvard 2016-02-19 16:03:48 160 Мелкая правка: 'сть: $O(2^C n)$, где' -
ru2 Russian Edvard 2016-02-19 15:36:22 1314 Мелкая правка: 'tebin.com/w1p4uf1X)\n\nСложн' -> 'tebin.com/uxu6s5WD)\n\nСложн'
ru1 Russian Edvard 2016-02-19 14:20:15 3638 Первая редакция (сохранено в черновиках)