Codeforces Round 621 (Div. 1 + 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
1307 Codeforces Round 621 (Div. 1 + Div. 2) FINISHED False 8100 155399111 Feb. 17, 2020, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 508 ) G Cow and Exercise PROGRAMMING flows graphs shortest paths 3000

B"Farmer John is obsessed with making Bessie exercise more! Bessie is out grazing on the farm, which consists of n fields connected by m directed roads. Each road takes some time w_i to cross. She is currently at field 1 and will return to her home at field n at the end of the day. Farmer John has plans to increase the time it takes to cross certain roads. He can increase the time it takes to cross each road by a nonnegative amount, but the total increase cannot exceed x_i for the i -th plan. Determine the maximum he can make the shortest path from 1 to n for each of the q independent plans. The first line contains integers n and m ( 2 <= n <= 50 , 1 <= m <= n cdot (n-1) ) -- the number of fields and number of roads, respectively. Each of the following m lines contains 3 integers, u_i , v_i , and w_i ( 1 <= u_i, v_i <= n , 1 <= w_i <= 10^6 ), meaning there is an road from field u_i to field v_i that takes w_i time to cross. It is guaranteed that there exists a way to get to field n from field 1 . It is guaranteed that the graph does not contain self-loops or parallel edges. It is possible to have a road from u to v and a road from v to u . The next line contains a single integer q ( 1 <= q <= 10^5 ), the number of plans. Each of the following q lines contains a single integer x_i , the query ( 0 <= x_i <= 10^5 ). For each query, output the maximum Farmer John can make the shortest path if the total increase does not exceed x_i . Your answer is considered correct if its absolute or relative error does not exceed 10^{-6} . Formally, let your answer be a , and the jury's answer be b . Your answer is accepted if and only if frac{|a - b|}{ max{(1, |b|)}} <= 10^{-6} . "...

Tutorials

Codeforces Round #621 (Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71446906 rainboy G Feb. 19, 2020, 3:29 p.m. OK GNU C11 TESTS 53 561 1126400 3000
71400578 rainboy G Feb. 18, 2020, 7:21 p.m. OK GNU C11 TESTS 53 561 1126400 3000
71393502 rainboy G Feb. 18, 2020, 5:08 p.m. OK GNU C11 TESTS 53 577 1126400 3000
71486257 goodmorning200 G Feb. 20, 2020, 10:12 a.m. OK GNU C++11 TESTS 53 93 409600 3000
71400587 MaxAh G Feb. 18, 2020, 7:21 p.m. OK GNU C++11 TESTS 53 109 1945600 3000
71346918 daydream. G Feb. 18, 2020, 1:10 a.m. OK GNU C++11 TESTS 53 109 1945600 3000
71471772 Fuyuki G Feb. 20, 2020, 4:23 a.m. OK GNU C++11 TESTS 53 124 102400 3000
71573067 SaRcAsTiC_CoDeRr G Feb. 21, 2020, 7:52 p.m. OK GNU C++11 TESTS 53 124 204800 3000
71462828 BigBag G Feb. 19, 2020, 9:13 p.m. OK GNU C++11 TESTS 53 124 204800 3000
71462810 BigBag G Feb. 19, 2020, 9:13 p.m. OK GNU C++11 TESTS 53 124 204800 3000
71506586 vjudge4 G Feb. 20, 2020, 4:35 p.m. OK GNU C++11 TESTS 53 124 512000 3000
71537359 vjudge5 G Feb. 21, 2020, 8:24 a.m. OK GNU C++11 TESTS 53 124 512000 3000
71507589 vjudge4 G Feb. 20, 2020, 4:55 p.m. OK GNU C++11 TESTS 53 124 512000 3000
71555408 ZZZZZZZZZZZZZZZZZZ G Feb. 21, 2020, 2:16 p.m. OK GNU C++14 TESTS 53 124 102400 3000
71322572 QAQAutoMaton G Feb. 17, 2020, 5:14 p.m. OK GNU C++14 TESTS 53 124 16384000 3000
71548595 Scut82 G Feb. 21, 2020, 12:16 p.m. OK GNU C++14 TESTS 53 139 409600 3000
71382098 lyk248289469 G Feb. 18, 2020, 1:54 p.m. OK GNU C++14 TESTS 53 139 614400 3000
71400592 rainboy G Feb. 18, 2020, 7:21 p.m. OK GNU C++14 TESTS 53 139 1024000 3000
71446915 rainboy G Feb. 19, 2020, 3:29 p.m. OK GNU C++14 TESTS 53 140 1024000 3000
71367987 div_4610 G Feb. 18, 2020, 9:55 a.m. OK GNU C++14 TESTS 53 140 1433600 3000
71449927 kmjp G Feb. 19, 2020, 4:24 p.m. OK GNU C++14 TESTS 53 140 1433600 3000
71527906 sunnuozhou G Feb. 21, 2020, 5:02 a.m. OK GNU C++14 TESTS 53 140 1638400 3000
71380664 HIR180 G Feb. 18, 2020, 1:34 p.m. OK GNU C++14 TESTS 53 140 3174400 3000
71320475 yosupo G Feb. 17, 2020, 5:05 p.m. OK GNU C++17 TESTS 53 124 716800 3000
71327328 gisp_zjz G Feb. 17, 2020, 5:33 p.m. OK GNU C++17 TESTS 53 124 2252800 3000
71598333 tEMMIE.w. G Feb. 22, 2020, 8:35 a.m. OK GNU C++17 TESTS 53 140 102400 3000
71372870 RedGrey1993 G Feb. 18, 2020, 11:35 a.m. OK GNU C++17 TESTS 53 140 512000 3000
71328139 Roundgod G Feb. 17, 2020, 5:37 p.m. OK GNU C++17 TESTS 53 140 614400 3000
71387830 Max.D. G Feb. 18, 2020, 3:24 p.m. OK GNU C++17 TESTS 53 140 716800 3000
71326293 beet G Feb. 17, 2020, 5:29 p.m. OK GNU C++17 TESTS 53 140 5222400 3000
71367556 Zory G Feb. 18, 2020, 9:47 a.m. OK GNU C++17 TESTS 53 155 3276800 3000
71478692 El-Psy-Kongroo G Feb. 20, 2020, 7:28 a.m. OK GNU C++17 TESTS 53 155 4096000 3000
71321233 orzdjq G Feb. 17, 2020, 5:08 p.m. OK GNU C++17 TESTS 53 155 10342400 3000

remove filters

Back to search problems