Codeforces Round 966 (Div. 3)

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
2000 Codeforces Round 966 (Div. 3) FINISHED False 8100 52931984 Aug. 13, 2024, 2:40 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 3118 ) G Call During the Journey PROGRAMMING binary search brute force graphs greedy shortest paths

You live in a city consisting of (n) intersections and (m) streets connecting some pairs of intersections. You can travel in either direction on each street. No two streets connect the same pair of intersections, and no street connects an intersection to itself. You can reach any intersection from any other, possibly passing through some other intersections. Every minute, you can board a bus at intersection (u_i) and travel for (l_{i1}) minutes to intersection (v_i). Conversely, you can travel from intersection (v_i) to intersection (u_i) in (l_{i1}) minutes. You can only board and exit the bus at intersections. You can only board the bus at an intersection if you are currently there. You can also walk along each street, which takes (l_{i2} > l_{i1}) minutes. You can make stops at intersections. You live at intersection number (1). Today you woke up at time (0), and you have an important event scheduled at intersection number (n), which you must reach no later than time (t_0). You also have a phone call planned that will last from (t_1) to (t_2) minutes ((t_1 < t_2 < t_0)). During the phone call, you cannot ride the bus, but you can walk along any streets, make stops, or stay at home. You can exit the bus at minute (t_1) and board the bus again at minute (t_2). Since you want to get enough sleep, you became curious — how late can you leave home to have time to talk on the phone and still not be late for the event? The first line contains an integer (t) ((1 \le t \le 10^4)) — the number of test cases. The following are the descriptions of the test cases. The first line of each test case contains two integers (n), (m) ((2 \le n \le 10^5, 1 \le m \le 10^5)) — the number of intersections and streets in the city. The second line of each test case contains three integers (t_0), (t_1), (t_2) ((1 \le t_1 < t_2 < t_0 \le 10^9)) — the start time of the event,

Tutorials

132689

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
276347117 huang123zs G Aug. 14, 2024, 4:10 a.m. OK C++14 (GCC 6-32) TESTS 23 140 4403200
276351772 LQCX G Aug. 14, 2024, 5:05 a.m. OK C++14 (GCC 6-32) TESTS 23 171 66764800
276311962 TrendBattles G Aug. 13, 2024, 6:55 p.m. OK C++14 (GCC 6-32) TESTS 16 218 2048000
276356338 zxh923 G Aug. 14, 2024, 5:51 a.m. OK C++14 (GCC 6-32) TESTS 23 421 7577600
276356558 zxh923 G Aug. 14, 2024, 5:53 a.m. OK C++14 (GCC 6-32) TESTS 23 436 7475200
276354844 zxh923 G Aug. 14, 2024, 5:36 a.m. OK C++14 (GCC 6-32) TESTS 23 625 7577600
276357300 izzet_RalZarek G Aug. 14, 2024, 6:01 a.m. OK C++14 (GCC 6-32) TESTS 23 671 14643200
276311799 ztw___ G Aug. 13, 2024, 6:53 p.m. OK C++14 (GCC 6-32) TESTS 16 921 5632000
276345765 Running_a_way G Aug. 14, 2024, 3:54 a.m. OK C++14 (GCC 6-32) TESTS 23 999 10547200
276347443 a_sad_soul G Aug. 14, 2024, 4:15 a.m. OK C++14 (GCC 6-32) TESTS 23 1046 26726400
276350408 Xiaobaigrown G Aug. 14, 2024, 4:50 a.m. OK C++17 (GCC 7-32) TESTS 23 156 2560000
276301765 18o3 G Aug. 13, 2024, 5:37 p.m. OK C++17 (GCC 7-32) TESTS 16 171 2867200
276334093 PeruvianCartel G Aug. 14, 2024, 1:14 a.m. OK C++17 (GCC 7-32) TESTS 23 171 4096000
276306172 NTTseep123 G Aug. 13, 2024, 6:08 p.m. OK C++17 (GCC 7-32) TESTS 16 171 5529600
276315018 darkmagenta G Aug. 13, 2024, 7:26 p.m. OK C++17 (GCC 7-32) TESTS 16 186 6656000
276352721 abyss7893 G Aug. 14, 2024, 5:14 a.m. OK C++17 (GCC 7-32) TESTS 23 187 3276800
276323274 naruto__18 G Aug. 13, 2024, 9:06 p.m. OK C++17 (GCC 7-32) TESTS 16 187 5529600
276355807 cwza G Aug. 14, 2024, 5:46 a.m. OK C++17 (GCC 7-32) TESTS 23 187 5632000
276311470 AKMi001 G Aug. 13, 2024, 6:50 p.m. OK C++17 (GCC 7-32) TESTS 16 187 8396800
276356902 Nienie0730 G Aug. 14, 2024, 5:57 a.m. OK C++17 (GCC 7-32) TESTS 23 187 14745600
276350889 qingyu17sta G Aug. 14, 2024, 4:55 a.m. OK C++20 (GCC 13-64) TESTS 23 78 12902400
276351348 gao_feng G Aug. 14, 2024, 5 a.m. OK C++20 (GCC 13-64) TESTS 23 109 20070400
276349669 qingyu17sta G Aug. 14, 2024, 4:41 a.m. OK C++20 (GCC 13-64) TESTS 23 124 13619200
276318317 hadymo7med G Aug. 13, 2024, 8:02 p.m. OK C++20 (GCC 13-64) TESTS 16 140 4096000
276346837 mapleKing G Aug. 14, 2024, 4:07 a.m. OK C++20 (GCC 13-64) TESTS 23 140 4403200
276307166 SoyO_official G Aug. 13, 2024, 6:15 p.m. OK C++20 (GCC 13-64) TESTS 16 140 4505600
276338425 zacharychao G Aug. 14, 2024, 2:22 a.m. OK C++20 (GCC 13-64) TESTS 23 140 6451200
276305277 fanhuaxingyu G Aug. 13, 2024, 6:01 p.m. OK C++20 (GCC 13-64) TESTS 16 140 7168000
276327024 biank G Aug. 13, 2024, 10:13 p.m. OK C++20 (GCC 13-64) TESTS 23 140 7782400
276303453 NoonMaple G Aug. 13, 2024, 5:48 p.m. OK C++20 (GCC 13-64) TESTS 16 140 11059200
276319132 dzhi G Aug. 13, 2024, 8:12 p.m. OK Java 21 TESTS 16 1171 33894400
276318852 dzhi G Aug. 13, 2024, 8:08 p.m. OK Java 21 TESTS 16 1233 35430400
276345123 Zhanzhe_Lee G Aug. 14, 2024, 3:46 a.m. OK Java 21 TESTS 23 2764 35737600
276322728 Eslam_Ahmed G Aug. 13, 2024, 8:58 p.m. OK Java 21 TESTS 16 2905 16896000
276322670 Eslam_Ahmed G Aug. 13, 2024, 8:57 p.m. OK Java 8 TESTS 16 2639 14540800
276322482 Eslam_Ahmed G Aug. 13, 2024, 8:55 p.m. OK Java 8 TESTS 16 3921 14643200
276340718 the_last_smilodon G Aug. 14, 2024, 2:51 a.m. OK PyPy 3 TESTS 23 3389 51200000
276341002 the_last_smilodon G Aug. 14, 2024, 2:54 a.m. OK PyPy 3 TESTS 23 3749 51097600
276341281 the_last_smilodon G Aug. 14, 2024, 2:58 a.m. OK PyPy 3 TESTS 23 3890 47616000
276339467 the_last_smilodon G Aug. 14, 2024, 2:35 a.m. OK PyPy 3 TESTS 23 3921 47718400
276308049 cy171 G Aug. 13, 2024, 6:21 p.m. OK PyPy 3-64 TESTS 16 750 37785600
276351802 cy171 G Aug. 14, 2024, 5:05 a.m. OK PyPy 3-64 TESTS 23 765 48947200
276341421 gardengnome G Aug. 14, 2024, 2:59 a.m. OK PyPy 3-64 TESTS 23 796 40550400
276315178 Abdulxay... G Aug. 13, 2024, 7:28 p.m. OK PyPy 3-64 TESTS 16 2265 35532800
276326695 grind_like_gm G Aug. 13, 2024, 10:06 p.m. OK PyPy 3-64 TESTS 23 3421 76595200
276317108 SS_CM G Aug. 13, 2024, 7:49 p.m. OK PyPy 3-64 TESTS 16 3593 125030400
276308572 LMeyling G Aug. 13, 2024, 6:25 p.m. OK PyPy 3-64 TESTS 16 3687 72499200
276310947 PaciukZvichainyi G Aug. 13, 2024, 6:46 p.m. OK Rust 2021 TESTS 16 1499 24166400

remove filters

Back to search problems