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 |
---|---|---|---|---|---|---|
1148 | Codeforces Global Round 3 | FINISHED | False | 8100 | 172423499 | June 1, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 7516 ) | B | Born This Way | PROGRAMMING | binary search brute force two pointers | 1700 |
B'Arkady bought an air ticket from a city A to a city C. Unfortunately, there are no direct flights, but there are a lot of flights from A to a city B, and from B to C. There are n flights from A to B, they depart at time moments a_1 , a_2 , a_3 , ..., a_n and arrive at B t_a moments later. There are m flights from B to C, they depart at time moments b_1 , b_2 , b_3 , ..., b_m and arrive at C t_b moments later. The connection time is negligible, so one can use the i -th flight from A to B and the j -th flight from B to C if and only if b_j ge a_i + t_a . You can cancel at most k flights. If you cancel a flight, Arkady can not use it. Arkady wants to be in C as early as possible, while you want him to be in C as late as possible. Find the earliest time Arkady can arrive at C, if you optimally cancel k flights. If you can cancel k or less flights in such a way that it is not possible to reach C at all, print -1 . The first line contains five integers n , m , t_a , t_b and k ( 1 <= n, m <= 2 cdot 10^5 , 1 <= k <= n + m , 1 <= t_a, t_b <= 10^9 ) -- the number of flights from A to B, the number of flights from B to C, the flight time from A to B, the flight time from B to C and the number of flights you can cancel, respectively. The second line contains n distinct integers in increasing order a_1 , a_2 , a_3 , ..., a_n ( 1 <= a_1 < a_2 < ldots < a_n <= 10^9 ) -- the times the flights from A to B depart. The third line contains m distinct integers in increasing order b_1 , b_2 , b_3 , ..., b_m ( 1 <= b_1 < b_2 < ldots < b_m <= 10^9 ) -- the times the flights from B to C depart. If you can cancel k or less flights in such a way that it is not possible to reach C at all, print -1 . Otherwise print the earliest time Arkady can arrive'... |
Codeforces Global Round 3 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
54999996 | jiangly | B | June 3, 2019, 3:44 a.m. | OK | Clang++17 Diagnostics | TESTS | 52 | 171 | 921600 | 1700 | |
54930276 | avm | B | June 1, 2019, 3:25 p.m. | OK | D | TESTS | 52 | 77 | 25292800 | 1700 | |
54944923 | iica | B | June 1, 2019, 4:39 p.m. | OK | D | TESTS | 52 | 124 | 22118400 | 1700 | |
55188979 | Denor | B | June 6, 2019, 5:35 a.m. | OK | Delphi | TESTS | 52 | 140 | 4915200 | 1700 | |
55186950 | Denor | B | June 6, 2019, 4:06 a.m. | OK | Delphi | TESTS | 52 | 140 | 4915200 | 1700 | |
54928690 | ruban | B | June 1, 2019, 3:18 p.m. | OK | Delphi | TESTS | 52 | 155 | 33689600 | 1700 | |
55227291 | Lokn | B | June 7, 2019, 2:52 a.m. | OK | FPC | TESTS | 52 | 109 | 1638400 | 1700 | |
54960051 | omlgg | B | June 2, 2019, 3:07 a.m. | OK | FPC | TESTS | 52 | 124 | 2048000 | 1700 | |
54952023 | LaSWeeG | B | June 1, 2019, 7:38 p.m. | OK | FPC | TESTS | 52 | 140 | 1638400 | 1700 | |
55050301 | LaSWeeG | B | June 3, 2019, 4:11 p.m. | OK | FPC | TESTS | 52 | 170 | 41676800 | 1700 | |
54956866 | CJK000 | B | June 2, 2019, 12:19 a.m. | OK | GNU C11 | TESTS | 52 | 31 | 2457600 | 1700 | |
55053882 | about | B | June 3, 2019, 6:13 p.m. | OK | GNU C11 | TESTS | 52 | 78 | 1638400 | 1700 | |
67586084 | rahulgoel | B | Dec. 25, 2019, 8:20 a.m. | OK | GNU C11 | TESTS | 52 | 93 | 1638400 | 1700 | |
54952499 | gr.singh | B | June 1, 2019, 7:55 p.m. | OK | GNU C11 | TESTS | 52 | 93 | 1638400 | 1700 | |
54967549 | ashk_21 | B | June 2, 2019, 7:06 a.m. | OK | GNU C11 | TESTS | 52 | 93 | 1638400 | 1700 | |
54969075 | Farhan__Sakib | B | June 2, 2019, 7:47 a.m. | OK | GNU C11 | TESTS | 52 | 93 | 1638400 | 1700 | |
55661155 | rainboy | B | June 16, 2019, 9:11 p.m. | OK | GNU C11 | TESTS | 52 | 93 | 1638400 | 1700 | |
54968524 | _nmp_ | B | June 2, 2019, 7:32 a.m. | OK | GNU C11 | TESTS | 52 | 93 | 3174400 | 1700 | |
54955802 | YouWontKnowMe | B | June 1, 2019, 10:48 p.m. | OK | GNU C11 | TESTS | 52 | 93 | 3174400 | 1700 | |
54932643 | _Rebellion | B | June 1, 2019, 3:36 p.m. | OK | GNU C11 | TESTS | 52 | 93 | 3174400 | 1700 | |
59648908 | chenyewei_1234 | B | Aug. 29, 2019, 7:16 a.m. | OK | GNU C++11 | TESTS | 52 | 31 | 3174400 | 1700 | |
55304711 | luogu_bot4 | B | June 8, 2019, 1:44 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1433600 | 1700 | |
58852320 | luogu_bot3 | B | Aug. 15, 2019, 7:59 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1433600 | 1700 | |
58852314 | xcxxcx | B | Aug. 15, 2019, 7:58 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1433600 | 1700 | |
55494709 | xgzepto | B | June 12, 2019, 11:57 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
55084476 | lwhlwh | B | June 4, 2019, 12:03 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
55079608 | luogu_bot5 | B | June 4, 2019, 10:10 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
55746322 | M_sea | B | June 19, 2019, 10:14 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
55610342 | ReaLNero1 | B | June 16, 2019, 5:16 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
55211366 | hangyesheng | B | June 6, 2019, 2:46 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
54992213 | Sigemiz | B | June 2, 2019, 7:38 p.m. | OK | GNU C++14 | TESTS | 52 | 78 | 7987200 | 1700 | |
65334403 | axtrez | B | Nov. 19, 2019, 8:13 a.m. | OK | GNU C++14 | TESTS | 52 | 93 | 1536000 | 1700 | |
69666789 | lowoncode | B | Jan. 28, 2020, 11:38 a.m. | OK | GNU C++14 | TESTS | 52 | 93 | 1536000 | 1700 | |
54936285 | Jupiter | B | June 1, 2019, 3:54 p.m. | OK | GNU C++14 | TESTS | 52 | 93 | 1638400 | 1700 | |
54957617 | OnionPringles | B | June 2, 2019, 1:19 a.m. | OK | GNU C++14 | TESTS | 52 | 93 | 1638400 | 1700 | |
54929845 | Hasan0540 | B | June 1, 2019, 3:23 p.m. | OK | GNU C++14 | TESTS | 52 | 108 | 1638400 | 1700 | |
55713809 | MorningZC | B | June 18, 2019, 11:40 a.m. | OK | GNU C++14 | TESTS | 52 | 108 | 3174400 | 1700 | |
55121789 | nihaawop | B | June 5, 2019, 11:04 a.m. | OK | GNU C++14 | TESTS | 52 | 108 | 3481600 | 1700 | |
55686035 | HipHop | B | June 17, 2019, 3:32 p.m. | OK | GNU C++14 | TESTS | 52 | 109 | 1536000 | 1700 | |
54991031 | xvenom99 | B | June 2, 2019, 6:45 p.m. | OK | GNU C++14 | TESTS | 52 | 109 | 1536000 | 1700 | |
67151920 | vjudge4 | B | Dec. 18, 2019, 11:07 a.m. | OK | GNU C++17 | TESTS | 52 | 93 | 1536000 | 1700 | |
61346235 | YANGRUZHAO | B | Sept. 27, 2019, 5:08 a.m. | OK | GNU C++17 | TESTS | 52 | 93 | 1536000 | 1700 | |
56659519 | i_lower | B | July 7, 2019, 9:28 a.m. | OK | GNU C++17 | TESTS | 52 | 93 | 1536000 | 1700 | |
56850459 | pmitkov | B | July 11, 2019, 3:29 p.m. | OK | GNU C++17 | TESTS | 52 | 93 | 1536000 | 1700 | |
56659284 | i_lower | B | July 7, 2019, 9:24 a.m. | OK | GNU C++17 | TESTS | 52 | 93 | 1536000 | 1700 | |
67151673 | vjudge4 | B | Dec. 18, 2019, 11:02 a.m. | OK | GNU C++17 | TESTS | 52 | 93 | 1536000 | 1700 | |
55417516 | Alisal | B | June 11, 2019, 3:48 a.m. | OK | GNU C++17 | TESTS | 52 | 93 | 16076800 | 1700 | |
54935290 | Arseniy_Pavlov | B | June 1, 2019, 3:49 p.m. | OK | GNU C++17 | TESTS | 52 | 108 | 2662400 | 1700 | |
54986882 | nssw | B | June 2, 2019, 4:12 p.m. | OK | GNU C++17 | TESTS | 52 | 108 | 3174400 | 1700 | |
64037221 | Bohun | B | Nov. 1, 2019, 4:38 p.m. | OK | GNU C++17 | TESTS | 52 | 109 | 1638400 | 1700 | |
54929336 | caidodo0_0 | B | June 1, 2019, 3:21 p.m. | OK | Go | TESTS | 52 | 389 | 5324800 | 1700 | |
54967122 | sukh-e | B | June 2, 2019, 6:54 a.m. | OK | Java 8 | TESTS | 52 | 124 | 0 | 1700 | |
54962316 | kukreja-vlk | B | June 2, 2019, 4:34 a.m. | OK | Java 8 | TESTS | 52 | 124 | 0 | 1700 | |
54951385 | smalex69 | B | June 1, 2019, 7:22 p.m. | OK | Java 8 | TESTS | 52 | 124 | 0 | 1700 | |
55014642 | Lior | B | June 3, 2019, 11:45 a.m. | OK | Java 8 | TESTS | 52 | 139 | 0 | 1700 | |
54962916 | te_amo | B | June 2, 2019, 4:54 a.m. | OK | Java 8 | TESTS | 52 | 139 | 0 | 1700 | |
54949510 | uwi | B | June 1, 2019, 6:43 p.m. | OK | Java 8 | TESTS | 52 | 139 | 0 | 1700 | |
62552160 | T_Nady | B | Oct. 14, 2019, 9:06 a.m. | OK | Java 8 | TESTS | 52 | 140 | 0 | 1700 | |
56055731 | mbfeci | B | June 25, 2019, 11:15 p.m. | OK | Java 8 | TESTS | 52 | 140 | 0 | 1700 | |
55214966 | analog | B | June 6, 2019, 4:17 p.m. | OK | Java 8 | TESTS | 52 | 140 | 0 | 1700 | |
55001627 | thisbeit | B | June 3, 2019, 4:57 a.m. | OK | Java 8 | TESTS | 52 | 140 | 0 | 1700 | |
54930510 | Lishy2010 | B | June 1, 2019, 3:26 p.m. | OK | Kotlin | TESTS | 52 | 451 | 24678400 | 1700 | |
55110344 | xxx_alisher_xxx | B | June 5, 2019, 5:52 a.m. | OK | Kotlin | TESTS | 52 | 561 | 26828800 | 1700 | |
55085471 | viajero | B | June 4, 2019, 12:25 p.m. | OK | Kotlin | TESTS | 52 | 576 | 26828800 | 1700 | |
55198119 | max_kibble | B | June 6, 2019, 9:23 a.m. | OK | Kotlin | TESTS | 52 | 576 | 26931200 | 1700 | |
54939205 | pavlo.liapota | B | June 1, 2019, 4:09 p.m. | OK | Kotlin | TESTS | 52 | 592 | 20480000 | 1700 | |
56183557 | Spheniscine | B | June 28, 2019, 2:39 a.m. | OK | Kotlin | TESTS | 52 | 592 | 27033600 | 1700 | |
54931172 | Protagoras | B | June 1, 2019, 3:29 p.m. | OK | Kotlin | TESTS | 52 | 592 | 27955200 | 1700 | |
55059942 | rh_10 | B | June 3, 2019, 9:33 p.m. | OK | Kotlin | TESTS | 52 | 623 | 0 | 1700 | |
56426768 | og.kostya | B | July 2, 2019, 10 a.m. | OK | Mono C# | TESTS | 52 | 77 | 1536000 | 1700 | |
54929842 | jyk | B | June 1, 2019, 3:23 p.m. | OK | Mono C# | TESTS | 52 | 218 | 44544000 | 1700 | |
54928226 | LateRest | B | June 1, 2019, 3:16 p.m. | OK | Mono C# | TESTS | 52 | 234 | 113561600 | 1700 | |
54950054 | faxse | B | June 1, 2019, 6:51 p.m. | OK | Mono C# | TESTS | 52 | 248 | 45568000 | 1700 | |
62684636 | vjudge1 | B | Oct. 16, 2019, 1:45 p.m. | OK | MS C++ | TESTS | 52 | 93 | 1638400 | 1700 | |
55015944 | vjudge4 | B | June 3, 2019, 12:20 p.m. | OK | MS C++ | TESTS | 52 | 93 | 3174400 | 1700 | |
60072841 | vjudge4 | B | Sept. 5, 2019, 11:41 a.m. | OK | MS C++ | TESTS | 52 | 93 | 3174400 | 1700 | |
60074040 | vjudge4 | B | Sept. 5, 2019, 12:03 p.m. | OK | MS C++ | TESTS | 52 | 93 | 4812800 | 1700 | |
61347594 | vjudge1 | B | Sept. 27, 2019, 6:05 a.m. | OK | MS C++ | TESTS | 52 | 108 | 1638400 | 1700 | |
56641118 | vjudge2 | B | July 7, 2019, 1:49 a.m. | OK | MS C++ | TESTS | 52 | 311 | 1638400 | 1700 | |
56650798 | nuchenghao | B | July 7, 2019, 7:42 a.m. | OK | MS C++ | TESTS | 52 | 311 | 1638400 | 1700 | |
54970041 | Victor_Morozov | B | June 2, 2019, 8:11 a.m. | OK | MS C++ | TESTS | 52 | 311 | 16076800 | 1700 | |
60077241 | vjudge1 | B | Sept. 5, 2019, 12:56 p.m. | OK | MS C++ | TESTS | 52 | 312 | 1638400 | 1700 | |
56641093 | vjudge5 | B | July 7, 2019, 1:48 a.m. | OK | MS C++ | TESTS | 52 | 312 | 1638400 | 1700 | |
54949340 | dkyun | B | June 1, 2019, 6:41 p.m. | OK | MS C++ 2017 | TESTS | 52 | 139 | 1638400 | 1700 | |
54960574 | RANCAFE | B | June 2, 2019, 3:27 a.m. | OK | MS C++ 2017 | TESTS | 52 | 139 | 1638400 | 1700 | |
54931655 | snowdozer | B | June 1, 2019, 3:32 p.m. | OK | MS C++ 2017 | TESTS | 52 | 139 | 3174400 | 1700 | |
54967101 | Jiang142857 | B | June 2, 2019, 6:54 a.m. | OK | MS C++ 2017 | TESTS | 52 | 139 | 3174400 | 1700 | |
55292763 | NPUlzh | B | June 8, 2019, 8:27 a.m. | OK | MS C++ 2017 | TESTS | 52 | 139 | 4812800 | 1700 | |
61417457 | vjudge2 | B | Sept. 28, 2019, 10:43 a.m. | OK | MS C++ 2017 | TESTS | 52 | 140 | 1638400 | 1700 | |
54970374 | liuhb | B | June 2, 2019, 8:20 a.m. | OK | MS C++ 2017 | TESTS | 52 | 140 | 1638400 | 1700 | |
68632064 | AleksanderBalobanov | B | Jan. 12, 2020, 3:32 a.m. | OK | MS C++ 2017 | TESTS | 52 | 140 | 2457600 | 1700 | |
57935911 | ZSTU-2018329621261 | B | July 29, 2019, 10:42 a.m. | OK | MS C++ 2017 | TESTS | 52 | 140 | 3174400 | 1700 | |
54961534 | kkeey | B | June 2, 2019, 4:05 a.m. | OK | MS C++ 2017 | TESTS | 52 | 140 | 3174400 | 1700 | |
54953149 | pashqa88 | B | June 1, 2019, 8:22 p.m. | OK | Node.js | TESTS | 52 | 421 | 40755200 | 1700 | |
54945323 | CyberGoose | B | June 1, 2019, 4:41 p.m. | OK | Ocaml | TESTS | 52 | 171 | 12288000 | 1700 | |
54929312 | mm944 | B | June 1, 2019, 3:21 p.m. | OK | PascalABC.NET | TESTS | 52 | 716 | 3276800 | 1700 | |
54952970 | wangkan2001 | B | June 1, 2019, 8:13 p.m. | OK | PyPy 2 | TESTS | 52 | 202 | 17510400 | 1700 | |
54931955 | wolffd | B | June 1, 2019, 3:33 p.m. | OK | PyPy 2 | TESTS | 52 | 202 | 17510400 | 1700 | |
54932379 | kbagoli1999 | B | June 1, 2019, 3:35 p.m. | OK | PyPy 2 | TESTS | 52 | 218 | 17510400 | 1700 | |
54928002 | shehebe | B | June 1, 2019, 3:15 p.m. | OK | PyPy 2 | TESTS | 52 | 233 | 17305600 | 1700 | |
54952510 | cherry_su | B | June 1, 2019, 7:55 p.m. | OK | PyPy 2 | TESTS | 52 | 234 | 17920000 | 1700 | |
60851348 | yumtam | B | Sept. 19, 2019, 2:09 p.m. | OK | PyPy 2 | TESTS | 52 | 234 | 27136000 | 1700 | |
54953346 | cherry_su | B | June 1, 2019, 8:31 p.m. | OK | PyPy 2 | TESTS | 52 | 249 | 17817600 | 1700 | |
54943062 | raj1307 | B | June 1, 2019, 4:30 p.m. | OK | PyPy 2 | TESTS | 52 | 264 | 24371200 | 1700 | |
54935124 | Mukundan314 | B | June 1, 2019, 3:49 p.m. | OK | PyPy 2 | TESTS | 52 | 265 | 28467200 | 1700 | |
55509624 | sm1ley | B | June 12, 2019, 8:48 p.m. | OK | PyPy 3 | TESTS | 52 | 420 | 24371200 | 1700 | |
55521757 | sm1ley | B | June 13, 2019, 8:53 a.m. | OK | PyPy 3 | TESTS | 52 | 421 | 24371200 | 1700 | |
55008342 | nik-in-au | B | June 3, 2019, 8:48 a.m. | OK | PyPy 3 | TESTS | 52 | 421 | 25088000 | 1700 | |
54928512 | TheProgrammer256 | B | June 1, 2019, 3:17 p.m. | OK | PyPy 3 | TESTS | 52 | 421 | 25088000 | 1700 | |
54952009 | Bovniova | B | June 1, 2019, 7:38 p.m. | OK | PyPy 3 | TESTS | 52 | 436 | 24473600 | 1700 | |
54929353 | algmyr | B | June 1, 2019, 3:21 p.m. | OK | PyPy 3 | TESTS | 52 | 436 | 24883200 | 1700 | |
54951113 | nexus.chebykin | B | June 1, 2019, 7:14 p.m. | OK | PyPy 3 | TESTS | 52 | 436 | 25702400 | 1700 | |
55081612 | D_J_Z | B | June 4, 2019, 10:57 a.m. | OK | PyPy 3 | TESTS | 52 | 451 | 31436800 | 1700 | |
54982687 | tiwariayush | B | June 2, 2019, 1:59 p.m. | OK | PyPy 3 | TESTS | 52 | 452 | 24985600 | 1700 | |
54935397 | _oshhh_ | B | June 1, 2019, 3:50 p.m. | OK | PyPy 3 | TESTS | 52 | 452 | 25702400 | 1700 | |
55510641 | arman.t | B | June 12, 2019, 10:02 p.m. | OK | Python 2 | TESTS | 52 | 436 | 15360000 | 1700 | |
54967641 | sinianluoye | B | June 2, 2019, 7:08 a.m. | OK | Python 2 | TESTS | 52 | 498 | 15257600 | 1700 | |
54964225 | anshuman16423 | B | June 2, 2019, 5:35 a.m. | OK | Python 2 | TESTS | 52 | 560 | 15257600 | 1700 | |
54933154 | foreverdiv3 | B | June 1, 2019, 3:39 p.m. | OK | Python 2 | TESTS | 52 | 576 | 15360000 | 1700 | |
55173148 | king7699 | B | June 5, 2019, 5:35 p.m. | OK | Python 3 | TESTS | 52 | 311 | 20889600 | 1700 | |
55057749 | Russell_Emerine | B | June 3, 2019, 7:54 p.m. | OK | Python 3 | TESTS | 52 | 311 | 20889600 | 1700 | |
55665372 | deadguy | B | June 17, 2019, 3:06 a.m. | OK | Python 3 | TESTS | 52 | 342 | 20787200 | 1700 | |
54965386 | MingDee | B | June 2, 2019, 6:11 a.m. | OK | Python 3 | TESTS | 52 | 342 | 20889600 | 1700 | |
54998993 | KanhuKeNanu | B | June 3, 2019, 2:55 a.m. | OK | Python 3 | TESTS | 52 | 343 | 20480000 | 1700 | |
54966167 | MingDee | B | June 2, 2019, 6:31 a.m. | OK | Python 3 | TESTS | 52 | 358 | 20889600 | 1700 | |
55505916 | the_white_devil | B | June 12, 2019, 5:52 p.m. | OK | Python 3 | TESTS | 52 | 358 | 22016000 | 1700 | |
54950194 | PrateekAgnihotri | B | June 1, 2019, 6:53 p.m. | OK | Python 3 | TESTS | 52 | 373 | 20889600 | 1700 | |
54932815 | echikawa | B | June 1, 2019, 3:37 p.m. | OK | Python 3 | TESTS | 52 | 373 | 20889600 | 1700 | |
54967871 | Bin4ryGh0st | B | June 2, 2019, 7:15 a.m. | OK | Python 3 | TESTS | 52 | 390 | 23347200 | 1700 | |
54931784 | rinzu | B | June 1, 2019, 3:32 p.m. | OK | Ruby | TESTS | 52 | 701 | 37478400 | 1700 | |
66264776 | tuna_salad | B | Dec. 4, 2019, 9:57 a.m. | OK | Rust | TESTS | 52 | 62 | 10342400 | 1700 |
Back to search problems