Mail.Ru Cup 2018 Round 2

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1055 Mail.Ru Cup 2018 Round 2 FINISHED False 9000 195578687 Nov. 10, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 629 ) D Refactoring PROGRAMMING greedy implementation strings 2300

B'Alice has written a program and now tries to improve its readability. One of the ways to improve readability is to give sensible names to the variables, so now Alice wants to rename some variables in her program. In her IDE there is a command called "massive refactoring", which can replace names of many variable in just one run. To use it, Alice needs to select two strings s and t and after that for each variable the following algorithm is performed: if the variable 's name contains s as a substring, then the first (and only first) occurrence of s is replaced with t . If the name doesn 't contain s , then this variable 's name stays the same. The list of variables is known and for each variable both the initial name and the name Alice wants this variable change to are known. Moreover, for each variable the lengths of the initial name and the target name are equal (otherwise the alignment of the code could become broken). You need to perform renaming of all variables in exactly one run of the massive refactoring command or determine that it is impossible. The first line contains the only integer n ( 1 <= n <= 3000 ) -- the number of variables in Alice 's program. The following n lines contain the initial names of variables w_1, w_2, ldots, w_n , one per line. After that, n more lines go, the i -th of them contains the target name w '_i for the i -th variable. It is guaranteed that 1 <= |w_i| = |w '_i| <= 3000 . It is guaranteed that there is at least one variable having its target name different from the initial name. Both initial and target names consist of lowercase English letters only. For each variable the length of its initial name is equal to the length of its target name. If it is impossible to rename all variables with one call of "massive refactoring", print "NO" (quotes for clarity). Otherwise, on the first line print "YES" (quotes for clarity) and on the following'...

Tutorials

Mail.Ru Cup 2018 Round 2 — analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
45524655 Gassa D Nov. 10, 2018, 3:27 p.m. OK D TESTS 69 358 35737600 2300
45579758 SingleZombie D Nov. 12, 2018, 2:46 a.m. OK GNU C++11 TESTS 70 155 18124800 2300
46203959 krijgertje D Nov. 25, 2018, 1:10 p.m. OK GNU C++11 TESTS 70 156 18124800 2300
45579763 vjudge2 D Nov. 12, 2018, 2:47 a.m. OK GNU C++11 TESTS 70 156 18124800 2300
46187480 n_-__-_n D Nov. 25, 2018, 12:21 a.m. OK GNU C++11 TESTS 70 156 18944000 2300
49551111 chuducanhchy D Feb. 7, 2019, 6:01 a.m. OK GNU C++11 TESTS 70 156 27955200 2300
45550764 YxwKeith D Nov. 11, 2018, 5:02 a.m. OK GNU C++11 TESTS 69 156 50176000 2300
46366775 ljt12138 D Nov. 29, 2018, 1:37 p.m. OK GNU C++11 TESTS 70 171 18124800 2300
45551357 sagitta D Nov. 11, 2018, 5:36 a.m. OK GNU C++11 TESTS 69 171 18227200 2300
45532675 function348 D Nov. 10, 2018, 4:27 p.m. OK GNU C++11 TESTS 69 171 18329600 2300
51034169 mredigonda D March 8, 2019, 2:23 p.m. OK GNU C++11 TESTS 70 171 19046400 2300
45566738 jcvb D Nov. 11, 2018, 3:01 p.m. OK GNU C++14 TESTS 70 171 22323200 2300
57870741 wilson.ho D July 28, 2019, 1:33 a.m. OK GNU C++14 TESTS 70 187 18124800 2300
45532136 qq409257934 D Nov. 10, 2018, 4:22 p.m. OK GNU C++14 TESTS 69 187 18124800 2300
45553291 Quang D Nov. 11, 2018, 7:03 a.m. OK GNU C++14 TESTS 69 187 18227200 2300
45528388 liujunhao D Nov. 10, 2018, 3:52 p.m. OK GNU C++14 TESTS 69 202 18227200 2300
45560125 purple_bro D Nov. 11, 2018, 11:07 a.m. OK GNU C++14 TESTS 70 202 19046400 2300
45697728 ae04071 D Nov. 14, 2018, 5:29 a.m. OK GNU C++14 TESTS 70 202 19046400 2300
45674754 caustique D Nov. 13, 2018, 12:34 p.m. OK GNU C++14 TESTS 70 202 19251200 2300
46202522 arman_ferdous D Nov. 25, 2018, 12:20 p.m. OK GNU C++14 TESTS 70 217 18227200 2300
45681943 cwhao D Nov. 13, 2018, 3:50 p.m. OK GNU C++14 TESTS 70 217 18227200 2300
45542739 Cro-Marmot D Nov. 10, 2018, 8:36 p.m. OK GNU C++17 TESTS 69 202 18432000 2300
45580430 dx007 D Nov. 12, 2018, 3:36 a.m. OK GNU C++17 TESTS 70 202 18739200 2300
45559601 purple_bro D Nov. 11, 2018, 10:48 a.m. OK GNU C++17 TESTS 70 202 19353600 2300
45559817 purple_bro D Nov. 11, 2018, 10:56 a.m. OK GNU C++17 TESTS 70 202 19353600 2300
45543106 ainta D Nov. 10, 2018, 8:54 p.m. OK GNU C++17 TESTS 70 202 19353600 2300
45670924 EIKOU D Nov. 13, 2018, 10:36 a.m. OK GNU C++17 TESTS 70 218 18329600 2300
45531256 adedalic D Nov. 10, 2018, 4:15 p.m. OK GNU C++17 TESTS 69 218 22425600 2300
45591280 Brankonymous D Nov. 12, 2018, 12:39 p.m. OK GNU C++17 TESTS 70 218 28057600 2300
45529992 dreamoon_love_AA D Nov. 10, 2018, 4:05 p.m. OK GNU C++17 TESTS 69 233 18841600 2300
46718185 Nakagawa.Kanon D Dec. 7, 2018, 12:15 p.m. OK GNU C++17 TESTS 70 233 19148800 2300
45898496 lucasr D Nov. 18, 2018, 1:50 a.m. OK Java 8 TESTS 70 327 62259200 2300
45633328 m1_k3 D Nov. 12, 2018, 5:49 p.m. OK Java 8 TESTS 70 358 37990400 2300
45636668 Suzukaze D Nov. 12, 2018, 7:39 p.m. OK Java 8 TESTS 70 358 62259200 2300
45527087 Petr D Nov. 10, 2018, 3:43 p.m. OK Java 8 TESTS 70 358 62464000 2300
45633717 m1_k3 D Nov. 12, 2018, 6 p.m. OK Java 8 TESTS 70 374 37785600 2300
45541336 dusty.and.rusty D Nov. 10, 2018, 7:37 p.m. OK Java 8 TESTS 69 374 62668800 2300
45556114 aman28rwt D Nov. 11, 2018, 8:38 a.m. OK Java 8 TESTS 69 389 61030400 2300
45550729 aman28rwt D Nov. 11, 2018, 5 a.m. OK Java 8 TESTS 69 389 61030400 2300
45555930 aman28rwt D Nov. 11, 2018, 8:32 a.m. OK Java 8 TESTS 69 390 60928000 2300
45522762 uwi D Nov. 10, 2018, 3:16 p.m. OK Java 8 TESTS 69 390 62976000 2300
45541462 alexey.enkov D Nov. 10, 2018, 7:41 p.m. OK Kotlin TESTS 69 343 66150400 2300
45531210 shaviava D Nov. 10, 2018, 4:14 p.m. OK Kotlin TESTS 69 623 44134400 2300
45540001 mircea85 D Nov. 10, 2018, 6:51 p.m. OK Mono C# TESTS 69 545 44441600 2300
45530119 peregrinus D Nov. 10, 2018, 4:06 p.m. OK Mono C# TESTS 69 561 119705600 2300
45528920 bayleef D Nov. 10, 2018, 3:56 p.m. OK MS C++ TESTS 69 218 51200000 2300
45543577 BaturaDima D Nov. 10, 2018, 9:19 p.m. OK MS C++ TESTS 69 451 25600000 2300
46658141 iMac D Dec. 5, 2018, 5:31 p.m. OK MS C++ TESTS 70 997 25702400 2300
46550239 libi.l D Dec. 3, 2018, 5:23 p.m. OK MS C++ TESTS 70 997 25702400 2300
54892102 antofik D May 31, 2019, 9:20 p.m. OK MS C++ 2017 TESTS 70 311 25702400 2300
54892079 antofik D May 31, 2019, 9:19 p.m. OK MS C++ 2017 TESTS 70 311 25702400 2300
54892126 antofik D May 31, 2019, 9:21 p.m. OK MS C++ 2017 TESTS 70 326 25702400 2300
54891998 antofik D May 31, 2019, 9:14 p.m. OK MS C++ 2017 TESTS 70 326 25702400 2300
54892030 antofik D May 31, 2019, 9:16 p.m. OK MS C++ 2017 TESTS 70 327 25702400 2300
54857345 antofik D May 30, 2019, 8:37 p.m. OK MS C++ 2017 TESTS 70 420 25702400 2300
54855952 antofik D May 30, 2019, 7:31 p.m. OK MS C++ 2017 TESTS 70 420 25702400 2300
54857359 antofik D May 30, 2019, 8:37 p.m. OK MS C++ 2017 TESTS 70 420 25702400 2300
54857392 antofik D May 30, 2019, 8:40 p.m. OK MS C++ 2017 TESTS 70 421 25702400 2300
54855507 antofik D May 30, 2019, 7:12 p.m. OK MS C++ 2017 TESTS 70 873 25702400 2300
45573414 frederika D Nov. 11, 2018, 7:26 p.m. OK PyPy 2 TESTS 70 592 48742400 2300
45544550 frederika D Nov. 10, 2018, 10:21 p.m. OK PyPy 2 TESTS 69 654 48742400 2300
45572628 frederika D Nov. 11, 2018, 7:06 p.m. OK PyPy 2 TESTS 70 655 48742400 2300
45573220 frederika D Nov. 11, 2018, 7:21 p.m. OK PyPy 2 TESTS 70 686 49152000 2300
45544458 frederika D Nov. 10, 2018, 10:15 p.m. OK PyPy 2 TESTS 69 701 48640000 2300
45572550 frederika D Nov. 11, 2018, 7:03 p.m. OK PyPy 2 TESTS 70 717 49152000 2300
45544197 frederika D Nov. 10, 2018, 9:57 p.m. OK PyPy 2 TESTS 69 795 57958400 2300
45544375 frederika D Nov. 10, 2018, 10:09 p.m. OK PyPy 2 TESTS 69 826 57958400 2300
45544428 frederika D Nov. 10, 2018, 10:13 p.m. OK PyPy 2 TESTS 69 826 58060800 2300
64601535 limed D Nov. 9, 2019, 7:03 p.m. OK Scala TESTS 70 701 52633600 2300
64601176 limed D Nov. 9, 2019, 6:53 p.m. OK Scala TESTS 70 795 52940800 2300
45564848 yakamoto D Nov. 11, 2018, 1:47 p.m. OK Scala TESTS 70 857 66662400 2300
45797068 limed D Nov. 16, 2018, 11:26 a.m. OK Scala TESTS 70 936 54476800 2300
64601634 limed D Nov. 9, 2019, 7:05 p.m. OK Scala TESTS 70 998 26828800 2300
64711263 limed D Nov. 11, 2019, 6:50 p.m. OK Scala TESTS 70 998 27340800 2300

remove filters

Back to search problems