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 |
---|---|---|---|---|---|---|
1103 | Codeforces Round 534 (Div. 1) | FINISHED | False | 7200 | 189357923 | Jan. 22, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 863 ) | C | Johnny Solving | PROGRAMMING | constructive algorithms dfs and similar graphs math | 2800 |
B"Today is tuesday, that means there is a dispute in JOHNNY SOLVING team again: they try to understand who is Johnny and who is Solving. That's why guys asked Umnik to help them. Umnik gave guys a connected graph with n vertices without loops and multiedges, such that a degree of any vertex is at least 3 , and also he gave a number 1 <= q k <= q n . Because Johnny is not too smart, he promised to find a simple path with length at least frac{n}{k} in the graph. In reply, Solving promised to find k simple by vertices cycles with representatives, such that: You need to help guys resolve the dispute, for that you need to find a solution for Johnny: a simple path with length at least frac{n}{k} ( n is not necessarily divided by k ), or solution for Solving: k cycles that satisfy all the conditions above. If there is no any solution - print -1 . The first line contains three integers n , m and k ( 1 <= q k <= q n <= q 2.5 cdot 10^5, 1 <= q m <= q 5 cdot 10^5 ) Next m lines describe edges of the graph in format v , u ( 1 <= q v, u <= q n ). It's guaranteed that v neq u and all m pairs are distinct. It's guaranteed that a degree of each vertex is at least 3 . Print PATH in the first line, if you solve problem for Johnny. In the second line print the number of vertices in the path c ( c geq frac{n}{k} ). And in the third line print vertices describing the path in route order. Print CYCLES in the first line, if you solve problem for Solving. In the following lines describe exactly k cycles in the following format: in the first line print the size of the cycle c ( c geq 3 ). In the second line print the cycle in route order. Also, the first vertex in the cycle must be a representative. Print -1 if there is no any solution. The total amount of printed numbers in the output must be at most 10^6 . It's guaranteed,"... |
Codeforces Round #534 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
48757292 | Mikaeel | C | Jan. 22, 2019, 4:21 p.m. | OK | GNU C++11 | TESTS | 181 | 280 | 27340800 | 2800 | |
48752913 | Shef | C | Jan. 22, 2019, 4 p.m. | OK | GNU C++11 | TESTS | 181 | 280 | 30822400 | 2800 | |
48756621 | onjo | C | Jan. 22, 2019, 4:18 p.m. | OK | GNU C++11 | TESTS | 181 | 311 | 28364800 | 2800 | |
48752184 | gisp_zjz | C | Jan. 22, 2019, 3:56 p.m. | OK | GNU C++11 | TESTS | 181 | 311 | 44748800 | 2800 | |
48750924 | dotorya | C | Jan. 22, 2019, 3:51 p.m. | OK | GNU C++11 | TESTS | 181 | 327 | 41369600 | 2800 | |
48742467 | Kalam | C | Jan. 22, 2019, 3:18 p.m. | OK | GNU C++11 | TESTS | 181 | 327 | 45056000 | 2800 | |
48758511 | tqyaaaaang | C | Jan. 22, 2019, 4:27 p.m. | OK | GNU C++11 | TESTS | 181 | 343 | 85401600 | 2800 | |
48755381 | M.Mahdi | C | Jan. 22, 2019, 4:12 p.m. | OK | GNU C++11 | TESTS | 181 | 358 | 25088000 | 2800 | |
48755916 | TrumPence | C | Jan. 22, 2019, 4:14 p.m. | OK | GNU C++11 | TESTS | 181 | 373 | 28876800 | 2800 | |
48760007 | Bodo | C | Jan. 22, 2019, 4:33 p.m. | OK | GNU C++11 | TESTS | 181 | 826 | 37171200 | 2800 | |
48758126 | DmitryGrigorev | C | Jan. 22, 2019, 4:25 p.m. | OK | GNU C++14 | TESTS | 181 | 295 | 15155200 | 2800 | |
48753971 | Eccentricity | C | Jan. 22, 2019, 4:05 p.m. | OK | GNU C++14 | TESTS | 181 | 311 | 20582400 | 2800 | |
48754633 | Motarack | C | Jan. 22, 2019, 4:08 p.m. | OK | GNU C++14 | TESTS | 181 | 327 | 20070400 | 2800 | |
48754013 | amethyst0 | C | Jan. 22, 2019, 4:05 p.m. | OK | GNU C++14 | TESTS | 181 | 327 | 20787200 | 2800 | |
48742130 | aid | C | Jan. 22, 2019, 3:17 p.m. | OK | GNU C++14 | TESTS | 181 | 342 | 23859200 | 2800 | |
48750575 | blatuitorulmlc | C | Jan. 22, 2019, 3:49 p.m. | OK | GNU C++14 | TESTS | 181 | 342 | 41676800 | 2800 | |
48753244 | yashChandnani | C | Jan. 22, 2019, 4:01 p.m. | OK | GNU C++14 | TESTS | 181 | 343 | 27750400 | 2800 | |
48737996 | mnbvmar | C | Jan. 22, 2019, 3:05 p.m. | OK | GNU C++14 | TESTS | 181 | 389 | 39424000 | 2800 | |
48752904 | 4l5n3 | C | Jan. 22, 2019, 4 p.m. | OK | GNU C++14 | TESTS | 181 | 405 | 27955200 | 2800 | |
48752641 | OnionPringles | C | Jan. 22, 2019, 3:58 p.m. | OK | GNU C++14 | TESTS | 181 | 436 | 30924800 | 2800 | |
48751833 | whzzt | C | Jan. 22, 2019, 3:55 p.m. | OK | GNU C++17 | TESTS | 181 | 202 | 43724800 | 2800 | |
48748810 | majk | C | Jan. 22, 2019, 3:41 p.m. | OK | GNU C++17 | TESTS | 181 | 311 | 18841600 | 2800 | |
48752841 | blackbori | C | Jan. 22, 2019, 3:59 p.m. | OK | GNU C++17 | TESTS | 181 | 326 | 16896000 | 2800 | |
48751549 | AminAnvari | C | Jan. 22, 2019, 3:54 p.m. | OK | GNU C++17 | TESTS | 181 | 327 | 22220800 | 2800 | |
48753574 | polingy | C | Jan. 22, 2019, 4:03 p.m. | OK | GNU C++17 | TESTS | 181 | 327 | 24064000 | 2800 | |
48749897 | KrK | C | Jan. 22, 2019, 3:46 p.m. | OK | GNU C++17 | TESTS | 181 | 342 | 17408000 | 2800 | |
48742879 | ainta | C | Jan. 22, 2019, 3:20 p.m. | OK | GNU C++17 | TESTS | 181 | 342 | 36454400 | 2800 | |
48749685 | Marcin_smu | C | Jan. 22, 2019, 3:45 p.m. | OK | GNU C++17 | TESTS | 181 | 343 | 30003200 | 2800 | |
48747377 | yosupo | C | Jan. 22, 2019, 3:36 p.m. | OK | GNU C++17 | TESTS | 181 | 358 | 24473600 | 2800 | |
48759324 | Nebuchadnezzar | C | Jan. 22, 2019, 4:30 p.m. | OK | GNU C++17 | TESTS | 181 | 358 | 35430400 | 2800 | |
48744785 | Egor | C | Jan. 22, 2019, 3:26 p.m. | OK | Java 8 | TESTS | 181 | 265 | 42496000 | 2800 |
Back to search problems