Codeforces Round 892 (Div. 2)

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
1859 Codeforces Round 892 (Div. 2) FINISHED False 7200 45329063 Aug. 12, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 415 ) F Teleportation in Byteland PROGRAMMING data structures divide and conquer graphs shortest paths trees

B"There are n cities in Byteland, some of which are connected by roads, which can be traversed in any direction. The i -th road has its own hardness parameter w_i . Time spent on traversing a road with its hardness equal to w_i is lceil frac{w_i}{c} rceil , where c is the current driving skill. The travel network of Byteland is a tree. In other words, between any pair of cities, there is exactly one path that passes through each city at most once. In some cities you can visit driving courses. A single course takes T time to complete, and after completing the course the driver's skill c is increased by 2 times. Notice that the time T required to complete a course is the same in all cities, and courses can be completed in the same city more than once. You need to answer the q queries: what is the minimum time it takes to get from the city a to city b if you start the travelling with driving skill c = 1 ? Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and T ( 1 <= n <= 10^5, 1 <= T <= 10^6 ) - the number of cities and time required to complete a single driving course. The following n - 1 lines each contain three integers u_i , v_i and w_i ( 1 <= u_i, v_i <= n, 1 <= w_i <= 10^6, u_i neq v_i ), which mean that there exists a road connecting towns u_i and v_i with hardness equal to w_i . The next line contains a binary string s of length n , consisting only of symbols 0 and 1 . If s_i = 1 ( 1 <= i <= n ), then you can visit driving courses in the i -th city. If s_i = 0 ( 1 <= i <= n ), then you cannot visit driving courses in the i -th city. The next line contains a s"...

Tutorials

Video solutions from Geothermal.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
218616904 liuhengxi F Aug. 13, 2023, 2:31 a.m. OK GNU C++14 TESTS 48 763 64716800
218588254 yydtq F Aug. 12, 2023, 5:58 p.m. OK GNU C++14 TESTS 48 1169 200294400
218585393 awoo F Aug. 12, 2023, 5:37 p.m. OK GNU C++14 TESTS 48 5662 161689600
218623090 Luenly F Aug. 13, 2023, 4:24 a.m. OK GNU C++17 TESTS 48 1232 201523200
218605159 AMDAM F Aug. 12, 2023, 9:28 p.m. OK GNU C++17 TESTS 48 2402 21401600
218588733 El3ageed_Abu_Shehab F Aug. 12, 2023, 6:02 p.m. OK GNU C++17 TESTS 48 3026 52224000
218606536 regain0002 F Aug. 12, 2023, 9:57 p.m. OK GNU C++17 TESTS 48 3462 27238400
218580669 AkaiLemon F Aug. 12, 2023, 5:12 p.m. OK GNU C++17 TESTS 48 3493 51200000
218591538 Ant_Man F Aug. 12, 2023, 6:26 p.m. OK GNU C++17 TESTS 48 3727 64819200
218612436 msg555 F Aug. 13, 2023, 12:53 a.m. OK GNU C++17 TESTS 48 3790 83456000
218592309 zlc1114 F Aug. 12, 2023, 6:33 p.m. OK GNU C++17 TESTS 48 4071 111513600
218590707 zlc1114 F Aug. 12, 2023, 6:19 p.m. OK GNU C++17 TESTS 48 6317 142336000
218590547 zlc1114 F Aug. 12, 2023, 6:18 p.m. OK GNU C++17 TESTS 48 7924 163225600
218617301 wsyear F Aug. 13, 2023, 2:39 a.m. OK GNU C++17 (64) TESTS 48 670 71782400
218617250 Klay_Thompson F Aug. 13, 2023, 2:39 a.m. OK GNU C++17 (64) TESTS 48 670 71782400
218610237 lunchbox F Aug. 12, 2023, 11:38 p.m. OK GNU C++17 (64) TESTS 48 1450 41472000
218623640 Bholo F Aug. 13, 2023, 4:32 a.m. OK GNU C++20 (64) TESTS 48 748 70246400
218599843 islingr F Aug. 12, 2023, 8:03 p.m. OK GNU C++20 (64) TESTS 48 1528 358604800
218607971 visitpage F Aug. 12, 2023, 10:29 p.m. OK GNU C++20 (64) TESTS 48 1965 86630400
218609801 neal F Aug. 12, 2023, 11:24 p.m. OK GNU C++20 (64) TESTS 48 2027 79462400
218609955 neal F Aug. 12, 2023, 11:29 p.m. OK GNU C++20 (64) TESTS 48 2058 78950400
218609886 neal F Aug. 12, 2023, 11:27 p.m. OK GNU C++20 (64) TESTS 48 2230 78950400
218573371 Heltion F Aug. 12, 2023, 4:27 p.m. OK GNU C++20 (64) TESTS 48 2293 45260800
218605615 lrvideckis F Aug. 12, 2023, 9:37 p.m. OK GNU C++20 (64) TESTS 48 2386 68096000
218584594 sysulby F Aug. 12, 2023, 5:32 p.m. OK GNU C++20 (64) TESTS 48 2479 71577600
218595397 Ali.m.yousef F Aug. 12, 2023, 7:08 p.m. OK GNU C++20 (64) TESTS 48 2527 91033600

remove filters

Back to search problems