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 |
|---|---|---|---|---|---|---|
| 2052 | 2024-2025 ICPC, NERC, Northern Eurasia Finals (Unrated, Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 42157523 | Dec. 15, 2024, 7:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1210 ) | D | DAG Serialization | PROGRAMMING | brute force graphs |
Consider a simple single-bit boolean register that supports two operations: set — sets the register to true if it was false , and returns true ; otherwise, it returns false ; unset — sets the register to false if it was true , and returns true ; otherwise, it returns false . The initial state of the register is false . Suppose there were (n) operations (op_i) (for (1 \le i \le n)) where at most two operations returned true . Also, we are given the partial order of operations as a directed acyclic graph (DAG): an edge (i \rightarrow j) means that (op_i) happened before (op_j). You are asked whether it is possible to put these operations in some linear sequential order that satisfies the given partial order and such that if operations are applied to the register in that order, their results are the same as given. In the first line, you are given an integer (n) — the number of operations ((1 \le n \le 10^5)). In the following (n) lines, you are given operations in the format " type result ", where type is either " set " or " unset " and result is either " true " or " false ". It is guaranteed that at most two operations have " true " results. In the next line, you are given an integer (m) — the number of arcs of the DAG ((0 \le m \le 10^5)). In the following (m) lines, you are given arcs — pairs of integers (a) and (b) ((1 \leq a, b \leq n); (a \neq b)). Each arc indicates that operation (op_a) happened before operation (op_b). Print any linear order of operations that satisfies the DAG constraints and ensures the results of the operations match the ones given in the input. If a correct operation order does not exist, print (-1). |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 296537553 | Bronya_H zrnstnsr __baozii__ | D | Dec. 15, 2024, 8:56 a.m. | OK | C# 10 | TESTS | 223 | 249 | 14028800 | ||
| 296557423 | codeblooded20 sumeet_24 ajaybgunjal | D | Dec. 15, 2024, 11:16 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 140 | 1024000 | ||
| 296532357 | liguanchang | D | Dec. 15, 2024, 8:21 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 140 | 1331200 | ||
| 296536966 | magnified HollwoQ_Pelw TrungNotChung | D | Dec. 15, 2024, 8:51 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 155 | 5734400 | ||
| 296538183 | morphinecode picramide vivan_01 | D | Dec. 15, 2024, 9:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 156 | 1126400 | ||
| 296554306 | MrPizza F_Minor ParthP3 | D | Dec. 15, 2024, 10:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 156 | 2355200 | ||
| 296548394 | 7ms Yufi1210 | D | Dec. 15, 2024, 10:05 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 156 | 3686400 | ||
| 296553688 | nguyenkhacthu violee thiennhan10 | D | Dec. 15, 2024, 10:38 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 156 | 4915200 | ||
| 296532870 | Teamangay mounteverest2004 Spad2e | D | Dec. 15, 2024, 8:25 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 171 | 2867200 | ||
| 296569682 | AshutoshSingh10 | D | Dec. 15, 2024, 12:40 p.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 171 | 3481600 | ||
| 296552910 | bnxcvd Black_King1 | D | Dec. 15, 2024, 10:29 a.m. | OK | C++17 (GCC 7-32) | TESTS | 223 | 171 | 3686400 | ||
| 296579449 | maspy | D | Dec. 15, 2024, 2:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 108 | 3379200 | ||
| 296537810 | Frost_Ice wifi32767 satorimarch | D | Dec. 15, 2024, 8:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 108 | 4096000 | ||
| 296551672 | Mamedov | D | Dec. 15, 2024, 10:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 109 | 3174400 | ||
| 296548341 | Gheal | D | Dec. 15, 2024, 10:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 109 | 24576000 | ||
| 296533570 | hariaakash646 SmolBrain shiven | D | Dec. 15, 2024, 8:31 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 124 | 2252800 | ||
| 296544967 | Sofapuden Temmie | D | Dec. 15, 2024, 9:52 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 124 | 2867200 | ||
| 296545789 | Mohanad_Nahhal FzArK | D | Dec. 15, 2024, 10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 124 | 3993600 | ||
| 296553783 | Ahmed_Salah7 | D | Dec. 15, 2024, 10:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 124 | 5632000 | ||
| 296557699 | Darsh_Jain Avik_07 aastik231205 | D | Dec. 15, 2024, 11:18 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 124 | 6246400 | ||
| 296560923 | vulestamenkovic StefiM d1mk | D | Dec. 15, 2024, 11:48 a.m. | OK | C++20 (GCC 13-64) | TESTS | 223 | 124 | 10854400 | ||
| 296536142 | Nyatl Kolychestiy DPR-pavlin | D | Dec. 15, 2024, 8:44 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 109 | 7270400 | ||
| 296538443 | apostoldaniel854 __v Stegan | D | Dec. 15, 2024, 9:04 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 124 | 1843200 | ||
| 296534947 | lcyxds shleodai | D | Dec. 15, 2024, 8:42 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 124 | 2969600 | ||
| 296562321 | yvbf | D | Dec. 15, 2024, 12:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 124 | 4096000 | ||
| 296772052 | aryan12 | D | Dec. 15, 2024, 9:10 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 124 | 5836800 | ||
| 296543030 | drath10 plAtEaUpUs MadRat_0 | D | Dec. 15, 2024, 9:32 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 124 | 7680000 | ||
| 296544575 | GoogleBot | D | Dec. 15, 2024, 9:48 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 139 | 9216000 | ||
| 296555124 | nakulx1000 anant1223 Redpanda_x | D | Dec. 15, 2024, 10:52 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 140 | 5017600 | ||
| 296554755 | dimachine | D | Dec. 15, 2024, 10:49 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 140 | 6144000 | ||
| 296764887 | bogatrv | D | Dec. 15, 2024, 7:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 223 | 140 | 6246400 | ||
| 296551905 | Schmoov Haksell | D | Dec. 15, 2024, 10:19 a.m. | OK | PyPy 3-64 | TESTS | 223 | 874 | 83456000 | ||
| 296544915 | freak93 | D | Dec. 15, 2024, 9:51 a.m. | OK | Rust 2021 | TESTS | 223 | 171 | 4505600 | ||
| 296567690 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567683 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567661 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567618 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567616 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567602 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567514 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567489 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567455 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 | |||
| 296567446 | D | Dec. 15, 2024, 12:24 p.m. | OK | Unknown | TESTS | 0 | 0 | 0 |
Back to search problems