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 |
---|---|---|---|---|---|---|
1715 | Codeforces Round 816 (Div. 2) | FINISHED | False | 8100 | 70817099 | Aug. 20, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1750 ) | E | Long Way Home | PROGRAMMING | data structures divide and conquer dp geometry graphs shortest paths |
B'Stanley lives in a country that consists of n cities (he lives in city 1 ). There are bidirectional roads between some of the cities, and you know how long it takes to ride through each of them. Additionally, there is a flight between each pair of cities, the flight between cities u and v takes (u - v)^2 time. Stanley is quite afraid of flying because of watching "Sully: Miracle on the Hudson" recently, so he can take at most k flights. Stanley wants to know the minimum time of a journey to each of the n cities from the city 1 . In the first line of input there are three integers n , m , and k ( 2 <= q n <= q 10^{5} , 1 <= q m <= q 10^{5} , 1 <= q k <= q 20 ) -- the number of cities, the number of roads, and the maximal number of flights Stanley can take. The following m lines describe the roads. Each contains three integers u , v , w ( 1 <= q u, v <= q n , u neq v , 1 <= q w <= q 10^{9} ) -- the cities the road connects and the time it takes to ride through. Note that some pairs of cities may be connected by more than one road. Print n integers, i -th of which is equal to the minimum time of traveling to city i . In the first sample, it takes no time to get to city 1; to get to city 2 it is possible to use a flight between 1 and 2, which will take 1 unit of time; to city 3 you can get via a road from city 1, which will take 1 unit of time. In the second sample, it also takes no time to get to city 1. To get to city 2 Stanley should use a flight between 1 and 2, which will take 1 unit of time. To get to city 3 Stanley can ride between cities 1 and 2, which will take 3 units of time, and then use a flight between 2 and 3. To get to city 4 Stanley should use a flight between 1 and 2, then take a ride from 2 to 4, which will take 5 units of time. '... |
Codeforces Round #816 (Div. 2) editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
169260990 | gcet_2024 | E | Aug. 21, 2022, 4:58 p.m. | OK | GNU C11 | TESTS | 82 | 967 | 9113600 | ||
169197273 | acacaction | E | Aug. 21, 2022, 4:38 a.m. | OK | GNU C++14 | TESTS | 81 | 733 | 11161600 | ||
169289955 | sonderl | E | Aug. 22, 2022, 2:36 a.m. | OK | GNU C++14 | TESTS | 82 | 748 | 8396800 | ||
169213380 | free_fantasy | E | Aug. 21, 2022, 8:25 a.m. | OK | GNU C++14 | TESTS | 81 | 748 | 13619200 | ||
169211410 | tangtangpeng | E | Aug. 21, 2022, 8:01 a.m. | OK | GNU C++14 | TESTS | 81 | 764 | 15052800 | ||
169352017 | KylinKSY | E | Aug. 22, 2022, 3:52 p.m. | OK | GNU C++14 | TESTS | 82 | 810 | 8704000 | ||
169214633 | Max_s_xaM | E | Aug. 21, 2022, 8:41 a.m. | OK | GNU C++14 | TESTS | 81 | 810 | 12083200 | ||
169193663 | c20230658 | E | Aug. 21, 2022, 3:23 a.m. | OK | GNU C++14 | TESTS | 81 | 811 | 8499200 | ||
169226962 | Xu_Ke | E | Aug. 21, 2022, 10:53 a.m. | OK | GNU C++14 | TESTS | 82 | 826 | 85299200 | ||
169383826 | Ignotus0 | E | Aug. 23, 2022, 2:01 a.m. | OK | GNU C++14 | TESTS | 82 | 842 | 12083200 | ||
169383765 | Ignotus0 | E | Aug. 23, 2022, 1:58 a.m. | OK | GNU C++14 | TESTS | 82 | 858 | 12083200 | ||
169307132 | duoluoluo | E | Aug. 22, 2022, 7:48 a.m. | OK | GNU C++17 | TESTS | 82 | 748 | 11161600 | ||
169215586 | Bobocan | E | Aug. 21, 2022, 8:52 a.m. | OK | GNU C++17 | TESTS | 81 | 764 | 13312000 | ||
169232415 | nianheng233 | E | Aug. 21, 2022, 11:50 a.m. | OK | GNU C++17 | TESTS | 82 | 811 | 11980800 | ||
169214780 | Bobocan | E | Aug. 21, 2022, 8:42 a.m. | OK | GNU C++17 | TESTS | 81 | 826 | 10649600 | ||
169280135 | thunopro | E | Aug. 21, 2022, 9:38 p.m. | OK | GNU C++17 | TESTS | 82 | 826 | 15974400 | ||
169249584 | Food_Chain_Rule | E | Aug. 21, 2022, 2:55 p.m. | OK | GNU C++17 | TESTS | 82 | 842 | 14745600 | ||
169284261 | NegaTeeF | E | Aug. 21, 2022, 11:56 p.m. | OK | GNU C++17 | TESTS | 82 | 858 | 9523200 | ||
169317765 | micromilo | E | Aug. 22, 2022, 9:46 a.m. | OK | GNU C++17 | TESTS | 82 | 889 | 9318400 | ||
169245158 | runde | E | Aug. 21, 2022, 2:07 p.m. | OK | GNU C++17 | TESTS | 82 | 889 | 15155200 | ||
169214171 | Bobocan | E | Aug. 21, 2022, 8:35 a.m. | OK | GNU C++17 | TESTS | 81 | 904 | 10649600 | ||
169197766 | MVP_DukeX | E | Aug. 21, 2022, 4:48 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 171 | 6041600 | ||
169197250 | KylinKSY | E | Aug. 21, 2022, 4:38 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 561 | 9523200 | ||
169228712 | CharlesWuQiushi | E | Aug. 21, 2022, 11:11 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 608 | 10956800 | ||
169306615 | alif_cse_ju | E | Aug. 22, 2022, 7:41 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 639 | 12288000 | ||
169190430 | czswez | E | Aug. 21, 2022, 2:14 a.m. | OK | GNU C++17 (64) | TESTS | 81 | 654 | 26214400 | ||
169374871 | OMG_wc | E | Aug. 22, 2022, 8:53 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 701 | 14233600 | ||
169273576 | OMG_wc | E | Aug. 21, 2022, 7:27 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 701 | 14233600 | ||
169326339 | JeevanJyot | E | Aug. 22, 2022, 11:23 a.m. | OK | GNU C++17 (64) | TESTS | 82 | 732 | 16281600 | ||
169337510 | zhangboju | E | Aug. 22, 2022, 1:23 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 733 | 17305600 | ||
169282280 | mattagar6 | E | Aug. 21, 2022, 10:40 p.m. | OK | GNU C++17 (64) | TESTS | 82 | 748 | 15974400 | ||
169209901 | Nero | E | Aug. 21, 2022, 7:41 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 530 | 11059200 | ||
169215643 | Elias_Obeid | E | Aug. 21, 2022, 8:53 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 561 | 13312000 | ||
169210540 | Nero | E | Aug. 21, 2022, 7:50 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 576 | 11059200 | ||
169309500 | blank_monster | E | Aug. 22, 2022, 8:16 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 592 | 11366400 | ||
169309687 | blank_monster | E | Aug. 22, 2022, 8:18 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 623 | 11366400 | ||
169386889 | JChanger | E | Aug. 23, 2022, 4:13 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 654 | 9113600 | ||
169303760 | blank_monster | E | Aug. 22, 2022, 7:04 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 654 | 11776000 | ||
169216872 | xxafhixx | E | Aug. 21, 2022, 9:07 a.m. | OK | GNU C++20 (64) | TESTS | 81 | 654 | 12390400 | ||
169386900 | JChanger | E | Aug. 23, 2022, 4:14 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 655 | 9113600 | ||
169304520 | blank_monster | E | Aug. 22, 2022, 7:15 a.m. | OK | GNU C++20 (64) | TESTS | 82 | 670 | 11776000 | ||
169379117 | dzhi | E | Aug. 22, 2022, 10:47 p.m. | OK | Java 11 | TESTS | 82 | 2246 | 37785600 | ||
169379774 | dzhi | E | Aug. 22, 2022, 11:11 p.m. | OK | Java 11 | TESTS | 82 | 2324 | 37785600 | ||
169379669 | dzhi | E | Aug. 22, 2022, 11:06 p.m. | OK | Java 11 | TESTS | 82 | 2371 | 37785600 | ||
169379838 | dzhi | E | Aug. 22, 2022, 11:13 p.m. | OK | Java 11 | TESTS | 82 | 2511 | 37785600 | ||
169187932 | NatInTheHat | E | Aug. 21, 2022, 1:16 a.m. | OK | Java 8 | TESTS | 81 | 2776 | 122675200 | ||
169317567 | r57shell | E | Aug. 22, 2022, 9:44 a.m. | OK | MS C++ 2017 | TESTS | 82 | 1013 | 13926400 | ||
169253368 | magnus.hegdahl | E | Aug. 21, 2022, 3:34 p.m. | OK | Rust 2021 | TESTS | 82 | 342 | 33689600 | ||
169253522 | magnus.hegdahl | E | Aug. 21, 2022, 3:36 p.m. | OK | Rust 2021 | TESTS | 82 | 343 | 33382400 | ||
169253574 | magnus.hegdahl | E | Aug. 21, 2022, 3:37 p.m. | OK | Rust 2021 | TESTS | 82 | 358 | 35532800 | ||
169189904 | sansen | E | Aug. 21, 2022, 2:03 a.m. | OK | Rust 2021 | TESTS | 81 | 358 | 48537600 | ||
169253552 | magnus.hegdahl | E | Aug. 21, 2022, 3:37 p.m. | OK | Rust 2021 | TESTS | 82 | 374 | 33792000 | ||
169253481 | magnus.hegdahl | E | Aug. 21, 2022, 3:36 p.m. | OK | Rust 2021 | TESTS | 82 | 389 | 39526400 | ||
169253044 | magnus.hegdahl | E | Aug. 21, 2022, 3:30 p.m. | OK | Rust 2021 | TESTS | 82 | 390 | 23347200 | ||
169251984 | magnus.hegdahl | E | Aug. 21, 2022, 3:18 p.m. | OK | Rust 2021 | TESTS | 82 | 670 | 18534400 | ||
169189818 | sansen | E | Aug. 21, 2022, 2:01 a.m. | OK | Rust 2021 | TESTS | 81 | 732 | 21708800 | ||
169243903 | magnus.hegdahl | E | Aug. 21, 2022, 1:54 p.m. | OK | Rust 2021 | TESTS | 82 | 1029 | 21094400 |
Back to search problems