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 |
|---|---|---|---|---|---|---|
| 685 | Codeforces Round 359 (Div. 1) | FINISHED | False | 7200 | 309705923 | June 23, 2016, 4:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 609 ) | E | Travelling Through the Snow Queen's Kingdom | PROGRAMMING | bitmasks brute force divide and conquer graphs | 2700 |
Gerda is travelling to the palace of the Snow Queen. The road network consists of n intersections and m bidirectional roads. Roads are numbered from 1 to m . Snow Queen put a powerful spell on the roads to change the weather conditions there. Now, if Gerda steps on the road i at the moment of time less or equal to i , she will leave the road exactly at the moment i . In case she steps on the road i at the moment of time greater than i , she stays there forever. Gerda starts at the moment of time l at the intersection number s and goes to the palace of the Snow Queen, located at the intersection number t . Moreover, she has to be there at the moment r (or earlier), before the arrival of the Queen. Given the description of the road network, determine for q queries l i , r i , s i and t i if it's possible for Gerda to get to the palace on time. The first line of the input contains integers n , m and q ( 2 ≤ n ≤ 1000 , 1 ≤ m , q ≤ 200 000 ) — the number of intersections in the road network of Snow Queen's Kingdom, the number of roads and the number of queries you have to answer. The i -th of the following m lines contains the description of the road number i . The description consists of two integers v i and u i ( 1 ≤ v i , u i ≤ n , v i ≠ u i ) — the indices of the intersections connected by the i -th road. It's possible to get both from v i to u i and from u i to v i using only this road. Each pair of intersection may appear several times, meaning there are several roads connecting this pair. Last q lines contain the queries descriptions. Each of them consists of four integers l i , r i , s i and t i ( 1 ≤ l i ≤ r i ≤ m , 1 ≤ s i , t i ≤ n , s i ≠ t i ) — the moment of time Gerda starts her journey, the last moment of time she is allowed to arrive to the palace, the index of the starting intersection and the index of the intersection where palace is located. For each query print " Yes " (without quotes) if Gerda can be at the Snow Queen palace on time (not l |
| Codeforces Round #359 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 26250714 | zhan8855 | E | April 10, 2017, 10:30 a.m. | OK | GNU C++ | TESTS | 47 | 312 | 24780800 | 2700 | |
| 25809823 | jiyutian | E | March 26, 2017, 3:21 a.m. | OK | GNU C++ | TESTS | 47 | 327 | 12390400 | 2700 | |
| 25809683 | jiyutian | E | March 26, 2017, 3:08 a.m. | OK | GNU C++ | TESTS | 47 | 327 | 12390400 | 2700 | |
| 26097527 | yylidiw | E | April 3, 2017, 11:05 a.m. | OK | GNU C++ | TESTS | 47 | 342 | 11980800 | 2700 | |
| 22826486 | Starry | E | Dec. 9, 2016, 5:51 a.m. | OK | GNU C++ | TESTS | 47 | 342 | 16691200 | 2700 | |
| 40984254 | ReaLNero1 | E | July 30, 2018, 7:16 p.m. | OK | GNU C++ | TESTS | 47 | 343 | 10342400 | 2700 | |
| 18784109 | jasonvictoryan | E | June 29, 2016, 1:50 p.m. | OK | GNU C++ | TESTS | 47 | 358 | 10649600 | 2700 | |
| 25809697 | jiyutian | E | March 26, 2017, 3:09 a.m. | OK | GNU C++ | TESTS | 47 | 358 | 12390400 | 2700 | |
| 18826496 | rqgao2014 | E | June 30, 2016, 3:26 p.m. | OK | GNU C++ | TESTS | 47 | 436 | 10444800 | 2700 | |
| 25128751 | MemS | E | March 1, 2017, 4:26 p.m. | OK | GNU C++ | TESTS | 47 | 436 | 12595200 | 2700 | |
| 57306372 | Morning_Glory | E | July 19, 2019, 4:05 a.m. | OK | GNU C++11 | TESTS | 47 | 311 | 84275200 | 2700 | |
| 37040439 | zhouyuyang | E | April 7, 2018, 6:49 a.m. | OK | GNU C++11 | TESTS | 47 | 327 | 13824000 | 2700 | |
| 57178601 | luogu_bot2 | E | July 17, 2019, 6:28 a.m. | OK | GNU C++11 | TESTS | 47 | 327 | 21913600 | 2700 | |
| 57306471 | Morning_Glory | E | July 19, 2019, 4:09 a.m. | OK | GNU C++11 | TESTS | 47 | 327 | 84275200 | 2700 | |
| 57306198 | Morning_Glory | E | July 19, 2019, 3:57 a.m. | OK | GNU C++11 | TESTS | 47 | 327 | 84275200 | 2700 | |
| 57178628 | vjudge5 | E | July 17, 2019, 6:29 a.m. | OK | GNU C++11 | TESTS | 47 | 342 | 21913600 | 2700 | |
| 51460700 | DeadPillow | E | March 18, 2019, 7:32 p.m. | OK | GNU C++11 | TESTS | 47 | 358 | 15769600 | 2700 | |
| 57880360 | lopare | E | July 28, 2019, 7:29 a.m. | OK | GNU C++11 | TESTS | 47 | 373 | 10444800 | 2700 | |
| 57815030 | py_ultron | E | July 26, 2019, 7:14 p.m. | OK | GNU C++11 | TESTS | 47 | 374 | 10444800 | 2700 | |
| 54503135 | WOSHIGEPACHONG2 | E | May 23, 2019, 12:47 a.m. | OK | GNU C++11 | TESTS | 47 | 374 | 15769600 | 2700 | |
| 56979668 | hahawang | E | July 13, 2019, 1:27 p.m. | OK | GNU C++14 | TESTS | 47 | 405 | 10444800 | 2700 | |
| 45979445 | zDule98 | E | Nov. 19, 2018, 9:18 p.m. | OK | GNU C++14 | TESTS | 47 | 436 | 17203200 | 2700 | |
| 60306773 | DimmyT | E | Sept. 9, 2019, 2:11 p.m. | OK | GNU C++14 | TESTS | 47 | 467 | 30515200 | 2700 | |
| 55969508 | Hoshi08 | E | June 23, 2019, 1:58 p.m. | OK | GNU C++14 | TESTS | 47 | 482 | 14438400 | 2700 | |
| 35383669 | cyz666 | E | Feb. 17, 2018, 6:33 a.m. | OK | GNU C++14 | TESTS | 47 | 483 | 12390400 | 2700 | |
| 24461092 | -Morass- | E | Feb. 6, 2017, 1:51 a.m. | OK | GNU C++14 | TESTS | 47 | 498 | 12390400 | 2700 | |
| 57170564 | vjudge2 | E | July 17, 2019, 2:43 a.m. | OK | GNU C++14 | TESTS | 47 | 514 | 14438400 | 2700 | |
| 45979400 | zDule98 | E | Nov. 19, 2018, 9:15 p.m. | OK | GNU C++14 | TESTS | 47 | 514 | 17203200 | 2700 | |
| 39348242 | Namnamseo | E | June 18, 2018, 6:10 a.m. | OK | GNU C++14 | TESTS | 47 | 545 | 38195200 | 2700 | |
| 57169247 | yyxmy | E | July 17, 2019, 2 a.m. | OK | GNU C++14 | TESTS | 47 | 545 | 76288000 | 2700 | |
| 64787264 | ffao | E | Nov. 13, 2019, 9:37 a.m. | OK | GNU C++17 | TESTS | 47 | 374 | 10444800 | 2700 | |
| 64787397 | ffao | E | Nov. 13, 2019, 9:40 a.m. | OK | GNU C++17 | TESTS | 47 | 374 | 10649600 | 2700 | |
| 65235439 | abid-rex | E | Nov. 17, 2019, 7:01 a.m. | OK | GNU C++17 | TESTS | 47 | 390 | 10649600 | 2700 | |
| 54908756 | Grzmot | E | June 1, 2019, 10:03 a.m. | OK | GNU C++17 | TESTS | 47 | 436 | 15360000 | 2700 | |
| 57306465 | vjudge2 | E | July 19, 2019, 4:08 a.m. | OK | GNU C++17 | TESTS | 47 | 529 | 84275200 | 2700 | |
| 41523040 | Dalgerok | E | Aug. 12, 2018, 10:13 a.m. | OK | GNU C++17 | TESTS | 47 | 545 | 14438400 | 2700 | |
| 57178428 | Roal_L | E | July 17, 2019, 6:25 a.m. | OK | GNU C++17 | TESTS | 47 | 545 | 21913600 | 2700 | |
| 57817921 | Benq | E | July 26, 2019, 8:50 p.m. | OK | GNU C++17 | TESTS | 47 | 560 | 15974400 | 2700 | |
| 43946538 | NiceBaseballCoder | E | Oct. 7, 2018, 1:57 p.m. | OK | GNU C++17 | TESTS | 47 | 561 | 10444800 | 2700 | |
| 52446580 | Shayan.P | E | April 7, 2019, 8:14 a.m. | OK | GNU C++17 | TESTS | 47 | 576 | 9932800 | 2700 | |
| 18752853 | IgorKoval | E | June 27, 2016, 1:17 p.m. | OK | Java 8 | TESTS | 47 | 670 | 4710400 | 2700 | |
| 18752885 | IgorKoval | E | June 27, 2016, 1:19 p.m. | OK | Java 8 | TESTS | 47 | 763 | 4710400 | 2700 | |
| 18687281 | pashka | E | June 23, 2016, 7:42 p.m. | OK | Java 8 | TESTS | 47 | 872 | 5734400 | 2700 | |
| 18678515 | Petr | E | June 23, 2016, 5:28 p.m. | OK | Java 8 | TESTS | 47 | 1153 | 15155200 | 2700 | |
| 22120241 | Kaban-5 | E | Nov. 8, 2016, 8:27 p.m. | OK | Java 8 | TESTS | 47 | 1341 | 38400000 | 2700 | |
| 18778262 | Los_Angelos_Laycurse | E | June 29, 2016, 6:31 a.m. | OK | MS C++ | TESTS | 47 | 889 | 9932800 | 2700 | |
| 24111979 | sdya | E | Jan. 25, 2017, 1:07 p.m. | OK | MS C++ | TESTS | 47 | 1201 | 18329600 | 2700 | |
| 57145848 | vjudge2 | E | July 16, 2019, 12:54 p.m. | OK | MS C++ | TESTS | 47 | 1341 | 36147200 | 2700 |
Back to search problems