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 |
|---|---|---|---|---|---|---|
| 191 | Codeforces Round 121 (Div. 1) | FINISHED | False | 7200 | 438359385 | May 27, 2012, 3:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 392 ) | D | Metro Scheme | PROGRAMMING | graphs greedy | 2800 |
Berland is very concerned with privacy, so almost all plans and blueprints are secret. However, a spy of the neighboring state managed to steal the Bertown subway scheme. The Bertown Subway has n stations, numbered from 1 to n , and m bidirectional tunnels connecting them. All Bertown Subway consists of lines. To be more precise, there are two types of lines: circular and radial. A radial line is a sequence of stations v 1 , ..., v k ( k > 1) , where stations v i and v i + 1 ( i < k ) are connected by a tunnel and no station occurs in the line more than once ( v i ≠ v j for i ≠ j ). A loop line is a series of stations, v 1 , ..., v k ( k > 2) , where stations v i и v i + 1 are connected by a tunnel. In addition, stations v 1 and v k are also connected by a tunnel. No station is occurs in the loop line more than once. Note that a single station can be passed by any number of lines. According to Berland standards, there can't be more than one tunnel between two stations and each tunnel belongs to exactly one line. Naturally, each line has at least one tunnel. Between any two stations there is the way along the subway tunnels. In addition, in terms of graph theory, a subway is a vertex cactus: if we consider the subway as a graph in which the stations are the vertexes and the edges are tunnels, then each vertex lies on no more than one simple cycle. Unfortunately, scheme, stolen by the spy, had only the stations and the tunnels. It was impossible to determine to which line every tunnel corresponds. But to sabotage successfully, the spy needs to know what minimum and maximum number of lines may be in the Bertown subway. Help him! The first line contains two integers n and m ( 1 ≤ n ≤ 10 5 , 0 ≤ m ≤ 3·10 5 ) — the number of stations and the number of tunnels, correspondingly. Each of the next m lines contain two integers — the numbers of stations connected by the corresponding tunnel. The stations are numbered with integers from 1 to n . It is guaranteed that t |
| Разбор Codeforces Round #121 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2608217 | luogan | D | Nov. 21, 2012, 3:02 a.m. | OK | FPC | TESTS | 61 | 78 | 1228800 | 2800 | |
| 1733471 | blackapple | D | May 28, 2012, 6:13 a.m. | OK | FPC | TESTS | 61 | 80 | 2355200 | 2800 | |
| 1921087 | superpear | D | July 22, 2012, 3:08 a.m. | OK | FPC | TESTS | 61 | 80 | 3174400 | 2800 | |
| 1736693 | zanoes | D | May 28, 2012, 1:33 p.m. | OK | FPC | TESTS | 61 | 90 | 21299200 | 2800 | |
| 2866982 | Leo_Yu | D | Jan. 2, 2013, 3:54 p.m. | OK | GNU C++ | TESTS | 61 | 31 | 7372800 | 2800 | |
| 2309587 | duzfan | D | Oct. 7, 2012, 3:43 a.m. | OK | GNU C++ | TESTS | 61 | 46 | 5734400 | 2800 | |
| 2875437 | shyoshyohw1 | D | Jan. 5, 2013, 3:12 p.m. | OK | GNU C++ | TESTS | 61 | 46 | 7270400 | 2800 | |
| 2878286 | zwt395081716 | D | Jan. 6, 2013, 12:34 p.m. | OK | GNU C++ | TESTS | 61 | 62 | 1638400 | 2800 | |
| 2877123 | qquartz | D | Jan. 6, 2013, 8:39 a.m. | OK | GNU C++ | TESTS | 61 | 62 | 3584000 | 2800 | |
| 2910911 | kmxyvb | D | Jan. 13, 2013, 11:20 a.m. | OK | GNU C++ | TESTS | 61 | 62 | 6246400 | 2800 | |
| 40991215 | ReaLNero1 | D | July 31, 2018, 12:29 a.m. | OK | GNU C++ | TESTS | 61 | 62 | 7372800 | 2800 | |
| 2771899 | dhh1995 | D | Dec. 16, 2012, 6:45 a.m. | OK | GNU C++ | TESTS | 61 | 62 | 12902400 | 2800 | |
| 2862502 | anmtcel | D | Jan. 1, 2013, 4:21 a.m. | OK | GNU C++ | TESTS | 61 | 62 | 14848000 | 2800 | |
| 27794622 | laofudasuan | D | June 15, 2017, 1:32 p.m. | OK | GNU C++ | TESTS | 61 | 62 | 15462400 | 2800 | |
| 2805391 | bakabakashyoshyo | D | Dec. 22, 2012, 5:16 a.m. | OK | GNU C++0x | TESTS | 61 | 31 | 7270400 | 2800 | |
| 3365584 | UESTC_ElemeNtLz | D | March 21, 2013, 1:46 p.m. | OK | GNU C++0x | TESTS | 61 | 93 | 3481600 | 2800 | |
| 4103140 | harhrayr | D | July 19, 2013, 7:45 a.m. | OK | GNU C++0x | TESTS | 61 | 109 | 7475200 | 2800 | |
| 2749544 | llj_bash | D | Dec. 11, 2012, 5:17 a.m. | OK | GNU C++0x | TESTS | 61 | 140 | 3379200 | 2800 | |
| 5816946 | yosupo | D | Jan. 27, 2014, 4:40 a.m. | OK | GNU C++0x | TESTS | 61 | 154 | 8396800 | 2800 | |
| 9818687 | zxc901 | D | Feb. 13, 2015, 4:59 p.m. | OK | GNU C++0x | TESTS | 61 | 156 | 3379200 | 2800 | |
| 2675782 | apia | D | Nov. 29, 2012, 7:18 a.m. | OK | GNU C++0x | TESTS | 61 | 156 | 3379200 | 2800 | |
| 7927991 | piob | D | Sept. 23, 2014, 2:43 p.m. | OK | GNU C++0x | TESTS | 61 | 186 | 3686400 | 2800 | |
| 2550252 | roosephu | D | Nov. 13, 2012, 2:55 a.m. | OK | GNU C++0x | TESTS | 61 | 234 | 11571200 | 2800 | |
| 2848956 | CMHJT | D | Dec. 28, 2012, 12:21 p.m. | OK | GNU C++0x | TESTS | 61 | 265 | 12902400 | 2800 | |
| 50595266 | vjudge1 | D | Feb. 28, 2019, 9:47 a.m. | OK | GNU C++11 | TESTS | 61 | 92 | 11571200 | 2800 | |
| 54966799 | SoiMae | D | June 2, 2019, 6:47 a.m. | OK | GNU C++11 | TESTS | 61 | 92 | 18636800 | 2800 | |
| 53864278 | cuizhuyefei | D | May 8, 2019, 1:38 a.m. | OK | GNU C++11 | TESTS | 61 | 92 | 25907200 | 2800 | |
| 42307634 | xuzhiyuan | D | Aug. 31, 2018, 12:20 p.m. | OK | GNU C++11 | TESTS | 61 | 92 | 76390400 | 2800 | |
| 31470705 | zhangzy | D | Oct. 18, 2017, 6:40 a.m. | OK | GNU C++11 | TESTS | 61 | 122 | 13721600 | 2800 | |
| 42314671 | luogu_bot2 | D | Aug. 31, 2018, 4:31 p.m. | OK | GNU C++11 | TESTS | 61 | 122 | 68505600 | 2800 | |
| 51487837 | xielinhan | D | March 19, 2019, 2:19 p.m. | OK | GNU C++11 | TESTS | 61 | 124 | 3379200 | 2800 | |
| 50608121 | cjy2003 | D | Feb. 28, 2019, 3:33 p.m. | OK | GNU C++11 | TESTS | 61 | 124 | 6860800 | 2800 | |
| 54977686 | SoiMae | D | June 2, 2019, 11:36 a.m. | OK | GNU C++11 | TESTS | 61 | 124 | 8601600 | 2800 | |
| 54996273 | SoiMae | D | June 3, 2019, 12:09 a.m. | OK | GNU C++11 | TESTS | 61 | 124 | 28262400 | 2800 | |
| 32088120 | LiChenKoh | D | Nov. 6, 2017, 6:11 a.m. | OK | GNU C++14 | TESTS | 61 | 92 | 9932800 | 2800 | |
| 27141971 | RemiliaScarlet | D | May 15, 2017, 5:45 p.m. | OK | GNU C++14 | TESTS | 61 | 156 | 3993600 | 2800 | |
| 23669954 | Ali.Pi | D | Jan. 9, 2017, 7:35 p.m. | OK | GNU C++14 | TESTS | 61 | 156 | 10240000 | 2800 | |
| 34288737 | Cyanic | D | Jan. 19, 2018, 1:31 a.m. | OK | GNU C++14 | TESTS | 61 | 186 | 5427200 | 2800 | |
| 42970742 | WesternBoy | D | Sept. 17, 2018, 6:05 a.m. | OK | GNU C++14 | TESTS | 61 | 186 | 5939200 | 2800 | |
| 35957026 | wfj_2048 | D | March 5, 2018, 6:02 a.m. | OK | GNU C++14 | TESTS | 61 | 186 | 27033600 | 2800 | |
| 67273303 | ElangBondol | D | Dec. 20, 2019, 9:12 a.m. | OK | GNU C++14 | TESTS | 61 | 218 | 10444800 | 2800 | |
| 35171626 | Navick | D | Feb. 12, 2018, 7:41 a.m. | OK | GNU C++14 | TESTS | 61 | 218 | 19456000 | 2800 | |
| 33498528 | ei133333 | D | Dec. 22, 2017, 8:45 a.m. | OK | GNU C++14 | TESTS | 61 | 624 | 5529600 | 2800 | |
| 68583667 | hjk1030 | D | Jan. 11, 2020, 10:42 a.m. | OK | GNU C++17 | TESTS | 61 | 186 | 3891200 | 2800 | |
| 44843342 | ruo | D | Oct. 25, 2018, 1:34 p.m. | OK | GNU C++17 | TESTS | 61 | 186 | 8601600 | 2800 | |
| 58435244 | Benq | D | Aug. 7, 2019, 1:35 p.m. | OK | GNU C++17 | TESTS | 61 | 216 | 5120000 | 2800 | |
| 50596188 | vjudge2 | D | Feb. 28, 2019, 10:23 a.m. | OK | GNU C++17 | TESTS | 61 | 218 | 5324800 | 2800 | |
| 50596175 | dxd666 | D | Feb. 28, 2019, 10:22 a.m. | OK | GNU C++17 | TESTS | 61 | 218 | 5324800 | 2800 | |
| 2756759 | qiandichen | D | Dec. 13, 2012, 6:48 a.m. | OK | Java 7 | TESTS | 61 | 234 | 512000 | 2800 | |
| 50667502 | vjudge1 | D | March 2, 2019, 5:12 a.m. | OK | MS C++ | TESTS | 61 | 124 | 6656000 | 2800 | |
| 1730058 | al13n | D | May 27, 2012, 4:55 p.m. | OK | MS C++ | TESTS | 61 | 420 | 7987200 | 2800 | |
| 67495009 | StrickenMaple05 | D | Dec. 23, 2019, 9:53 p.m. | OK | MS C++ 2017 | TESTS | 61 | 218 | 3379200 | 2800 |
Back to search problems