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 |
---|---|---|---|---|---|---|
1413 | Technocup 2021 - Elimination Round 1 | FINISHED | False | 7200 | 128199299 | Oct. 25, 2020, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 788 ) | F | Roads and Ramen | PROGRAMMING | data structures |
B"In the Land of Fire there are n villages and n-1 bidirectional road, and there is a path between any pair of villages by roads. There are only two types of roads: stone ones and sand ones. Since the Land of Fire is constantly renovating, every morning workers choose a single road and flip its type (so it becomes a stone road if it was a sand road and vice versa). Also everyone here loves ramen, that's why every morning a ramen pavilion is set in the middle of every stone road, and at the end of each day all the pavilions are removed. For each of the following m days, after another road is flipped, Naruto and Jiraiya choose a simple path -- that is, a route which starts in a village and ends in a (possibly, the same) village, and doesn't contain any road twice. Since Naruto and Jiraiya also love ramen very much, they buy a single cup of ramen on each stone road and one of them eats it. Since they don't want to offend each other, they only choose routes where they can eat equal number of ramen cups. Since they both like traveling, they choose any longest possible path. After every renovation find the maximal possible length of a path (that is, the number of roads in it) they can follow. The first line contains the only positive integer n ( 2 <= q n <= q 500 ,000 ) standing for the number of villages in the Land of Fire. Each of the following (n-1) lines contains a description of another road, represented as three positive integers u , v and t ( 1 <= q u, v <= q n , t in {0,1 } ). The first two numbers denote the villages connected by the road, and the third denotes the initial type of the road: 0 for the sand one and 1 for the stone one. Roads are numbered from 1 to (n-1) in the order from the input. The following line contains a positive integer m ( 1 <= q m <= q 500 ,000 ) standing for the number of days Naruto and Jiraiya travel for. Each of the following m"... |
Codeforces Round 679 (Div. 1, Div. 2) and Technocup Round 1 editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
96701833 | hehezhou | F | Oct. 25, 2020, 1:39 p.m. | OK | GNU C++11 | TESTS | 26 | 3790 | 192204800 | ||
96700886 | s_r_f | F | Oct. 25, 2020, 1:27 p.m. | OK | GNU C++11 | TESTS | 26 | 4866 | 178483200 | ||
96703810 | TiwAirOAO | F | Oct. 25, 2020, 1:56 p.m. | OK | GNU C++14 | TESTS | 26 | 4788 | 205004800 | ||
96686310 | oleh1421 | F | Oct. 25, 2020, 12:30 p.m. | OK | GNU C++17 | TESTS | 26 | 2059 | 122470400 | ||
96726340 | kostia244 | F | Oct. 25, 2020, 7:17 p.m. | OK | GNU C++17 | TESTS | 26 | 2323 | 170188800 | ||
96682351 | usachevd0 | F | Oct. 25, 2020, 12:18 p.m. | OK | GNU C++17 | TESTS | 26 | 3010 | 251699200 | ||
96700430 | fedoseev.timofey | F | Oct. 25, 2020, 1:20 p.m. | OK | GNU C++17 | TESTS | 26 | 3056 | 161587200 | ||
96689002 | turmax | F | Oct. 25, 2020, 12:37 p.m. | OK | GNU C++17 | TESTS | 26 | 3119 | 181248000 | ||
96701033 | Martin53 | F | Oct. 25, 2020, 1:30 p.m. | OK | GNU C++17 | TESTS | 26 | 3493 | 292659200 | ||
96700923 | Martin53 | F | Oct. 25, 2020, 1:28 p.m. | OK | GNU C++17 | TESTS | 26 | 4273 | 292659200 | ||
96710857 | IgorI | F | Oct. 25, 2020, 3:16 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 2542 | 199884800 | ||
96706834 | tute7627 | F | Oct. 25, 2020, 2:27 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 2620 | 248729600 | ||
96737346 | Akulyat | F | Oct. 26, 2020, 12:37 a.m. | OK | GNU C++17 (64) | TESTS | 26 | 2947 | 142745600 | ||
96701034 | QAQAutoMaton | F | Oct. 25, 2020, 1:30 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 3727 | 239820800 | ||
96732490 | Kot-Skazochnik | F | Oct. 25, 2020, 9:48 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 4039 | 308633600 | ||
96701923 | Egor.Lifar | F | Oct. 25, 2020, 1:39 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 4570 | 402124800 | ||
96706533 | MagicSpark | F | Oct. 25, 2020, 2:23 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 4944 | 151756800 |
Back to search problems