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 |
---|---|---|---|---|---|---|
1633 | Educational Codeforces Round 122 (Rated for Div. 2) | FINISHED | False | 7200 | 88183499 | Jan. 31, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1554 ) | E | Spanning Tree Queries | PROGRAMMING | binary search data structures ds graphs implementation math sortings |
B'You are given a connected weighted undirected graph, consisting of n vertices and m edges. You are asked k queries about it. Each query consists of a single integer x . For each query, you select a spanning tree in the graph. Let the weights of its edges be w_1, w_2, ... , w_{n-1} . The cost of a spanning tree is sum limits_{i=1}^{n-1} |w_i - x| (the sum of absolute differences between the weights and x ). The answer to a query is the lowest cost of a spanning tree. The queries are given in a compressed format. The first p (1 <= p <= k) queries q_1, q_2, ... , q_p are provided explicitly. For queries from p+1 to k , q_j = (q_{j-1} cdot a + b) mod c . Print the xor of answers to all queries. The first line contains two integers n and m ( 2 <= n <= 50 ; n - 1 <= m <= 300 ) -- the number of vertices and the number of edges in the graph. Each of the next m lines contains a description of an undirected edge: three integers v , u and w ( 1 <= v, u <= n ; v neq u ; 0 <= w <= 10^8 ) -- the vertices the edge connects and its weight. Note that there might be multiple edges between a pair of vertices. The edges form a connected graph. The next line contains five integers p, k, a, b and c ( 1 <= p <= 10^5 ; p <= k <= 10^7 ; 0 <= a, b <= 10^8 ; 1 <= c <= 10^8 ) -- the number of queries provided explicitly, the total number of queries and parameters to generate the queries. The next line contains p integers q_1, q_2, ... , q_p ( 0 <= q_j < c ) -- the first p queries. Print a single integer -- the xor of answers to all queries. The queries in the first example are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 . The answers are 11, 9, 7, 3, 1, 5, 8, 7, 5, 7, 11 . The queries in the second example are 3, 0, 2, 1, 6, 0, 3, 5, 4, 1 . The answers are 14, '... |
99539 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
144783671 | Bedo_Sayed | E | Jan. 31, 2022, 9:50 p.m. | OK | GNU C++14 | TESTS | 25 | 842 | 100761600 | ||
144788096 | bary | E | Feb. 1, 2022, 1:55 a.m. | OK | GNU C++14 | TESTS | 25 | 873 | 25088000 | ||
144783258 | Bedo_Sayed | E | Jan. 31, 2022, 9:37 p.m. | OK | GNU C++14 | TESTS | 25 | 920 | 100966400 | ||
144767323 | AwakeAnay | E | Jan. 31, 2022, 5:47 p.m. | OK | GNU C++14 | TESTS | 25 | 1123 | 200396800 | ||
144763946 | myee | E | Jan. 31, 2022, 5:21 p.m. | OK | GNU C++14 | TESTS | 25 | 1372 | 80179200 | ||
144786518 | Bliss_of_comprehension | E | Feb. 1, 2022, 12:27 a.m. | OK | GNU C++14 | TESTS | 25 | 1700 | 2457600 | ||
144781819 | Bliss_of_comprehension | E | Jan. 31, 2022, 9:02 p.m. | OK | GNU C++14 | TESTS | 25 | 1809 | 2150400 | ||
144763424 | WoNt_StOp | E | Jan. 31, 2022, 5:18 p.m. | OK | GNU C++14 | TESTS | 25 | 1887 | 2457600 | ||
144790654 | kaiming_xxy | E | Feb. 1, 2022, 3:18 a.m. | OK | GNU C++14 | TESTS | 25 | 2168 | 4403200 | ||
144757548 | ThunderSpirit | E | Jan. 31, 2022, 4:46 p.m. | OK | GNU C++14 | TESTS | 25 | 2620 | 234291200 | ||
144787091 | Solstice | E | Feb. 1, 2022, 1:04 a.m. | OK | GNU C++17 | TESTS | 25 | 1092 | 409600 | ||
144784847 | zerver52 | E | Jan. 31, 2022, 10:32 p.m. | OK | GNU C++17 | TESTS | 25 | 1122 | 1331200 | ||
144778935 | windu | E | Jan. 31, 2022, 8:05 p.m. | OK | GNU C++17 | TESTS | 25 | 1184 | 202547200 | ||
144784269 | GordeyZav | E | Jan. 31, 2022, 10:10 p.m. | OK | GNU C++17 | TESTS | 25 | 1247 | 40140800 | ||
144792494 | spsicio | E | Feb. 1, 2022, 3:58 a.m. | OK | GNU C++17 | TESTS | 25 | 1263 | 40652800 | ||
144778416 | windu | E | Jan. 31, 2022, 7:56 p.m. | OK | GNU C++17 | TESTS | 25 | 1263 | 202240000 | ||
144787881 | wanghaoze | E | Feb. 1, 2022, 1:46 a.m. | OK | GNU C++17 | TESTS | 25 | 1294 | 3686400 | ||
144789593 | xxafhixx | E | Feb. 1, 2022, 2:50 a.m. | OK | GNU C++17 | TESTS | 25 | 1356 | 1433600 | ||
144790776 | xxafhixx | E | Feb. 1, 2022, 3:21 a.m. | OK | GNU C++17 | TESTS | 25 | 1357 | 1433600 | ||
144790278 | Mckenna_Grace | E | Feb. 1, 2022, 3:10 a.m. | OK | GNU C++17 | TESTS | 25 | 1357 | 40652800 | ||
144763372 | Changyu | E | Jan. 31, 2022, 5:17 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 920 | 0 | ||
144762902 | Changyu | E | Jan. 31, 2022, 5:14 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 935 | 204800 | ||
144761376 | lsantire | E | Jan. 31, 2022, 5:05 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 1060 | 40140800 | ||
144758605 | neal | E | Jan. 31, 2022, 4:51 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 1138 | 1331200 | ||
144759258 | neal | E | Jan. 31, 2022, 4:53 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 1154 | 1331200 | ||
144759655 | nomanhasan123 | E | Jan. 31, 2022, 4:55 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 1201 | 1536000 | ||
144785920 | bedirhan | E | Jan. 31, 2022, 11:54 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 1216 | 1843200 | ||
144787164 | mango_lassi | E | Feb. 1, 2022, 1:09 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 1232 | 1433600 | ||
144766301 | ILovemihoyo | E | Jan. 31, 2022, 5:38 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 1247 | 40652800 | ||
144790485 | MaGnsi0 | E | Feb. 1, 2022, 3:14 a.m. | OK | GNU C++17 (64) | TESTS | 25 | 1247 | 41369600 | ||
144769194 | keta_tsimakuridze | E | Jan. 31, 2022, 6:03 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 546 | 14950400 | ||
144768171 | AwakeAnay | E | Jan. 31, 2022, 5:54 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 670 | 25088000 | ||
144768302 | AwakeAnay | E | Jan. 31, 2022, 5:55 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 717 | 25088000 | ||
144767575 | AwakeAnay | E | Jan. 31, 2022, 5:49 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 936 | 200396800 | ||
144778123 | A_G | E | Jan. 31, 2022, 7:52 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 951 | 11059200 | ||
144794528 | ovd0312 | E | Feb. 1, 2022, 4:34 a.m. | OK | GNU C++20 (64) | TESTS | 25 | 1092 | 80281600 | ||
144799277 | YYYLLL2021 | E | Feb. 1, 2022, 5:58 a.m. | OK | GNU C++20 (64) | TESTS | 25 | 1153 | 40652800 | ||
144794672 | boy_of_kutbilim | E | Feb. 1, 2022, 4:36 a.m. | OK | GNU C++20 (64) | TESTS | 25 | 1185 | 40652800 | ||
144792378 | AndreyPavlov | E | Feb. 1, 2022, 3:55 a.m. | OK | GNU C++20 (64) | TESTS | 25 | 1185 | 81612800 | ||
144778676 | Nea1 | E | Jan. 31, 2022, 8:01 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 1231 | 1126400 | ||
144783344 | anvorguesa | E | Jan. 31, 2022, 9:39 p.m. | OK | Go | TESTS | 25 | 3962 | 47104000 | ||
144771909 | Dukkha | E | Jan. 31, 2022, 6:29 p.m. | OK | Java 11 | TESTS | 25 | 3431 | 0 | ||
144769248 | Dukkha | E | Jan. 31, 2022, 6:04 p.m. | OK | Java 11 | TESTS | 25 | 3493 | 0 | ||
144768835 | arvindf232 | E | Jan. 31, 2022, 6 p.m. | OK | Kotlin 1.4 | TESTS | 25 | 3587 | 1740800 | ||
144768478 | r57shell | E | Jan. 31, 2022, 5:57 p.m. | OK | MS C++ 2017 | TESTS | 25 | 1466 | 2048000 |
Back to search problems