Codeforces Round #Pi (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
567 Codeforces Round #Pi (Div. 2) FINISHED False 9000 337615223 Aug. 5, 2015, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2219 ) E President and Roads PROGRAMMING dfs and similar graphs hashing shortest paths 2600

Berland has n cities, the capital is located in city s , and the historic home town of the President is in city t ( s ≠ t ). The cities are connected by one-way roads, the travel time for each of the road is a positive integer. Once a year the President visited his historic home town t , for which his motorcade passes along some path from s to t (he always returns on a personal plane). Since the president is a very busy man, he always chooses the path from s to t , along which he will travel the fastest. The ministry of Roads and Railways wants to learn for each of the road: whether the President will definitely pass through it during his travels, and if not, whether it is possible to repair it so that it would definitely be included in the shortest path from the capital to the historic home town of the President. Obviously, the road can not be repaired so that the travel time on it was less than one. The ministry of Berland, like any other, is interested in maintaining the budget, so it wants to know the minimum cost of repairing the road. Also, it is very fond of accuracy, so it repairs the roads so that the travel time on them is always a positive integer. The first lines contain four integers n , m , s and t ( 2 ≤ n ≤ 10 5 ; 1 ≤ m ≤ 10 5 ; 1 ≤ s , t ≤ n ) — the number of cities and roads in Berland, the numbers of the capital and of the Presidents' home town ( s ≠ t ). Next m lines contain the roads. Each road is given as a group of three integers a i , b i , l i ( 1 ≤ a i , b i ≤ n ; a i ≠ b i ; 1 ≤ l i ≤ 10 6 ) — the cities that are connected by the i -th road and the time needed to ride along it. The road is directed from city a i to city b i . The cities are numbered from 1 to n . Each pair of cities can have multiple roads between them. It is guaranteed that there is a path from s to t along the roads. Print m lines. The i -th line should contain information about the i -th road (the roads are numbered in the order of appearance in the input). If

Tutorials

Editorial Codeforces Round #Pi

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
14401029 hvcuong98 E Nov. 21, 2015, 3:49 p.m. OK FPC TESTS 109 264 10444800 2600
14417084 ngocdiepnguyen2712 E Nov. 22, 2015, 5:02 p.m. OK FPC TESTS 109 295 20889600 2600
14408409 ngattaro1 E Nov. 22, 2015, 2:16 a.m. OK FPC TESTS 109 296 12800000 2600
13890151 Owaski E Oct. 27, 2015, 12:28 p.m. OK GNU C++ TESTS 109 77 18432000 2600
40986309 ReaLNero1 E July 30, 2018, 8:28 p.m. OK GNU C++ TESTS 109 78 8089600 2600
12461759 ExfJoe E Aug. 11, 2015, 5:33 a.m. OK GNU C++ TESTS 109 78 12083200 2600
22144937 FallDream E Nov. 10, 2016, 9:02 a.m. OK GNU C++ TESTS 109 78 46489600 2600
38653718 luogu_bot1 E May 27, 2018, 11:03 a.m. OK GNU C++ TESTS 109 93 11673600 2600
27553881 vjudge3 E June 4, 2017, 2:03 a.m. OK GNU C++ TESTS 109 93 15872000 2600
27553876 iamz E June 4, 2017, 2:02 a.m. OK GNU C++ TESTS 109 93 15872000 2600
41218540 vjudge3 E Aug. 4, 2018, 2:15 p.m. OK GNU C++ TESTS 109 93 16384000 2600
27553842 vjudge5 E June 4, 2017, 1:58 a.m. OK GNU C++ TESTS 109 93 16691200 2600
27553795 Magic_One E June 4, 2017, 1:50 a.m. OK GNU C++ TESTS 109 93 16691200 2600
56227491 stevenmamba E June 28, 2019, 1:11 p.m. OK GNU C++11 TESTS 109 62 11980800 2600
56224834 luogu_bot2 E June 28, 2019, 11:41 a.m. OK GNU C++11 TESTS 109 62 11980800 2600
63413576 Kylin_ E Oct. 26, 2019, 2:41 a.m. OK GNU C++11 TESTS 109 62 153702400 2600
44546777 SovietPower E Oct. 19, 2018, 1:47 p.m. OK GNU C++11 TESTS 109 77 9011200 2600
56226918 luogu_bot2 E June 28, 2019, 12:58 p.m. OK GNU C++11 TESTS 109 77 11980800 2600
56224472 vjudge5 E June 28, 2019, 11:27 a.m. OK GNU C++11 TESTS 109 77 11980800 2600
50484489 vjudge4 E Feb. 25, 2019, 10:54 a.m. OK GNU C++11 TESTS 109 78 7577600 2600
50481825 vjudge1 E Feb. 25, 2019, 9:24 a.m. OK GNU C++11 TESTS 109 78 7680000 2600
50481819 LJZ_C E Feb. 25, 2019, 9:24 a.m. OK GNU C++11 TESTS 109 78 7680000 2600
20924092 Wuvin E Sept. 26, 2016, 11:40 a.m. OK GNU C++11 TESTS 109 78 7987200 2600
64056404 vjudge2 E Nov. 2, 2019, 1:37 a.m. OK GNU C++14 TESTS 109 124 8806400 2600
31288066 3015218054 E Oct. 14, 2017, 3:07 a.m. OK GNU C++14 TESTS 109 124 12697600 2600
64064942 vjudge4 E Nov. 2, 2019, 5:24 a.m. OK GNU C++14 TESTS 109 124 13721600 2600
64067841 vjudge5 E Nov. 2, 2019, 6:25 a.m. OK GNU C++14 TESTS 109 124 26419200 2600
45462341 vjudge3 E Nov. 9, 2018, 2:03 a.m. OK GNU C++14 TESTS 109 124 49664000 2600
48106828 ArshiaDadras E Jan. 9, 2019, 6:04 a.m. OK GNU C++14 TESTS 109 139 8601600 2600
64059647 vjudge2 E Nov. 2, 2019, 3:14 a.m. OK GNU C++14 TESTS 109 139 22630400 2600
27537606 chielo E June 3, 2017, 6:39 a.m. OK GNU C++14 TESTS 109 140 11366400 2600
59092206 xgcxgc E Aug. 19, 2019, 1:05 p.m. OK GNU C++14 TESTS 109 140 11673600 2600
63244663 heyuanyu E Oct. 23, 2019, 2:20 p.m. OK GNU C++14 TESTS 109 140 13209600 2600
54590325 yukikuni E May 25, 2019, 8:26 a.m. OK GNU C++17 TESTS 109 77 9216000 2600
47361927 Zhang_RQ E Dec. 22, 2018, 9:12 a.m. OK GNU C++17 TESTS 109 93 11264000 2600
64054156 vjudge1 E Nov. 2, 2019, 12:04 a.m. OK GNU C++17 TESTS 109 124 11468800 2600
52628334 Nuist_vida E April 12, 2019, 5:25 a.m. OK GNU C++17 TESTS 109 124 17100800 2600
63635433 vjudge5 E Oct. 28, 2019, 8:04 a.m. OK GNU C++17 TESTS 109 124 21504000 2600
63635359 Lucky_Glass E Oct. 28, 2019, 8:02 a.m. OK GNU C++17 TESTS 109 124 21504000 2600
63688155 C20193618 E Oct. 29, 2019, 12:19 a.m. OK GNU C++17 TESTS 109 124 49664000 2600
61685896 31415926535x E Oct. 2, 2019, 3:47 a.m. OK GNU C++17 TESTS 109 139 12185600 2600
64070603 vjudge5 E Nov. 2, 2019, 7:16 a.m. OK GNU C++17 TESTS 109 140 10854400 2600
64054475 vjudge2 E Nov. 2, 2019, 12:22 a.m. OK GNU C++17 TESTS 109 140 41676800 2600
12845616 edorundo E Sept. 4, 2015, 9:05 p.m. OK Java 7 TESTS 109 467 38297600 2600
12482548 nitegazer E Aug. 12, 2015, 4:26 p.m. OK Java 7 TESTS 109 624 38092800 2600
54698848 nullptr2 E May 26, 2019, 8:56 p.m. OK Java 8 TESTS 109 483 50380800 2600
54549950 zhijunlicd E May 24, 2019, 8:30 a.m. OK Java 8 TESTS 109 499 130048000 2600
12475103 DeJw E Aug. 12, 2015, 7:02 a.m. OK Java 8 TESTS 109 577 41267200 2600
12433045 Sapoyev_Shihnazar E Aug. 10, 2015, 6:17 a.m. OK Java 8 TESTS 109 592 38707200 2600
14779248 szilard E Dec. 13, 2015, 12:18 a.m. OK Java 8 TESTS 109 701 40243200 2600
29373320 hitJudge E Aug. 12, 2017, 9:01 a.m. OK Java 8 TESTS 109 1450 66048000 2600
23881794 physmatman E Jan. 16, 2017, 12:43 p.m. OK Java 8 TESTS 109 1606 66048000 2600
23881831 physmatman E Jan. 16, 2017, 12:45 p.m. OK Java 8 TESTS 109 1747 66048000 2600
12869515 sqc1999 E Sept. 6, 2015, 11:45 a.m. OK MS C# TESTS 109 623 53145600 2600
12619023 Waldis E Aug. 20, 2015, 5:35 p.m. OK MS C++ TESTS 109 186 13721600 2600
12846832 FxF E Sept. 5, 2015, 1:42 a.m. OK MS C++ TESTS 109 202 14233600 2600
12436446 logickaiser E Aug. 10, 2015, 9:46 a.m. OK MS C++ TESTS 109 233 20275200 2600
64059347 vjudge2 E Nov. 2, 2019, 3:05 a.m. OK MS C++ TESTS 109 234 16691200 2600
12432075 BRAD_BIT E Aug. 10, 2015, 4:40 a.m. OK MS C++ TESTS 109 530 34201600 2600
12432047 ZIPP E Aug. 10, 2015, 4:37 a.m. OK MS C++ TESTS 109 530 34201600 2600
12435287 logickaiser E Aug. 10, 2015, 9:30 a.m. OK MS C++ TESTS 109 639 20275200 2600
12729976 TheConfessor E Aug. 28, 2015, 10:43 a.m. OK MS C++ TESTS 109 1216 33280000 2600
12711278 Carups E Aug. 26, 2015, 5:33 p.m. OK MS C++ TESTS 109 1949 17612800 2600
20982734 xqxm E Sept. 29, 2016, 3:36 a.m. OK PyPy 2 TESTS 109 1762 93491200 2600
50350256 augurar E Feb. 23, 2019, 8:12 a.m. OK Python 3 TESTS 109 1481 46387200 2600
35893783 _____k_____ E March 3, 2018, 4:07 p.m. OK Python 3 TESTS 109 1715 71168000 2600
35888558 ______n______ E March 3, 2018, 2:25 p.m. OK Python 3 TESTS 109 1715 71168000 2600
35887047 _____i_____ E March 3, 2018, 1:57 p.m. OK Python 3 TESTS 109 1715 71168000 2600
35883275 ______h______ E March 3, 2018, 12:51 p.m. OK Python 3 TESTS 109 1715 71168000 2600
35883109 ______k______ E March 3, 2018, 12:50 p.m. OK Python 3 TESTS 109 1715 71168000 2600
35875324 ______i______ E March 3, 2018, 8:14 a.m. OK Python 3 TESTS 109 1715 71168000 2600
35873837 ______M______ E March 3, 2018, 7:39 a.m. OK Python 3 TESTS 109 1715 71168000 2600
12490304 fido E Aug. 13, 2015, 10:23 a.m. OK Scala TESTS 109 966 38604800 2600

remove filters

Back to search problems