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 |
---|---|---|---|---|---|---|
1760 | Codeforces Round 835 (Div. 4) | FINISHED | False | 8700 | 62781899 | Nov. 21, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 7447 ) | G | SlavicG's Favorite Problem | PROGRAMMING | bitmasks brute force constructive algorithms data structures dfs and similar graphs greedy |
B'You are given a weighted tree with n vertices. Recall that a tree is a connected graph without any cycles. A weighted tree is a tree in which each edge has a certain weight. The tree is undirected, it doesn 't have a root. Since trees bore you, you decided to challenge yourself and play a game on the given tree. In a move, you can travel from a node to one of its neighbors (another node it has a direct edge with). You start with a variable x which is initially equal to 0 . When you pass through edge i , x changes its value to x ~ mathsf{XOR}~ w_i (where w_i is the weight of the i -th edge). Your task is to go from vertex a to vertex b , but you are allowed to enter node b if and only if after traveling to it, the value of x will become 0 . In other words, you can travel to node b only by using an edge i such that x ~ mathsf{XOR}~ w_i = 0 . Once you enter node b the game ends and you win. Additionally, you can teleport at most once at any point in time to any vertex except vertex b . You can teleport from any vertex, even from a . Answer with "YES" if you can reach vertex b from a , and "NO" otherwise. Note that mathsf{XOR} represents the bitwise XOR operation. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The first line of each test case contains three integers n , a , and b ( 2 <= q n <= q 10^5 ), ( 1 <= q a, b <= q n; a ne b ) -- the number of vertices, and the starting and desired ending node respectively. Each of the next n-1 lines denotes an edge of the tree. Edge i is denoted by three integers u_i , v_i and w_i -- the labels of vertices it connects ( 1 <= q u_i, v_i <= q n; u_i ne v_i; 1 <= q w_i <= q 10^9 ) and the weight of the respective edge. It is guaranteed that the sum of n over all test cases'... |
109348 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
182082242 | Proceeding_On_ | G | Nov. 22, 2022, 3:51 a.m. | OK | GNU C++14 | TESTS | 34 | 109 | 42803200 | ||
182055611 | typedefine | G | Nov. 21, 2022, 8:04 p.m. | OK | GNU C++14 | TESTS | 34 | 124 | 10240000 | ||
182085531 | Colala | G | Nov. 22, 2022, 4:51 a.m. | OK | GNU C++14 | TESTS | 34 | 124 | 12595200 | ||
182061015 | mugiwara_2980 | G | Nov. 21, 2022, 9:38 p.m. | OK | GNU C++14 | TESTS | 34 | 139 | 18227200 | ||
182082664 | AKALemon | G | Nov. 22, 2022, 3:59 a.m. | OK | GNU C++14 | TESTS | 34 | 140 | 8396800 | ||
182067210 | NaClk56 | G | Nov. 22, 2022, 12:29 a.m. | OK | GNU C++14 | TESTS | 34 | 140 | 8396800 | ||
182057821 | typedefine | G | Nov. 21, 2022, 8:38 p.m. | OK | GNU C++14 | TESTS | 34 | 140 | 10444800 | ||
182068124 | happycrazzy | G | Nov. 22, 2022, 12:54 a.m. | OK | GNU C++14 | TESTS | 34 | 140 | 14233600 | ||
182053773 | tanvir2008 | G | Nov. 21, 2022, 7:39 p.m. | OK | GNU C++14 | TESTS | 34 | 155 | 8396800 | ||
182054724 | vgtcross | G | Nov. 21, 2022, 7:51 p.m. | OK | GNU C++14 | TESTS | 34 | 155 | 15872000 | ||
182089756 | RBS | G | Nov. 22, 2022, 5:56 a.m. | OK | GNU C++17 | TESTS | 34 | 78 | 14336000 | ||
182035440 | beot | G | Nov. 21, 2022, 5:04 p.m. | OK | GNU C++17 | TESTS | 34 | 93 | 7884800 | ||
182082918 | RBS | G | Nov. 22, 2022, 4:03 a.m. | OK | GNU C++17 | TESTS | 34 | 93 | 14336000 | ||
182038117 | beot | G | Nov. 21, 2022, 5:17 p.m. | OK | GNU C++17 | TESTS | 34 | 108 | 7884800 | ||
182082781 | ff_666 | G | Nov. 22, 2022, 4:01 a.m. | OK | GNU C++17 | TESTS | 34 | 108 | 14336000 | ||
182040367 | zijun0502 | G | Nov. 21, 2022, 5:30 p.m. | OK | GNU C++17 | TESTS | 34 | 109 | 6246400 | ||
182039940 | zijun0502 | G | Nov. 21, 2022, 5:27 p.m. | OK | GNU C++17 | TESTS | 34 | 124 | 6144000 | ||
182040271 | zijun0502 | G | Nov. 21, 2022, 5:29 p.m. | OK | GNU C++17 | TESTS | 34 | 124 | 6246400 | ||
182081959 | BCXNSD | G | Nov. 22, 2022, 3:45 a.m. | OK | GNU C++17 | TESTS | 34 | 124 | 7065600 | ||
182050644 | Mizo_Compiler | G | Nov. 21, 2022, 7:03 p.m. | OK | GNU C++17 | TESTS | 34 | 124 | 9216000 | ||
182047416 | lunchbox | G | Nov. 21, 2022, 6:29 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 109 | 16588800 | ||
182042731 | chiruno233 | G | Nov. 21, 2022, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 124 | 17305600 | ||
182058826 | enslaved | G | Nov. 21, 2022, 8:56 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 124 | 18841600 | ||
182078027 | PCC | G | Nov. 22, 2022, 2:39 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 124 | 23449600 | ||
182036814 | burak_ozzkan | G | Nov. 21, 2022, 5:10 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 124 | 24883200 | ||
182045690 | muxingchengfeng | G | Nov. 21, 2022, 6:12 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 140 | 17920000 | ||
182048030 | ScarletS | G | Nov. 21, 2022, 6:35 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 140 | 21094400 | ||
182042647 | abz-codes | G | Nov. 21, 2022, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 155 | 22220800 | ||
182036851 | Vegetab1e | G | Nov. 21, 2022, 5:10 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 156 | 13824000 | ||
182042409 | abz-codes | G | Nov. 21, 2022, 5:45 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 156 | 22220800 | ||
182050026 | Alyalsayed | G | Nov. 21, 2022, 6:56 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 93 | 16486400 | ||
182066232 | nvllable | G | Nov. 21, 2022, 11:58 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 108 | 11264000 | ||
182068819 | Monogon | G | Nov. 22, 2022, 1:09 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 108 | 13824000 | ||
182040491 | Efimova_kamila | G | Nov. 21, 2022, 5:31 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 109 | 11366400 | ||
182035740 | dush1729 | G | Nov. 21, 2022, 5:05 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 109 | 14233600 | ||
182086458 | newbie_275 | G | Nov. 22, 2022, 5:06 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 109 | 15360000 | ||
182067639 | AaronHe | G | Nov. 22, 2022, 12:41 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 109 | 15872000 | ||
182044943 | Baaaraa | G | Nov. 21, 2022, 6:06 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 109 | 15872000 | ||
182086362 | newbie_275 | G | Nov. 22, 2022, 5:04 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 109 | 19046400 | ||
182048904 | mysteri0us7 | G | Nov. 21, 2022, 6:43 p.m. | OK | GNU C++20 (64) | TESTS | 34 | 124 | 7270400 | ||
182050375 | shiro | G | Nov. 21, 2022, 7 p.m. | OK | Go | TESTS | 34 | 327 | 53555200 | ||
182036487 | x21svage | G | Nov. 21, 2022, 5:09 p.m. | OK | Java 11 | TESTS | 34 | 405 | 18841600 | ||
182061355 | Alex_by | G | Nov. 21, 2022, 9:45 p.m. | OK | Java 11 | TESTS | 34 | 451 | 16076800 | ||
182059958 | ushikawa | G | Nov. 21, 2022, 9:16 p.m. | OK | Java 11 | TESTS | 34 | 561 | 47820800 | ||
182075900 | peiyeliu | G | Nov. 22, 2022, 1:57 a.m. | OK | Java 11 | TESTS | 34 | 872 | 119091200 | ||
182083540 | Tier33 | G | Nov. 22, 2022, 4:15 a.m. | OK | Java 11 | TESTS | 34 | 1076 | 61542400 | ||
182040053 | Eslam_Ahmed | G | Nov. 21, 2022, 5:28 p.m. | OK | Java 17 | TESTS | 34 | 670 | 61235200 | ||
182064982 | Rayhan_07 | G | Nov. 21, 2022, 11:17 p.m. | OK | Java 8 | TESTS | 34 | 342 | 46080000 | ||
182056491 | Mohamed308 | G | Nov. 21, 2022, 8:17 p.m. | OK | Java 8 | TESTS | 34 | 421 | 49868800 | ||
182040039 | liomsv | G | Nov. 21, 2022, 5:27 p.m. | OK | Java 8 | TESTS | 34 | 560 | 49356800 | ||
182055627 | ganesh_6 | G | Nov. 21, 2022, 8:04 p.m. | OK | Java 8 | TESTS | 34 | 732 | 59494400 | ||
182084482 | 1556444097 | G | Nov. 22, 2022, 4:33 a.m. | OK | Java 8 | TESTS | 34 | 920 | 45772800 | ||
182084855 | lyqhh88 | G | Nov. 22, 2022, 4:39 a.m. | OK | MS C++ 2017 | TESTS | 34 | 390 | 15974400 | ||
182048808 | timusmanovs | G | Nov. 21, 2022, 6:43 p.m. | OK | MS C++ 2017 | TESTS | 34 | 421 | 13721600 | ||
182085408 | FrozenKandy | G | Nov. 22, 2022, 4:49 a.m. | OK | PyPy 3 | TESTS | 34 | 561 | 41574400 | ||
182036629 | hxu10 | G | Nov. 21, 2022, 5:09 p.m. | OK | PyPy 3 | TESTS | 34 | 998 | 32972800 | ||
182058134 | biruktedla93 | G | Nov. 21, 2022, 8:43 p.m. | OK | PyPy 3 | TESTS | 34 | 1216 | 26214400 | ||
182083335 | 0x7f_ | G | Nov. 22, 2022, 4:11 a.m. | OK | PyPy 3 | TESTS | 34 | 1232 | 22220800 | ||
182052392 | crapcode | G | Nov. 21, 2022, 7:23 p.m. | OK | PyPy 3-64 | TESTS | 34 | 374 | 40652800 | ||
182070138 | mikeac | G | Nov. 22, 2022, 1:21 a.m. | OK | PyPy 3-64 | TESTS | 34 | 389 | 39321600 | ||
182070017 | mikeac | G | Nov. 22, 2022, 1:17 a.m. | OK | PyPy 3-64 | TESTS | 34 | 389 | 39321600 | ||
182075163 | biglunchdude | G | Nov. 22, 2022, 1:40 a.m. | OK | PyPy 3-64 | TESTS | 34 | 389 | 41164800 | ||
182044152 | hkwu6013 | G | Nov. 21, 2022, 5:59 p.m. | OK | PyPy 3-64 | TESTS | 34 | 389 | 46592000 | ||
182065627 | crapcode | G | Nov. 21, 2022, 11:38 p.m. | OK | PyPy 3-64 | TESTS | 34 | 421 | 39833600 | ||
182037239 | yingkui | G | Nov. 21, 2022, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 34 | 421 | 48537600 | ||
182050360 | Talurist | G | Nov. 21, 2022, 7 p.m. | OK | PyPy 3-64 | TESTS | 34 | 436 | 34611200 | ||
182051230 | neuronz | G | Nov. 21, 2022, 7:10 p.m. | OK | PyPy 3-64 | TESTS | 34 | 436 | 169267200 | ||
182076657 | beethoven97 | G | Nov. 22, 2022, 2:13 a.m. | OK | PyPy 3-64 | TESTS | 34 | 467 | 40140800 | ||
182083920 | dmnewone | G | Nov. 22, 2022, 4:22 a.m. | OK | Python 3 | TESTS | 34 | 545 | 22220800 | ||
182061925 | taksqth | G | Nov. 21, 2022, 9:58 p.m. | OK | Python 3 | TESTS | 34 | 560 | 24064000 | ||
182057223 | ppsracchriskim | G | Nov. 21, 2022, 8:28 p.m. | OK | Python 3 | TESTS | 34 | 577 | 22220800 | ||
182038970 | meohenbk | G | Nov. 21, 2022, 5:21 p.m. | OK | Python 3 | TESTS | 34 | 717 | 30924800 | ||
182038796 | carlfre | G | Nov. 21, 2022, 5:20 p.m. | OK | Python 3 | TESTS | 34 | 732 | 26214400 | ||
182059005 | NenadDapic | G | Nov. 21, 2022, 8:59 p.m. | OK | Python 3 | TESTS | 34 | 779 | 22016000 | ||
182083978 | zaphar | G | Nov. 22, 2022, 4:23 a.m. | OK | Python 3 | TESTS | 34 | 857 | 38604800 | ||
182085418 | FrozenKandy | G | Nov. 22, 2022, 4:49 a.m. | OK | Python 3 | TESTS | 34 | 1341 | 65331200 | ||
182083816 | Spheniscine | G | Nov. 22, 2022, 4:20 a.m. | OK | Rust 2021 | TESTS | 34 | 108 | 13721600 | ||
182081399 | Spheniscine | G | Nov. 22, 2022, 3:35 a.m. | OK | Rust 2021 | TESTS | 34 | 109 | 13721600 | ||
182053398 | nikgaevoy | G | Nov. 21, 2022, 7:35 p.m. | OK | Rust 2021 | TESTS | 34 | 140 | 24473600 |
Back to search problems