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 |
---|---|---|---|---|---|---|
1635 | Codeforces Round 772 (Div. 2) | FINISHED | False | 7200 | 86455499 | Feb. 20, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2254 ) | E | Cars | PROGRAMMING | constructive algorithms dfs and similar ds graphs greedy sortings |
B"There are n cars on a coordinate axis OX . Each car is located at an integer point initially and no two cars are located at the same point. Also, each car is oriented either left or right, and they can move at any constant positive speed in that direction at any moment. More formally, we can describe the i -th car with a letter and an integer: its orientation ori_i and its location x_i . If ori_i = L , then x_i is decreasing at a constant rate with respect to time. Similarly, if ori_i = R , then x_i is increasing at a constant rate with respect to time. We call two cars irrelevant if they never end up in the same point regardless of their speed. In other words, they won't share the same coordinate at any moment. We call two cars destined if they always end up in the same point regardless of their speed. In other words, they must share the same coordinate at some moment. Unfortunately, we lost all information about our cars, but we do remember m relationships. There are two types of relationships: 1 i j -- i -th car and j -th car are irrelevant. 2 i j -- i -th car and j -th car are destined. Restore the orientations and the locations of the cars satisfying the relationships, or report that it is impossible. If there are multiple solutions, you can output any. Note that if two cars share the same coordinate, they will intersect, but at the same moment they will continue their movement in their directions. The first line contains two integers, n and m (2 <= q n <= q 2 cdot 10^5; 1 <= q m <= q min(2 cdot 10^5, frac{n(n-1)}{2}) -- the number of cars and the number of restrictions respectively. Each of the next m lines contains three integers, type , i , and j (1 <= q type <= q 2; 1 <= q i,j <= q n; i xe2 x89 xa0j) . If type = 1 , i -th car and j -th car are irrelevant. Otherwise, i -th "... |
Codeforces Round #772 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
147094331 | chro4896 | E | Feb. 20, 2022, 4:26 p.m. | OK | GNU C11 | TESTS | 57 | 1731 | 17715200 | ||
147129224 | aaa12321 | E | Feb. 21, 2022, 2:30 a.m. | OK | GNU C++14 | TESTS | 57 | 186 | 13209600 | ||
147128117 | XZC__Bobby | E | Feb. 21, 2022, 2:01 a.m. | OK | GNU C++14 | TESTS | 57 | 187 | 13926400 | ||
147096376 | YangTY | E | Feb. 20, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 57 | 187 | 39833600 | ||
147138511 | YangTY | E | Feb. 21, 2022, 5:06 a.m. | OK | GNU C++14 | TESTS | 57 | 187 | 39833600 | ||
147137356 | gzchenben | E | Feb. 21, 2022, 4:49 a.m. | OK | GNU C++14 | TESTS | 57 | 202 | 12697600 | ||
147129573 | zyl19416 | E | Feb. 21, 2022, 2:39 a.m. | OK | GNU C++14 | TESTS | 57 | 202 | 17612800 | ||
147103063 | AC-OIer | E | Feb. 20, 2022, 5:57 p.m. | OK | GNU C++14 | TESTS | 57 | 218 | 14131200 | ||
147129158 | ACOIer | E | Feb. 21, 2022, 2:29 a.m. | OK | GNU C++14 | TESTS | 57 | 218 | 14131200 | ||
147133155 | laozhu1234 | E | Feb. 21, 2022, 3:37 a.m. | OK | GNU C++14 | TESTS | 57 | 218 | 23654400 | ||
147133264 | laozhu1234 | E | Feb. 21, 2022, 3:39 a.m. | OK | GNU C++14 | TESTS | 57 | 218 | 23654400 | ||
147126043 | Chao_zi | E | Feb. 21, 2022, 12:53 a.m. | OK | GNU C++17 | TESTS | 57 | 171 | 22016000 | ||
147093613 | egret | E | Feb. 20, 2022, 4:24 p.m. | OK | GNU C++17 | TESTS | 57 | 218 | 14336000 | ||
147131581 | Irressey | E | Feb. 21, 2022, 3:05 a.m. | OK | GNU C++17 | TESTS | 57 | 233 | 19763200 | ||
147101623 | Bobrosoft | E | Feb. 20, 2022, 5:49 p.m. | OK | GNU C++17 | TESTS | 57 | 234 | 12697600 | ||
147130950 | David9 | E | Feb. 21, 2022, 2:52 a.m. | OK | GNU C++17 | TESTS | 57 | 234 | 13926400 | ||
147095182 | Minion123 | E | Feb. 20, 2022, 4:28 p.m. | OK | GNU C++17 | TESTS | 57 | 248 | 17203200 | ||
147137731 | Leonard | E | Feb. 21, 2022, 4:54 a.m. | OK | GNU C++17 | TESTS | 57 | 249 | 19148800 | ||
147106980 | SakuraiMomoka | E | Feb. 20, 2022, 6:27 p.m. | OK | GNU C++17 | TESTS | 57 | 249 | 22425600 | ||
147136339 | itish | E | Feb. 21, 2022, 4:33 a.m. | OK | GNU C++17 | TESTS | 57 | 249 | 23552000 | ||
147124331 | mohamedeltair | E | Feb. 20, 2022, 11:53 p.m. | OK | GNU C++17 | TESTS | 57 | 264 | 14745600 | ||
147127176 | CharlesWuQiushi | E | Feb. 21, 2022, 1:32 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 217 | 25497600 | ||
147128651 | ImHubery | E | Feb. 21, 2022, 2:15 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 233 | 26214400 | ||
147126683 | fr1234 | E | Feb. 21, 2022, 1:15 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 249 | 20377600 | ||
147126162 | froggyzhang | E | Feb. 21, 2022, 12:57 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 249 | 24268800 | ||
147126985 | stoq_ | E | Feb. 21, 2022, 1:25 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 264 | 22937600 | ||
147111822 | moo. | E | Feb. 20, 2022, 7:22 p.m. | OK | GNU C++17 (64) | TESTS | 57 | 264 | 32870400 | ||
147093365 | fvogel | E | Feb. 20, 2022, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 57 | 265 | 23449600 | ||
147141960 | virt_contest_taker | E | Feb. 21, 2022, 5:52 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 265 | 28672000 | ||
147139553 | gqf123 | E | Feb. 21, 2022, 5:20 a.m. | OK | GNU C++17 (64) | TESTS | 57 | 265 | 30720000 | ||
147107239 | Hyado | E | Feb. 20, 2022, 6:29 p.m. | OK | GNU C++17 (64) | TESTS | 57 | 280 | 26828800 | ||
147135666 | Followall | E | Feb. 21, 2022, 4:22 a.m. | OK | GNU C++20 (64) | TESTS | 57 | 171 | 22835200 | ||
147103226 | Megurine | E | Feb. 20, 2022, 5:57 p.m. | OK | GNU C++20 (64) | TESTS | 57 | 187 | 13414400 | ||
147105999 | kaiboy | E | Feb. 20, 2022, 6:18 p.m. | OK | GNU C++20 (64) | TESTS | 57 | 202 | 25395200 | ||
147135406 | Warriors_Curry | E | Feb. 21, 2022, 4:18 a.m. | OK | GNU C++20 (64) | TESTS | 57 | 202 | 28467200 | ||
147131109 | cosenza | E | Feb. 21, 2022, 2:55 a.m. | OK | GNU C++20 (64) | TESTS | 57 | 217 | 24268800 | ||
147129692 | keenlf | E | Feb. 21, 2022, 2:42 a.m. | OK | GNU C++20 (64) | TESTS | 57 | 217 | 34816000 | ||
147107943 | Nopenope | E | Feb. 20, 2022, 6:36 p.m. | OK | GNU C++20 (64) | TESTS | 57 | 218 | 21504000 | ||
147095249 | flukehn | E | Feb. 20, 2022, 4:28 p.m. | OK | GNU C++20 (64) | TESTS | 57 | 218 | 24576000 | ||
147138466 | Gurban | E | Feb. 21, 2022, 5:05 a.m. | OK | GNU C++20 (64) | TESTS | 57 | 218 | 34611200 | ||
147127215 | Zhora_.004 | E | Feb. 21, 2022, 1:33 a.m. | OK | GNU C++20 (64) | TESTS | 57 | 233 | 18841600 | ||
147091924 | clyring | E | Feb. 20, 2022, 4:19 p.m. | OK | Haskell | TESTS | 57 | 795 | 111411200 | ||
147126196 | 666EGOR777 | E | Feb. 21, 2022, 12:59 a.m. | OK | Java 11 | TESTS | 57 | 1013 | 80793600 | ||
147110316 | Restricted | E | Feb. 20, 2022, 7:02 p.m. | OK | Java 11 | TESTS | 57 | 1107 | 105676800 | ||
147141368 | gawsfbet | E | Feb. 21, 2022, 5:44 a.m. | OK | Java 11 | TESTS | 57 | 1185 | 71168000 | ||
147103561 | Dukkha | E | Feb. 20, 2022, 5:59 p.m. | OK | Java 11 | TESTS | 57 | 1216 | 33792000 | ||
147117215 | dzhi | E | Feb. 20, 2022, 8:47 p.m. | OK | Java 11 | TESTS | 57 | 1310 | 124518400 | ||
147104046 | shivakumar.nannan | E | Feb. 20, 2022, 6:03 p.m. | OK | Java 11 | TESTS | 57 | 1357 | 72499200 | ||
147095598 | Mathematiker | E | Feb. 20, 2022, 4:29 p.m. | OK | Java 11 | TESTS | 57 | 1606 | 85913600 | ||
147104530 | koboshi | E | Feb. 20, 2022, 6:06 p.m. | OK | Kotlin 1.5 | TESTS | 57 | 1138 | 67481600 | ||
147107881 | mircea85 | E | Feb. 20, 2022, 6:35 p.m. | OK | Mono C# | TESTS | 57 | 1497 | 68608000 | ||
147101446 | r57shell | E | Feb. 20, 2022, 5:48 p.m. | OK | MS C++ 2017 | TESTS | 57 | 390 | 20582400 | ||
147110837 | fatvlad_ | E | Feb. 20, 2022, 7:09 p.m. | OK | MS C++ 2017 | TESTS | 57 | 639 | 12902400 | ||
147091042 | zycrdfz | E | Feb. 20, 2022, 4:17 p.m. | OK | MS C++ 2017 | TESTS | 57 | 1278 | 16998400 | ||
147104082 | eepsilon | E | Feb. 20, 2022, 6:03 p.m. | OK | PyPy 3 | TESTS | 57 | 935 | 67686400 | ||
147094201 | misorin | E | Feb. 20, 2022, 4:25 p.m. | OK | PyPy 3 | TESTS | 57 | 1201 | 64204800 | ||
147093452 | mkawa2 | E | Feb. 20, 2022, 4:24 p.m. | OK | PyPy 3 | TESTS | 57 | 1309 | 68710400 | ||
147118804 | whatshisbucket | E | Feb. 20, 2022, 9:19 p.m. | OK | PyPy 3 | TESTS | 57 | 1575 | 62873600 | ||
147092165 | zii.hrs | E | Feb. 20, 2022, 4:20 p.m. | OK | PyPy 3-64 | TESTS | 57 | 1309 | 98508800 | ||
147112042 | GoatTamer | E | Feb. 20, 2022, 7:25 p.m. | OK | PyPy 3-64 | TESTS | 57 | 1591 | 203980800 | ||
147122809 | plevande | E | Feb. 20, 2022, 11:01 p.m. | OK | PyPy 3-64 | TESTS | 57 | 1653 | 201011200 | ||
147093897 | huikang | E | Feb. 20, 2022, 4:25 p.m. | OK | PyPy 3-64 | TESTS | 57 | 1996 | 180736000 | ||
147104495 | belkka | E | Feb. 20, 2022, 6:06 p.m. | OK | Python 3 | TESTS | 57 | 1996 | 55910400 | ||
147118667 | clause | E | Feb. 20, 2022, 9:17 p.m. | OK | Rust 2021 | TESTS | 57 | 1965 | 42803200 | ||
147127343 | clause | E | Feb. 21, 2022, 1:37 a.m. | OK | Rust 2021 | TESTS | 57 | 1981 | 46899200 |
Back to search problems