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 | 189962699 | Nov. 10, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1917 ) | C | Lucky Days | PROGRAMMING | math number theory | 1900 |
B"Bob and Alice are often participating in various programming competitions. Like many competitive programmers, Alice and Bob have good and bad days. They noticed, that their lucky and unlucky days are repeating with some period. For example, for Alice days [l_a; r_a] are lucky, then there are some unlucky days: [r_a + 1; l_a + t_a - 1] , and then there are lucky days again: [l_a + t_a; r_a + t_a] and so on. In other words, the day is lucky for Alice if it lies in the segment [l_a + k t_a; r_a + k t_a] for some non-negative integer k . The Bob's lucky day have similar structure, however the parameters of his sequence are different: l_b , r_b , t_b . So a day is a lucky for Bob if it lies in a segment [l_b + k t_b; r_b + k t_b] , for some non-negative integer k . Alice and Bob want to participate in team competitions together and so they want to find out what is the largest possible number of consecutive days, which are lucky for both Alice and Bob. The first line contains three integers l_a , r_a , t_a ( 0 <= l_a <= r_a <= t_a - 1, 2 <= t_a <= 10^9 ) and describes Alice's lucky days. The second line contains three integers l_b , r_b , t_b ( 0 <= l_b <= r_b <= t_b - 1, 2 <= t_b <= 10^9 ) and describes Bob's lucky days. It is guaranteed that both Alice and Bob have some unlucky days. Print one integer: the maximum number of days in the row that are lucky for both Alice and Bob. The graphs below correspond to the two sample tests and show the lucky and unlucky days of Alice and Bob as well as the possible solutions for these tests. "... |
Mail.Ru Cup 2018 Round 2 — analysis |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
45556566 | YangDavid | C | Nov. 11, 2018, 8:54 a.m. | OK | Clang++17 Diagnostics | TESTS | 30 | 31 | 0 | 1900 | |
45526930 | Gassa | C | Nov. 10, 2018, 3:42 p.m. | OK | D | TESTS | 29 | 31 | 0 | 1900 | |
45533503 | LeoPro | C | Nov. 10, 2018, 4:34 p.m. | OK | FPC | TESTS | 29 | 46 | 102400 | 1900 | |
45546764 | llbra8z | C | Nov. 11, 2018, 2:30 a.m. | OK | GNU C11 | TESTS | 30 | 31 | 0 | 1900 | |
45540153 | yotin | C | Nov. 10, 2018, 6:56 p.m. | OK | GNU C++11 | TESTS | 30 | 15 | 0 | 1900 | |
45526749 | l_l | C | Nov. 10, 2018, 3:41 p.m. | OK | GNU C++11 | TESTS | 29 | 15 | 0 | 1900 | |
45584233 | gold1103 | C | Nov. 12, 2018, 7:14 a.m. | OK | GNU C++11 | TESTS | 30 | 15 | 0 | 1900 | |
68778958 | albertxwz | C | Jan. 14, 2020, 2:21 p.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
53840583 | zsben | C | May 7, 2019, 7:14 a.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
62390720 | geniusjoe | C | Oct. 12, 2019, 1:44 a.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
49854634 | 170104100115 | C | Feb. 13, 2019, 6:30 a.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
47602695 | fwat | C | Dec. 28, 2018, 1:17 a.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
47383720 | tyzc | C | Dec. 23, 2018, 1:34 a.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
54241212 | hyacinthLJP | C | May 16, 2019, 1:02 p.m. | OK | GNU C++11 | TESTS | 30 | 30 | 0 | 1900 | |
45673401 | xdu_lhz | C | Nov. 13, 2018, 11:53 a.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
62594002 | mostwanted7 | C | Oct. 14, 2019, 11:54 p.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
57958347 | __Stranger__ | C | July 29, 2019, 8:08 p.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
55694111 | nonsequitur | C | June 17, 2019, 8:07 p.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
55692613 | guru_console | C | June 17, 2019, 7:07 p.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
53893612 | walht | C | May 9, 2019, 3:27 a.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
49957952 | bostanmatei | C | Feb. 15, 2019, 4:52 p.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
49524490 | gayathriamulya98 | C | Feb. 6, 2019, 10:28 a.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
45675192 | zhougang | C | Nov. 13, 2018, 12:46 p.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
45660278 | monkey8 | C | Nov. 13, 2018, 6:09 a.m. | OK | GNU C++14 | TESTS | 30 | 15 | 0 | 1900 | |
56403295 | naman44 | C | July 1, 2019, 5:57 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
56403142 | naman44 | C | July 1, 2019, 5:52 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
56247531 | Barbosa1998 | C | June 28, 2019, 10:46 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
54488612 | _nicktz1408_ | C | May 22, 2019, 2:22 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
53789634 | k24 | C | May 5, 2019, 12:07 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
50930094 | vjudge3 | C | March 7, 2019, 1:33 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
46891279 | baluteshih | C | Dec. 11, 2018, 6:15 a.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
45551508 | dmkozyrev | C | Nov. 11, 2018, 5:43 a.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
45539079 | ludo | C | Nov. 10, 2018, 6:27 p.m. | OK | GNU C++17 | TESTS | 29 | 15 | 0 | 1900 | |
60306980 | msporyshev | C | Sept. 9, 2019, 2:16 p.m. | OK | GNU C++17 | TESTS | 30 | 15 | 0 | 1900 | |
61215513 | vjudge1 | C | Sept. 24, 2019, 12:37 p.m. | OK | Go | TESTS | 30 | 31 | 0 | 1900 | |
61215420 | WangJialei | C | Sept. 24, 2019, 12:36 p.m. | OK | Go | TESTS | 30 | 31 | 0 | 1900 | |
46173636 | revanthreddy85 | C | Nov. 24, 2018, 2:03 p.m. | OK | Java 8 | TESTS | 30 | 108 | 0 | 1900 | |
45545608 | flyman3046 | C | Nov. 11, 2018, 12:07 a.m. | OK | Java 8 | TESTS | 30 | 108 | 0 | 1900 | |
45525260 | AkshajK | C | Nov. 10, 2018, 3:31 p.m. | OK | Java 8 | TESTS | 29 | 108 | 0 | 1900 | |
48703241 | happybelly | C | Jan. 22, 2019, 4:21 a.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
48449066 | happybelly | C | Jan. 16, 2019, 9:08 a.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
46204381 | BaZ_ | C | Nov. 25, 2018, 1:23 p.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
45897664 | lucasr | C | Nov. 18, 2018, 12:50 a.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
45661735 | guptautkarsh028 | C | Nov. 13, 2018, 7:02 a.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
45634298 | xodiac | C | Nov. 12, 2018, 6:18 p.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
45579876 | xyz_000 | C | Nov. 12, 2018, 2:56 a.m. | OK | Java 8 | TESTS | 30 | 109 | 0 | 1900 | |
45525556 | alexey.enkov | C | Nov. 10, 2018, 3:33 p.m. | OK | Kotlin | TESTS | 29 | 140 | 102400 | 1900 | |
45529084 | raynald | C | Nov. 10, 2018, 3:57 p.m. | OK | Kotlin | TESTS | 29 | 140 | 102400 | 1900 | |
45519039 | shaviava | C | Nov. 10, 2018, 2:57 p.m. | OK | Kotlin | TESTS | 29 | 140 | 512000 | 1900 | |
45539348 | Zvigintsev | C | Nov. 10, 2018, 6:32 p.m. | OK | Mono C# | TESTS | 29 | 46 | 0 | 1900 | |
46258904 | Anastasiya_Andreevna | C | Nov. 26, 2018, 6:34 p.m. | OK | Mono C# | TESTS | 30 | 46 | 0 | 1900 | |
45539048 | Zvigintsev | C | Nov. 10, 2018, 6:27 p.m. | OK | Mono C# | TESTS | 29 | 46 | 0 | 1900 | |
45529888 | eki | C | Nov. 10, 2018, 4:04 p.m. | OK | Mono C# | TESTS | 29 | 62 | 0 | 1900 | |
45532563 | gonchenko | C | Nov. 10, 2018, 4:26 p.m. | OK | Mono C# | TESTS | 29 | 62 | 0 | 1900 | |
45533423 | omikad | C | Nov. 10, 2018, 4:33 p.m. | OK | Mono C# | TESTS | 29 | 62 | 3584000 | 1900 | |
45539024 | peregrinus | C | Nov. 10, 2018, 6:26 p.m. | OK | Mono C# | TESTS | 29 | 62 | 68915200 | 1900 | |
45543055 | kuuso | C | Nov. 10, 2018, 8:51 p.m. | OK | Mono C# | TESTS | 30 | 78 | 15052800 | 1900 | |
45534948 | BaturaDima | C | Nov. 10, 2018, 4:46 p.m. | OK | MS C++ | TESTS | 29 | 31 | 0 | 1900 | |
45533847 | DerelictX | C | Nov. 10, 2018, 4:37 p.m. | OK | MS C++ | TESTS | 29 | 31 | 0 | 1900 | |
45536917 | youx | C | Nov. 10, 2018, 5 p.m. | OK | MS C++ | TESTS | 29 | 31 | 0 | 1900 | |
45537005 | Khazhak | C | Nov. 10, 2018, 5:01 p.m. | OK | MS C++ | TESTS | 29 | 31 | 0 | 1900 | |
45651694 | jiangjiashi | C | Nov. 13, 2018, 2:06 a.m. | OK | MS C++ | TESTS | 30 | 31 | 0 | 1900 | |
46533610 | libi.l | C | Dec. 3, 2018, 7:34 a.m. | OK | MS C++ | TESTS | 30 | 31 | 0 | 1900 | |
51264374 | Kosmonaft | C | March 13, 2019, 2:50 p.m. | OK | MS C++ | TESTS | 30 | 31 | 0 | 1900 | |
61208458 | vjudge4 | C | Sept. 24, 2019, 10:39 a.m. | OK | MS C++ | TESTS | 30 | 31 | 0 | 1900 | |
61403988 | vjudge3 | C | Sept. 28, 2019, 6:22 a.m. | OK | MS C++ | TESTS | 30 | 31 | 0 | 1900 | |
69874377 | vjudge2 | C | Jan. 31, 2020, 3 a.m. | OK | MS C++ | TESTS | 30 | 31 | 0 | 1900 | |
54846323 | antofik | C | May 30, 2019, 2:05 p.m. | OK | MS C++ 2017 | TESTS | 30 | 31 | 0 | 1900 | |
69663664 | vjudge1 | C | Jan. 28, 2020, 10:28 a.m. | OK | MS C++ 2017 | TESTS | 30 | 31 | 0 | 1900 | |
49813443 | Timonnable | C | Feb. 12, 2019, 3:36 a.m. | OK | MS C++ 2017 | TESTS | 30 | 31 | 102400 | 1900 | |
45524515 | OpKos | C | Nov. 10, 2018, 3:26 p.m. | OK | PascalABC.NET | TESTS | 29 | 46 | 0 | 1900 | |
46166140 | KGYYT | C | Nov. 24, 2018, 9:56 a.m. | OK | PascalABC.NET | TESTS | 30 | 46 | 102400 | 1900 | |
51264944 | vippee | C | March 13, 2019, 3:05 p.m. | OK | PascalABC.NET | TESTS | 30 | 295 | 0 | 1900 | |
45528500 | c1729 | C | Nov. 10, 2018, 3:53 p.m. | OK | PyPy 2 | TESTS | 29 | 124 | 0 | 1900 | |
62961806 | YESMAths | C | Oct. 20, 2019, 1:20 a.m. | OK | PyPy 2 | TESTS | 30 | 218 | 7680000 | 1900 | |
45520132 | alexwice | C | Nov. 10, 2018, 3:02 p.m. | OK | PyPy 2 | TESTS | 29 | 218 | 7782400 | 1900 | |
45574772 | frederika | C | Nov. 11, 2018, 8:07 p.m. | OK | PyPy 2 | TESTS | 30 | 218 | 7782400 | 1900 | |
45574172 | frederika | C | Nov. 11, 2018, 7:48 p.m. | OK | PyPy 2 | TESTS | 30 | 233 | 7884800 | 1900 | |
47505404 | limabeans | C | Dec. 25, 2018, 10:27 p.m. | OK | PyPy 3 | TESTS | 30 | 124 | 0 | 1900 | |
45586940 | sound_of_silence | C | Nov. 12, 2018, 9:28 a.m. | OK | PyPy 3 | TESTS | 30 | 124 | 0 | 1900 | |
45540969 | Roms | C | Nov. 10, 2018, 7:24 p.m. | OK | PyPy 3 | TESTS | 30 | 139 | 0 | 1900 | |
47832533 | whatshisbucket | C | Jan. 2, 2019, 7:59 a.m. | OK | PyPy 3 | TESTS | 30 | 139 | 0 | 1900 | |
51265565 | KrisAlan | C | March 13, 2019, 3:22 p.m. | OK | PyPy 3 | TESTS | 30 | 140 | 0 | 1900 | |
51265541 | hub_hub | C | March 13, 2019, 3:21 p.m. | OK | PyPy 3 | TESTS | 30 | 140 | 0 | 1900 | |
45545068 | natascha.abraschitowa | C | Nov. 10, 2018, 11:01 p.m. | OK | PyPy 3 | TESTS | 30 | 140 | 0 | 1900 | |
45523473 | meooow | C | Nov. 10, 2018, 3:20 p.m. | OK | PyPy 3 | TESTS | 29 | 140 | 0 | 1900 | |
45675876 | Leendertz | C | Nov. 13, 2018, 1:04 p.m. | OK | PyPy 3 | TESTS | 30 | 171 | 0 | 1900 | |
45523682 | xh286286 | C | Nov. 10, 2018, 3:21 p.m. | OK | PyPy 3 | TESTS | 29 | 187 | 512000 | 1900 | |
45544530 | pedrosorio | C | Nov. 10, 2018, 10:20 p.m. | OK | Python 2 | TESTS | 30 | 156 | 0 | 1900 | |
45521774 | agutowski | C | Nov. 10, 2018, 3:10 p.m. | OK | Python 2 | TESTS | 29 | 171 | 0 | 1900 | |
51260723 | seosprint7777 | C | March 13, 2019, 1:13 p.m. | OK | Python 2 | TESTS | 30 | 186 | 0 | 1900 | |
45555352 | SoSooding | C | Nov. 11, 2018, 8:13 a.m. | OK | Python 2 | TESTS | 30 | 234 | 5324800 | 1900 | |
45523977 | nwi | C | Nov. 10, 2018, 3:23 p.m. | OK | Python 2 | TESTS | 29 | 296 | 5324800 | 1900 | |
64150508 | NocturneBflat | C | Nov. 3, 2019, 11:15 a.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45667545 | Firepaw | C | Nov. 13, 2018, 8:33 a.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45655284 | ntnm | C | Nov. 13, 2018, 5:54 a.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45634367 | abhishek_a | C | Nov. 12, 2018, 6:20 p.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45568230 | malo.detz | C | Nov. 11, 2018, 3:56 p.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45564492 | Jozik | C | Nov. 11, 2018, 1:35 p.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45541250 | Shiisui | C | Nov. 10, 2018, 7:34 p.m. | OK | Python 3 | TESTS | 30 | 109 | 0 | 1900 | |
45537093 | eusdima | C | Nov. 10, 2018, 5:02 p.m. | OK | Python 3 | TESTS | 29 | 109 | 0 | 1900 | |
45535307 | asvasil | C | Nov. 10, 2018, 4:49 p.m. | OK | Python 3 | TESTS | 29 | 109 | 0 | 1900 | |
45535137 | ruterute1 | C | Nov. 10, 2018, 4:48 p.m. | OK | Python 3 | TESTS | 29 | 109 | 0 | 1900 | |
59961985 | limed | C | Sept. 3, 2019, 6:27 p.m. | OK | Scala | TESTS | 30 | 420 | 0 | 1900 | |
47593117 | limed | C | Dec. 27, 2018, 5:12 p.m. | OK | Scala | TESTS | 30 | 436 | 0 | 1900 | |
59962073 | limed | C | Sept. 3, 2019, 6:29 p.m. | OK | Scala | TESTS | 30 | 452 | 0 | 1900 | |
47593197 | limed | C | Dec. 27, 2018, 5:14 p.m. | OK | Scala | TESTS | 30 | 452 | 0 | 1900 | |
45524975 | yakamoto | C | Nov. 10, 2018, 3:29 p.m. | OK | Scala | TESTS | 29 | 452 | 0 | 1900 |
Back to search problems