Codeforces Round 639 (Div. 1)

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
1344 Codeforces Round 639 (Div. 1) FINISHED False 8100 143047499 May 6, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 461 ) E Train Tracks PROGRAMMING data structures trees 3100

B"That's right. I'm a Purdue student, and I shamelessly wrote a problem about trains. There are n stations and m trains. The stations are connected by n-1 one-directional railroads that form a tree rooted at station 1 . All railroads are pointed in the direction from the root station 1 to the leaves. A railroad connects a station u to a station v , and has a distance d , meaning it takes d time to travel from u to v . Each station with at least one outgoing railroad has a switch that determines the child station an incoming train will be directed toward. For example, it might look like this: Initially, no trains are at any station. Train i will enter station 1 at time t_i . Every unit of time, starting at time 1 , the following two steps happen: Every train has a destination station s_i . When it enters s_i , it will stop there permanently. If at some point the train is going in the wrong direction, so that it will never be able to reach s_i no matter where the switches point, it will immediately explode. Find the latest possible time of the first explosion if you change switches optimally, or determine that you can direct every train to its destination so that no explosion occurs. Also, find the minimum number of times you need to change a switch to achieve this. The first line contains two integers n and m ( 1 <= n,m <= 10^5 ) -- the number of stations and trains, respectively. The next n-1 lines describe the railroads. The i -th line contains three integers u,v,d ( 1 <= u,v <= n , 1 <= d <= 10^9 ), denoting a railroad from station u to station v with distance d . It is guaranteed that the railroads form a tree rooted at station 1 . The switch of a station u is initially directed towards the last outgoing railroad from u that appears in the input. The next m lines describe th"...

Tutorials

Codeforces Round #639 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
79305506 rainboy E May 7, 2020, 4 p.m. OK GNU C11 TESTS 70 1138 119091200 3100
79239442 yasugongshang E May 7, 2020, 6:44 a.m. OK GNU C++11 TESTS 70 311 44646400 3100
79467016 Ghastlcon E May 9, 2020, 1:18 p.m. OK GNU C++11 TESTS 70 467 108134400 3100
79352006 frodakcin E May 8, 2020, 6:51 a.m. OK GNU C++11 TESTS 70 795 125542400 3100
79331891 skywalkert E May 7, 2020, 11:02 p.m. OK GNU C++14 TESTS 70 560 67276800 3100
79339194 cz_xuyixuan E May 8, 2020, 2:59 a.m. OK GNU C++14 TESTS 70 592 74035200 3100
79357900 QAQAutoMaton E May 8, 2020, 8:15 a.m. OK GNU C++14 TESTS 70 1481 88268800 3100
79338685 cz_xuyixuan E May 8, 2020, 2:48 a.m. OK GNU C++14 TESTS 70 3509 98713600 3100
79261744 user202729_ E May 7, 2020, 11:10 a.m. OK GNU C++17 TESTS 70 499 63283200 3100
79213579 amethyst0 E May 6, 2020, 10:56 p.m. OK GNU C++17 TESTS 70 545 88371200 3100
79306667 Maripium E May 7, 2020, 4:12 p.m. OK GNU C++17 TESTS 70 576 82329600 3100
79359023 F0_0H E May 8, 2020, 8:30 a.m. OK GNU C++17 TESTS 70 608 63590400 3100
79387545 Elegia E May 8, 2020, 2:34 p.m. OK GNU C++17 TESTS 70 748 71270400 3100
79191531 Benq E May 6, 2020, 3:52 p.m. OK GNU C++17 TESTS 70 811 151244800 3100
79384129 superbigjuruo E May 8, 2020, 1:54 p.m. OK GNU C++17 TESTS 70 811 246067200 3100
79389147 KonaeAkira E May 8, 2020, 2:51 p.m. OK GNU C++17 TESTS 70 920 73216000 3100
79211282 mango_lassi E May 6, 2020, 10:05 p.m. OK GNU C++17 TESTS 70 998 72396800 3100
79222213 Nezzar E May 7, 2020, 2:39 a.m. OK GNU C++17 TESTS 70 998 202240000 3100
79435267 AuqaKyz E May 9, 2020, 6:12 a.m. OK GNU C++17 (64) TESTS 70 327 70758400 3100
79201854 maroonrk E May 6, 2020, 4:46 p.m. OK GNU C++17 (64) TESTS 70 436 67993600 3100
79212522 Benq E May 6, 2020, 10:32 p.m. OK GNU C++17 (64) TESTS 70 482 74547200 3100
79245364 jiangly E May 7, 2020, 7:48 a.m. OK GNU C++17 (64) TESTS 70 499 68300800 3100
79439747 WZYYN E May 9, 2020, 7:21 a.m. OK GNU C++17 (64) TESTS 70 514 65228800 3100
79218703 ecnerwala E May 7, 2020, 1:15 a.m. OK GNU C++17 (64) TESTS 70 546 105164800 3100
79375156 autoint E May 8, 2020, 11:59 a.m. OK GNU C++17 (64) TESTS 70 561 65126400 3100
79387617 Elegia E May 8, 2020, 2:35 p.m. OK GNU C++17 (64) TESTS 70 607 76390400 3100
79219868 WZYYN E May 7, 2020, 1:44 a.m. OK GNU C++17 (64) TESTS 70 608 141926400 3100
79383556 Toxel E May 8, 2020, 1:47 p.m. OK GNU C++17 (64) TESTS 70 639 110387200 3100

remove filters

Back to search problems