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 |
|---|---|---|---|---|---|---|
| 2045 | 2024-2025 ICPC Asia Jakarta Regional Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 43462484 | Dec. 1, 2024, 5:05 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 159 ) | L | Buggy DFS | PROGRAMMING | constructive algorithms | 3000 |
You are currently studying a graph traversal algorithm called the Depth First Search (DFS). However, due to a bug, your algorithm is slightly different from the standard DFS. The following is an algorithm for your Buggy DFS (BDFS), assuming the graph has (N) nodes (numbered from (1) to (N)). You realized that the bug made the algorithm slower than standard DFS, which can be investigated by the return value of the function BDFS() . To investigate the behavior of this algorithm, you want to make some test cases by constructing an undirected simple graph such that the function BDFS() returns (K), or determine if it is impossible to do so. A single line consisting of an integer (K) ((1 \leq K \leq 10^9)). If it is impossible to construct an undirected simple graph such that the function BDFS() returns (K), then output -1 -1 in a single line. Otherwise, output the graph in the following format. The first line consists of two integers (N) and (M), representing the number of nodes and undirected edges in the graph, respectively. Each of the next (M) lines consists of two integers (u) and (v), representing an undirected edge that connects node (u) and node (v). You are allowed to output the edges in any order. This graph has to satisfy the following constraints: (1 \leq N \leq 32\,768) (1 \leq M \leq 65\,536) (1 \leq u, v \leq N), for all edges. The graph is a simple graph, i.e. there are no multi-edges nor self-loops. Note that you are not required to minimize the number of nodes or edges. It can be proven that if constructing a graph in which the return value of BDFS() is (K) is possible, then there exists one that satisfies all the constraints above. If there are several solutions, you can output any of them. Explanation for the sample input/output #1 The graph on the left describes the output of this sample. The graph on the right describes another valid solution for this sample. Explanati |
| raRzKDJLPHcUnqTcwvGznwEdKiDWjEkd.pdf |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 294174304 | _Fake4Fun ilovemymind NguyenDangQuan | L | Dec. 1, 2024, 9:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 53 | 77 | 102400 | 3000 | |
| 294170707 | StarSilk | L | Dec. 1, 2024, 9:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 53 | 77 | 102400 | 3000 | |
| 294162566 | forelax Mystic03 hipo | L | Dec. 1, 2024, 8:32 a.m. | OK | C++17 (GCC 7-32) | TESTS | 53 | 124 | 102400 | 3000 | |
| 294159555 | arnold518 YeongTree Karuna | L | Dec. 1, 2024, 8:05 a.m. | OK | C++20 (GCC 13-64) | TESTS | 53 | 61 | 102400 | 3000 | |
| 294245200 | DennisTran | L | Dec. 1, 2024, 6:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 53 | 62 | 614400 | 3000 | |
| 294167941 | DELTARUNE kizen qwerasdfzxcl | L | Dec. 1, 2024, 9:19 a.m. | OK | C++20 (GCC 13-64) | TESTS | 53 | 77 | 0 | 3000 | |
| 294174208 | feeder1 HuaJun limanjun | L | Dec. 1, 2024, 9:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 53 | 77 | 1126400 | 3000 | |
| 294286863 | GoogleBot | L | Dec. 2, 2024, 2:44 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 53 | 62 | 102400 | 3000 | |
| 294169078 | Mingyu331 mjhmjh1104 as_dfsdf | L | Dec. 1, 2024, 9:29 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 53 | 62 | 102400 | 3000 | |
| 294162564 | ksun48 ecnerwala | L | Dec. 1, 2024, 8:32 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 53 | 62 | 102400 | 3000 | |
| 294272213 | lotusblume | L | Dec. 1, 2024, 9 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 53 | 77 | 102400 | 3000 | |
| 294262358 | shanks. | L | Dec. 1, 2024, 7:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 53 | 93 | 102400 | 3000 | |
| 294163798 | GroupMatrix PEIMUDA | L | Dec. 1, 2024, 8:43 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 53 | 124 | 102400 | 3000 |
Back to search problems