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 |
---|---|---|---|---|---|---|
1498 | CodeCraft-21 and Codeforces Round 711 (Div. 2) | FINISHED | False | 7200 | 120151463 | March 29, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 941 ) | F | Christmas Game | PROGRAMMING | data structures dfs and similar dp games math trees |
B'Alice and Bob are going to celebrate Christmas by playing a game with a tree of presents. The tree has n nodes (numbered 1 to n , with some node r as its root). There are a_i presents are hanging from the i -th node. Before beginning the game, a special integer k is chosen. The game proceeds as follows: For each possible root of the tree, find who among Alice or Bob wins the game. Note: The depth of a node i in a tree with root r is defined as the number of edges on the simple path from node r to node i . The depth of root r itself is zero. The first line contains two space-separated integers n and k (3 <= n <= 10^5, 1 <= k <= 20) . The next n-1 lines each contain two integers x and y (1 <= x, y <= n, x neq y) , denoting an undirected edge between the two nodes x and y . These edges form a tree of n nodes. The next line contains n space-separated integers denoting the array a (0 <= a_i <= 10^9) . Output n integers, where the i -th integer is 1 if Alice wins the game when the tree is rooted at node i , or 0 otherwise. Let us calculate the answer for sample input with root node as 1 and as 2. Root node 1 Alice always wins in this case. One possible gameplay between Alice and Bob is: Bob is now unable to make a move and hence loses. Root node 2 Bob always wins in this case. One such gameplay is: Alice is now unable to make a move and hence loses. '... |
CodeCraft-21 and Codeforces Round #711 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
111431603 | leapfrog | F | March 30, 2021, 3:28 a.m. | OK | GNU C++11 | TESTS | 46 | 108 | 22220800 | ||
111431530 | xtwno | F | March 30, 2021, 3:26 a.m. | OK | GNU C++11 | TESTS | 46 | 108 | 22220800 | ||
111435187 | 2018LZY | F | March 30, 2021, 4:49 a.m. | OK | GNU C++11 | TESTS | 46 | 109 | 27648000 | ||
111427498 | Shallow_Kevin | F | March 30, 2021, 1:22 a.m. | OK | GNU C++11 | TESTS | 46 | 124 | 50483200 | ||
111427906 | Inf_Voltage | F | March 30, 2021, 1:38 a.m. | OK | GNU C++11 | TESTS | 46 | 139 | 41164800 | ||
111427012 | yuzhechuan | F | March 30, 2021, 1:02 a.m. | OK | GNU C++11 | TESTS | 46 | 140 | 45260800 | ||
111427708 | Inf_Voltage | F | March 30, 2021, 1:30 a.m. | OK | GNU C++11 | TESTS | 46 | 156 | 41164800 | ||
111409405 | Bartol | F | March 29, 2021, 5:41 p.m. | OK | GNU C++11 | TESTS | 46 | 202 | 38400000 | ||
111403830 | dreamoon_love_AA | F | March 29, 2021, 4:34 p.m. | OK | GNU C++11 | TESTS | 46 | 218 | 68915200 | ||
111399099 | tommy0I03 | F | March 29, 2021, 4:17 p.m. | OK | GNU C++11 | TESTS | 46 | 233 | 52428800 | ||
111439289 | paras | F | March 30, 2021, 5:57 a.m. | OK | GNU C++14 | TESTS | 46 | 171 | 28979200 | ||
111417820 | Potassium | F | March 29, 2021, 7:43 p.m. | OK | GNU C++14 | TESTS | 46 | 233 | 30720000 | ||
111406510 | atodo | F | March 29, 2021, 5:12 p.m. | OK | GNU C++17 | TESTS | 46 | 171 | 42188800 | ||
111439009 | ftuknights | F | March 30, 2021, 5:53 a.m. | OK | GNU C++17 | TESTS | 46 | 171 | 45363200 | ||
111433790 | windy7926778 | F | March 30, 2021, 4:22 a.m. | OK | GNU C++17 | TESTS | 46 | 171 | 57753600 | ||
111408132 | Sugarii | F | March 29, 2021, 5:27 p.m. | OK | GNU C++17 | TESTS | 46 | 187 | 50892800 | ||
111395286 | teja349 | F | March 29, 2021, 4:02 p.m. | OK | GNU C++17 | TESTS | 46 | 202 | 32972800 | ||
111428307 | Molewus | F | March 30, 2021, 1:54 a.m. | OK | GNU C++17 | TESTS | 46 | 202 | 75468800 | ||
111411082 | akulsareen | F | March 29, 2021, 6:02 p.m. | OK | GNU C++17 | TESTS | 46 | 217 | 29388800 | ||
111401105 | cxaphoenix | F | March 29, 2021, 4:25 p.m. | OK | GNU C++17 | TESTS | 46 | 217 | 56012800 | ||
111395607 | Nachia | F | March 29, 2021, 4:04 p.m. | OK | GNU C++17 | TESTS | 46 | 218 | 37888000 | ||
111430704 | Porky623 | F | March 30, 2021, 3:06 a.m. | OK | GNU C++17 | TESTS | 46 | 218 | 62259200 | ||
111425764 | WZP2018 | F | March 30, 2021, 12:08 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 171 | 56012800 | ||
111428240 | burnoutag | F | March 30, 2021, 1:52 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 171 | 91340800 | ||
111409309 | magnified | F | March 29, 2021, 5:40 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 186 | 49254400 | ||
111427668 | wlzhouzhuan | F | March 30, 2021, 1:28 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 187 | 51712000 | ||
111426869 | shenmadongdong | F | March 30, 2021, 12:55 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 202 | 35635200 | ||
111426854 | shenmadongdong.qwq | F | March 30, 2021, 12:54 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 202 | 35635200 | ||
111428354 | luogu_bot4 | F | March 30, 2021, 1:56 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 218 | 48025600 | ||
111428334 | Arraiter | F | March 30, 2021, 1:55 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 218 | 48025600 | ||
111414072 | magnus.hegdahl | F | March 29, 2021, 6:40 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 218 | 189132800 | ||
111418906 | smax | F | March 29, 2021, 8:04 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 233 | 36659200 | ||
111397778 | uwi | F | March 29, 2021, 4:12 p.m. | OK | Java 11 | TESTS | 46 | 467 | 39936000 | ||
111405359 | toomer | F | March 29, 2021, 5:05 p.m. | OK | Rust | TESTS | 46 | 576 | 214630400 |
Back to search problems