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 |
---|---|---|---|---|---|---|
1929 | Codeforces Round 926 (Div. 2) | FINISHED | False | 7200 | 29172263 | Feb. 15, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1841 ) | F | Sasha and the Wedding Binary Search Tree | PROGRAMMING | combinatorics dfs and similar math sortings trees |
B'Having overcome all the difficulties and hardships, Sasha finally decided to marry his girlfriend. To do this, he needs to give her an engagement ring. However, his girlfriend does not like such romantic gestures, but she does like binary search trees ^{ dagger} . So Sasha decided to give her such a tree. After spending a lot of time on wedding websites for programmers, he found the perfect binary search tree with the root at vertex 1 . In this tree, the value at vertex v is equal to val_v . But after some time, he forgot the values in some vertices. Trying to remember the found tree, Sasha wondered -- how many binary search trees could he have found on the website, if it is known that the values in all vertices are integers in the segment [1, C] . Since this number can be very large, output it modulo 998 ,244 ,353 . ^{ dagger} A binary search tree is a rooted binary tree in which for any vertex x , the following property holds: the values of all vertices in the left subtree of vertex x (if it exists) are less than or equal to the value at vertex x , and the values of all vertices in the right subtree of vertex x (if it exists) are greater than or equal to the value at vertex x . Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and C ( 2 <= q n <= q 5 cdot 10^5 , 1 <= q C <= q 10^9 ) -- the number of vertices in the tree and the maximum allowed value at the vertex. The next n lines describe the vertices of the tree. The i -th line contains three integers L_i, R_i and val_i ( -1 <= L_i, R_i <= n , -1 <= val_i <= C , L_i, R_i, val_i ne 0 ) -- the number of the left child, the number of the right child, and the value at the i -th ver'... |
Codeforces Round #926 (Div. 2) Editorial. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
246577029 | Kilani | F | Feb. 15, 2024, 6:09 p.m. | OK | GNU C++17 | TESTS | 33 | 295 | 29184000 | ||
246579231 | EvenToWorldFinal | F | Feb. 15, 2024, 6:27 p.m. | OK | GNU C++17 | TESTS | 33 | 296 | 13926400 | ||
246568854 | ctgg | F | Feb. 15, 2024, 5:11 p.m. | OK | GNU C++17 | TESTS | 33 | 311 | 34406400 | ||
246573177 | stefanbalaz2 | F | Feb. 15, 2024, 5:39 p.m. | OK | GNU C++17 | TESTS | 33 | 327 | 40448000 | ||
246570127 | luckYrat | F | Feb. 15, 2024, 5:19 p.m. | OK | GNU C++17 | TESTS | 33 | 343 | 20480000 | ||
246608837 | yeminghan | F | Feb. 16, 2024, 2:34 a.m. | OK | GNU C++17 | TESTS | 33 | 389 | 27238400 | ||
246572314 | Danilo21 | F | Feb. 15, 2024, 5:33 p.m. | OK | GNU C++17 | TESTS | 33 | 390 | 59392000 | ||
246606144 | jununu0811 | F | Feb. 16, 2024, 1:38 a.m. | OK | GNU C++17 | TESTS | 33 | 390 | 64921600 | ||
246584620 | bili2002 | F | Feb. 15, 2024, 7:18 p.m. | OK | GNU C++17 | TESTS | 33 | 405 | 29184000 | ||
246587983 | llzer | F | Feb. 15, 2024, 7:54 p.m. | OK | GNU C++17 | TESTS | 33 | 405 | 38502400 | ||
246571088 | a999999 | F | Feb. 15, 2024, 5:25 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 92 | 58982400 | ||
246614819 | a999999 | F | Feb. 16, 2024, 4:15 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 156 | 48947200 | ||
246561207 | Hyperbolic | F | Feb. 15, 2024, 4:29 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 264 | 63897600 | ||
246605031 | restar682 | F | Feb. 16, 2024, 1:15 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 265 | 34713600 | ||
246569209 | AnosVoldigoad | F | Feb. 15, 2024, 5:13 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 265 | 44339200 | ||
246558896 | JueFan | F | Feb. 15, 2024, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 280 | 62156800 | ||
246609261 | mingzuzhang | F | Feb. 16, 2024, 2:43 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 280 | 67481600 | ||
246566000 | toniskrijelj | F | Feb. 15, 2024, 4:57 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 280 | 73625600 | ||
246563158 | _chroneZ | F | Feb. 15, 2024, 4:33 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 296 | 40243200 | ||
246616949 | pengpeng_fudan | F | Feb. 16, 2024, 4:47 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 296 | 42291200 | ||
246561313 | Nahida__ | F | Feb. 15, 2024, 4:29 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 108 | 60825600 | ||
246609942 | ArcaStellar | F | Feb. 16, 2024, 2:55 a.m. | OK | GNU C++20 (64) | TESTS | 33 | 202 | 17408000 | ||
246581864 | kaiboy | F | Feb. 15, 2024, 6:51 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 202 | 18944000 | ||
246574210 | zarubin | F | Feb. 15, 2024, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 202 | 18944000 | ||
246607276 | Ycfhnnd | F | Feb. 16, 2024, 2:03 a.m. | OK | GNU C++20 (64) | TESTS | 33 | 218 | 21811200 | ||
246602352 | TLE_Automat | F | Feb. 15, 2024, 11:57 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 218 | 24883200 | ||
246567071 | TLE_Automata | F | Feb. 15, 2024, 5:02 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 218 | 24883200 | ||
246567859 | autolambda | F | Feb. 15, 2024, 5:06 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 218 | 28262400 | ||
246571462 | ev1sq | F | Feb. 15, 2024, 5:27 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 218 | 32870400 | ||
246578324 | Fysty | F | Feb. 15, 2024, 6:19 p.m. | OK | GNU C++20 (64) | TESTS | 33 | 218 | 42291200 | ||
246621543 | sugar2023 | F | Feb. 16, 2024, 5:46 a.m. | OK | Go | TESTS | 33 | 716 | 172032000 | ||
246586199 | santanu021 | F | Feb. 15, 2024, 7:34 p.m. | OK | Java 21 | TESTS | 33 | 592 | 45158400 | ||
246586070 | profchi | F | Feb. 15, 2024, 7:33 p.m. | OK | Java 21 | TESTS | 33 | 858 | 82944000 | ||
246569244 | cc4414 | F | Feb. 15, 2024, 5:13 p.m. | OK | Java 8 | TESTS | 33 | 1278 | 268390400 | ||
246578879 | dishanth0282 | F | Feb. 15, 2024, 6:24 p.m. | OK | Kotlin 1.9 | TESTS | 33 | 1138 | 35225600 | ||
246578390 | wangchaohui | F | Feb. 15, 2024, 6:20 p.m. | OK | Kotlin 1.9 | TESTS | 33 | 1153 | 35123200 | ||
246586341 | 6ziv | F | Feb. 15, 2024, 7:36 p.m. | OK | MS C++ 2017 | TESTS | 33 | 1465 | 19148800 | ||
246589263 | Piashy | F | Feb. 15, 2024, 8:08 p.m. | OK | MS C++ 2017 | TESTS | 33 | 1731 | 40857600 | ||
246615209 | codicon | F | Feb. 16, 2024, 4:21 a.m. | OK | PyPy 3-64 | TESTS | 33 | 374 | 65331200 | ||
246614941 | codicon | F | Feb. 16, 2024, 4:16 a.m. | OK | PyPy 3-64 | TESTS | 33 | 482 | 65331200 | ||
246567034 | fatalerror | F | Feb. 15, 2024, 5:02 p.m. | OK | PyPy 3-64 | TESTS | 33 | 483 | 51712000 | ||
246567516 | Little_Sheep_Yawn | F | Feb. 15, 2024, 5:04 p.m. | OK | PyPy 3-64 | TESTS | 33 | 639 | 72704000 | ||
246611475 | bayibo | F | Feb. 16, 2024, 3:23 a.m. | OK | PyPy 3-64 | TESTS | 33 | 763 | 61440000 | ||
246580046 | eunsoo0607 | F | Feb. 15, 2024, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 33 | 842 | 117862400 | ||
246567089 | strashila | F | Feb. 15, 2024, 5:02 p.m. | OK | PyPy 3-64 | TESTS | 33 | 1028 | 135884800 | ||
246563791 | Eunha | F | Feb. 15, 2024, 4:34 p.m. | OK | PyPy 3-64 | TESTS | 33 | 1060 | 166400000 | ||
246607277 | liupengsay | F | Feb. 16, 2024, 2:03 a.m. | OK | PyPy 3-64 | TESTS | 33 | 1200 | 188723200 | ||
246607009 | liupengsay | F | Feb. 16, 2024, 1:59 a.m. | OK | PyPy 3-64 | TESTS | 33 | 1263 | 188620800 | ||
246611636 | bayibo | F | Feb. 16, 2024, 3:25 a.m. | OK | Python 3 | TESTS | 33 | 1715 | 97587200 |
Back to search problems