Codeforces Testing Round 5

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
267 Codeforces Testing Round 5 FINISHED False 6300 418402823 Jan. 12, 2013, 3 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 251 ) C Berland Traffic PROGRAMMING math matrices 2300

Berland traffic is very different from traffic in other countries. The capital of Berland consists of n junctions and m roads. Each road connects a pair of junctions. There can be multiple roads between a pair of junctions. For each road we know its capacity: value c i is the maximum number of cars that can drive along a road in any direction per a unit of time. For each road, the cars can drive along it in one of two direction. That it, the cars can't simultaneously move in both directions. A road's traffic is the number of cars that goes along it per a unit of time. For road ( a i , b i ) this value is negative, if the traffic moves from b i to a i . A road's traffic can be a non-integer number. The capital has two special junctions — the entrance to the city (junction 1) and the exit from the city (junction n ). For all other junctions it is true that the traffic is not lost there. That is, for all junctions except for 1 and n the incoming traffic sum equals the outgoing traffic sum. Traffic has an unusual peculiarity in the capital of Berland — for any pair of junctions ( x , y ) the sum of traffics along any path from x to y doesn't change depending on the choice of the path. Such sum includes traffic along all roads on the path (possible with the "minus" sign, if the traffic along the road is directed against the direction of the road on the path from x to y ). Your task is to find the largest traffic that can pass trough the city per one unit of time as well as the corresponding traffic for each road. The first line contains a positive integer n — the number of junctions ( 2 ≤ n ≤ 100 ). The second line contains integer m ( 1 ≤ m ≤ 5000 ) — the number of roads. Next m lines contain the roads' descriptions. Each road contains a group of three numbers a i , b i , c i , where a i , b i are the numbers of junctions, connected by the given road, and c i ( 1 ≤ a i , b i ≤ n ; a i ≠ b i ; 0 ≤ c i ≤ 10000 ) is the largest permissible traffic along this road

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
9450146 ljz C Jan. 17, 2015, 12:35 p.m. OK FPC TESTS 32 62 307200 2300
3019660 DiGGeR C Jan. 28, 2013, 1:12 p.m. OK GNU C++ TESTS 32 15 102400 2300
2943290 -DMYTRO- C Jan. 16, 2013, 5 p.m. OK GNU C++ TESTS 32 15 102400 2300
3666470 yedeming C May 4, 2013, 1:05 a.m. OK GNU C++ TESTS 32 15 204800 2300
3226264 -XraY- C March 1, 2013, 4:25 p.m. OK GNU C++ TESTS 32 15 307200 2300
3168831 nikusha24 C Feb. 21, 2013, 6:29 p.m. OK GNU C++ TESTS 32 15 614400 2300
2924451 hariprasath C Jan. 14, 2013, 3:29 p.m. OK GNU C++ TESTS 32 15 614400 2300
2910986 1160 C Jan. 13, 2013, 11:50 a.m. OK GNU C++ TESTS 32 15 614400 2300
4003259 hza C July 2, 2013, 1:36 p.m. OK GNU C++ TESTS 32 15 1331200 2300
14116684 130705009 C Nov. 7, 2015, 5:04 a.m. OK GNU C++ TESTS 32 30 0 2300
11729324 ycdfwzy C June 23, 2015, 11:43 p.m. OK GNU C++ TESTS 32 30 0 2300
3080697 cylixstar C Feb. 7, 2013, 11:43 a.m. OK GNU C++0x TESTS 32 15 204800 2300
8276168 zhj C Oct. 17, 2014, 4:17 a.m. OK GNU C++0x TESTS 32 30 204800 2300
2909020 xlk C Jan. 12, 2013, 5:02 p.m. OK GNU C++0x TESTS 32 31 1331200 2300
8987274 equation314 C Dec. 5, 2014, 3:24 a.m. OK GNU C++0x TESTS 32 62 307200 2300
8511340 zshi C Nov. 1, 2014, 11:53 a.m. OK GNU C++0x TESTS 32 62 409600 2300
2909380 boleyn.su C Jan. 12, 2013, 7:36 p.m. OK GNU C++0x TESTS 32 78 307200 2300
2909378 boleyn.su C Jan. 12, 2013, 7:34 p.m. OK GNU C++0x TESTS 32 93 307200 2300
9539655 superfish C Jan. 24, 2015, 3:21 p.m. OK GNU C++0x TESTS 32 124 204800 2300
16140782 jkxing C Feb. 18, 2016, 12:02 p.m. OK GNU C++11 TESTS 32 30 204800 2300
28314913 wdmmsyf C July 6, 2017, 2:45 a.m. OK GNU C++11 TESTS 32 30 2560000 2300
11717223 SillyFox C June 23, 2015, 4:04 a.m. OK GNU C++11 TESTS 32 60 0 2300
39135535 rushcheyo C June 11, 2018, 3:32 a.m. OK GNU C++11 TESTS 32 60 204800 2300
68854236 vjudge3 C Jan. 15, 2020, 10:06 a.m. OK GNU C++11 TESTS 32 60 10137600 2300
68853284 vjudge5 C Jan. 15, 2020, 9:47 a.m. OK GNU C++11 TESTS 32 62 204800 2300
57897681 lopare C July 28, 2019, 2:17 p.m. OK GNU C++11 TESTS 32 62 204800 2300
57821542 py_ultron C July 26, 2019, 11:44 p.m. OK GNU C++11 TESTS 32 62 204800 2300
43036525 zhouyuyang C Sept. 18, 2018, 1:49 p.m. OK GNU C++11 TESTS 32 62 204800 2300
68843771 vjudge5 C Jan. 15, 2020, 6:42 a.m. OK GNU C++11 TESTS 32 62 307200 2300
23642350 Ali.Pi C Jan. 8, 2017, 7:59 a.m. OK GNU C++14 TESTS 32 60 2048000 2300
51784554 ruo C March 24, 2019, 9:59 a.m. OK GNU C++17 TESTS 32 62 204800 2300
61263081 ivan100sic C Sept. 25, 2019, 12:05 p.m. OK GNU C++17 TESTS 32 62 614400 2300
37679736 NK-Sparrow C April 28, 2018, 8:19 a.m. OK GNU C++17 TESTS 32 62 3891200 2300
2946220 -DMYTRO- C Jan. 16, 2013, 8:33 p.m. OK MS C++ TESTS 32 15 102400 2300
3066588 problem-solved C Feb. 3, 2013, 9:30 a.m. OK MS C++ TESTS 32 15 204800 2300
3066657 problem-solved C Feb. 3, 2013, 10 a.m. OK MS C++ TESTS 32 31 204800 2300
2929578 konstantanter C Jan. 16, 2013, 12:07 p.m. OK MS C++ TESTS 32 31 614400 2300
2909789 Milanin C Jan. 12, 2013, 11:55 p.m. OK MS C++ TESTS 32 31 614400 2300

remove filters

Back to search problems