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.
Problems
You are developing a game consisting of (n) levels, numbered from (1) to (n). Levels are connected by a transition network consisting of (m) transitions, numbered from (1) to (m). Transition (k) connects levels (a_k) and (b_k) bidirectionally ((1 \le k \le m)). A single run of the game starts at level (1). Each time a player enters a new level, the player must complete it and then move to another level that is directly connected by a transition and has not been completed in the run. The run ends successfully when level (n) is completed. A sequence of pairwise distinct levels starting from level (1) and ending at level (n) is called a successful path if a player can complete the levels in the order given by the sequence in a single run. A transition network is well-designed if it satisfies both of the following: For any level (i) ((2 \le i \le n-1)), there exists a successful path containing level (i). For any pair of levels (i) and (j) ((2 \le i \lt j \le n-1)), at most one of the following holds: There exists a successful path containing levels (i) and (j) with level (i) appearing before level (j). There exists a successful path containing levels (i) and (j) with level (j) appearing before level (i). There exists a successful path containing levels (i) and (j) with level (i) appearing before level (j). There exists a successful path containing levels (i) and (j) with level (j) appearing before level (i). Your first task is to determine whether the given transition network is well-designed or not. If the network is well-designed, you have a second task. Let (S) be the set of pairs of integers ((i, j)) ((1 \le i \lt j \le n)) such that levels (i) and (j) are not directly connected and adding a bidirectional extra transition between them keeps the network well-designed. You are interested in the s |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
365805740 |
hiteshjakhar__29 |
G |
March 8, 2026, 5:40 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
56 |
437 |
39628800 |
|
|
|
365801327 |
_el3bd_ |
G |
March 8, 2026, 4:43 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
56 |
468 |
27136000 |
|
|
|
365837493 |
didxga |
G |
March 8, 2026, 11:05 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
56 |
531 |
26521600 |
|
|
|
365800472 |
klasjldkj |
G |
March 8, 2026, 4:28 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
421 |
44544000 |
|
|
|
365817716 |
pyqjw1 |
G |
March 8, 2026, 7:46 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
421 |
72704000 |
|
|
|
365802480 |
prantogoswamee |
G |
March 8, 2026, 5:02 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
453 |
72908800 |
|
|
|
365825991 |
sanjoy_doit028 |
G |
March 8, 2026, 9:11 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
531 |
39014400 |
|
|
|
365813795 |
StarSilk |
G |
March 8, 2026, 7:04 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
531 |
39014400 |
|
|
|
365850148 |
kizen |
G |
March 8, 2026, 1:13 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
1000 |
44441600 |
|
|
|
365808270 |
ustze namespace_std kiana810 |
G |
March 8, 2026, 6:08 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
1062 |
67788800 |
|
|
|
365814939 |
1459007298 |
G |
March 8, 2026, 7:16 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
1218 |
167936000 |
|
|
|
365852682 |
YeongTree |
G |
March 8, 2026, 1:36 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
1281 |
43110400 |
|
|
|
365813445 |
dXqwq |
G |
March 8, 2026, 7 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
56 |
1312 |
168140800 |
|
|
|
365802148 |
Momotaros |
G |
March 8, 2026, 4:57 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
468 |
35840000 |
|
|
|
365808032 |
men.d |
G |
March 8, 2026, 6:05 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
625 |
51302400 |
|
|
|
365806569 |
mo0dman Arsentii OneCyborg |
G |
March 8, 2026, 5:49 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
781 |
121651200 |
|
|
|
365832542 |
khanhtai |
G |
March 8, 2026, 10:16 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
906 |
45056000 |
|
|
|
365829000 |
Fizonel |
G |
March 8, 2026, 9:40 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
937 |
56729600 |
|
|
|
365800398 |
Msgnh zhibohemain |
G |
March 8, 2026, 4:27 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
953 |
79769600 |
|
|
|
365811155 |
bachthaison |
G |
March 8, 2026, 6:39 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
1078 |
96460800 |
|
|
|
365807353 |
VHPro Kuroni fextivity |
G |
March 8, 2026, 5:58 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
1546 |
51712000 |
|
|
|
365849065 |
Ibrohim-Shamsiev |
G |
March 8, 2026, 1:03 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
1546 |
108544000 |
|
|
|
365802382 |
ksun48 ecnerwala |
G |
March 8, 2026, 5 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
56 |
1546 |
108544000 |
|
|
|
365798658 |
Chayanine |
G |
March 8, 2026, 3:57 a.m. |
OK |
PyPy 3-64 |
TESTS |
56 |
4718 |
292556800 |
|
|
|
365856400 |
|
G |
March 8, 2026, 1:52 p.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
|
remove filters
Back to search problems