Editorial of Educational Codeforces Round 5

Правка en2, от Edvard, 2016-01-11 23:49:50

616A - Comparing Two Long Integers

Note that solutions in Java with BigInteger class or input() function in Python2 will fail in this problem. The reason is the next: standard objects stores numbers not in decimal system and need a lot of time to convert numbers from decimal system. Actually they are working in O(n2), where n is the legth of the number.

To solve this problem you should simply read the numbers to strings and add leading zeroes to the shorter one until the numbers will be of the same length. After that you should simply compare them alphabetically.

С++ solution

Python solution

Complexity: O(n).

616B - Dinner with Emma

Firstly you should find the minimum value in each row and after that should find the maximum value over that minimums. It's corresponding to the strategy of Jack and Emma.

C++ solution

Complexity: O(nm).

Теги education round 5, editorial

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en9 Английский Edvard 2016-01-12 02:30:42 15 Tiny change: ' i\right)=\frac {m(m+1)}2 - \sum\li' -
ru9 Русский Edvard 2016-01-12 02:30:03 15 Мелкая правка: ' i\right)=\frac {m(m+1)}2 - \sum\li' -
en8 Английский Edvard 2016-01-12 02:28:15 1258
en7 Английский Edvard 2016-01-12 02:03:12 1444
en6 Английский Edvard 2016-01-12 01:28:08 932
en5 Английский Edvard 2016-01-12 00:30:42 12
ru8 Русский Edvard 2016-01-12 00:30:19 24 Мелкая правка: '[problem:6' -
en4 Английский Edvard 2016-01-12 00:28:34 515
ru7 Русский Edvard 2016-01-12 00:16:51 1 Мелкая правка: 'че решения использую' -> 'че решения, использую'
en3 Английский Edvard 2016-01-11 23:50:30 4 Tiny change: 'fter that should fi' -> 'fter that you should fi'
en2 Английский Edvard 2016-01-11 23:49:50 265
en1 Английский Edvard 2016-01-11 23:47:56 727 Initial revision for English translation
ru6 Русский Edvard 2016-01-11 23:31:14 1308 Мелкая правка: 'ользовать ~map~ для хране' -int, int
ru5 Русский Edvard 2016-01-11 22:52:54 1637 Мелкая правка: 'i i\rfloor)$.\n\n[pr' -
ru4 Русский Edvard 2016-01-11 22:30:59 930
ru3 Русский Edvard 2016-01-11 22:22:53 505
ru2 Русский Edvard 2016-01-11 22:16:30 207
ru1 Русский Edvard 2016-01-11 22:14:10 856 Первая редакция (опубликовано)