Codeforces Round 659 (Div. 1)

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
1383 Codeforces Round 659 (Div. 1) FINISHED False 7200 141665063 July 24, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 374 ) F Special Edges PROGRAMMING flows graphs

B"Koa the Koala has a directed graph G with n nodes and m edges. Each edge has a capacity associated with it. Exactly k edges of the graph, numbered from 1 to k , are special, such edges initially have a capacity equal to 0 . Koa asks you q queries. In each query she gives you k integers w_1, w_2, ldots, w_k . This means that capacity of the i -th special edge becomes w_i (and other capacities remain the same). Koa wonders: what is the maximum flow that goes from node 1 to node n after each such query? Help her! The first line of the input contains four integers n , m , k , q ( 2 <= n <= 10^4 , 1 <= m <= 10^4 , 1 <= k <= min(10, m) , 1 <= q <= 2 cdot 10^5 ) -- the number of nodes, the number of edges, the number of special edges and the number of queries. Each of the next m lines contains three integers u , v , w ( 1 <= u, v <= n ; 0 <= w <= 25 ) -- the description of a directed edge from node u to node v with capacity w . Edges are numbered starting from 1 in the same order they are listed in the input. The first k edges are the special edges. It is guaranteed that w_i = 0 for all i with 1 <= i <= k . Each of the next q lines contains k integers w_1, w_2, ldots, w_k ( 0 <= w_i <= 25 ) -- the description of the query. w_i denotes the capacity of i -th edge. For the i -th query, print one integer res_i -- the maximum flow that can be obtained from node 1 to node n given the i -th query's special edge weights. For the second sample, the following images correspond to the first two queries (from left to right respectively). For each edge there is a pair flow/capacity denoting flow pushed through the edge and edge's capacity. The special edges are colored in red. As you can see i"...

Tutorials

Codeforces Round #659 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
87897927 rainboy F July 24, 2020, 3:28 p.m. OK GNU C11 TESTS 62 1450 5632000
88204224 _twilight F July 28, 2020, 12:43 p.m. OK GNU C++11 TESTS 96 3759 5836800
89080377 frodakcin F Aug. 6, 2020, 2:24 a.m. OK GNU C++11 TESTS 96 4102 124928000
88673071 subhokundu F Aug. 1, 2020, 2:33 p.m. OK GNU C++11 TESTS 96 4195 6656000
89377747 xiahongyu F Aug. 9, 2020, 6:27 a.m. OK GNU C++11 TESTS 96 4227 6451200
89080099 frodakcin F Aug. 6, 2020, 2:17 a.m. OK GNU C++11 TESTS 96 4227 124928000
88125652 emoairx F July 27, 2020, 12:26 p.m. OK GNU C++11 TESTS 89 4555 7475200
88290984 littlelittlehorse F July 29, 2020, 1:49 p.m. OK GNU C++11 TESTS 96 4867 13721600
88291047 littlelittlehorse F July 29, 2020, 1:50 p.m. OK GNU C++11 TESTS 96 4882 13721600
88290376 littlelittlehorse F July 29, 2020, 1:41 p.m. OK GNU C++11 TESTS 96 4929 13721600
91547654 gongsuidashen F Sept. 1, 2020, 8:12 a.m. OK GNU C++11 TESTS 96 4960 1740800
88117712 pajenegod F July 27, 2020, 10:32 a.m. OK GNU C++14 TESTS 87 1637 36761600
88117843 pajenegod F July 27, 2020, 10:34 a.m. OK GNU C++14 TESTS 87 1653 37478400
88104366 Devil F July 27, 2020, 7:05 a.m. OK GNU C++14 TESTS 87 3478 6041600
89987914 liyuankai F Aug. 15, 2020, 5:26 a.m. OK GNU C++14 TESTS 96 4586 2764800
89987365 liyuankai F Aug. 15, 2020, 5:17 a.m. OK GNU C++14 TESTS 96 4617 2764800
88186399 zhouzhendong F July 28, 2020, 8:38 a.m. OK GNU C++14 TESTS 96 4617 5222400
88365016 Deepraj99 F July 29, 2020, 4:33 p.m. OK GNU C++14 TESTS 96 4648 5222400
88162348 krijgertje F July 27, 2020, 11:44 p.m. OK GNU C++14 TESTS 94 4664 13926400
88186228 zhouzhendong F July 28, 2020, 8:35 a.m. OK GNU C++14 TESTS 96 4695 5222400
88122060 yasugongshang F July 27, 2020, 11:36 a.m. OK GNU C++14 TESTS 87 4742 5324800
87911622 tourist F July 24, 2020, 4:02 p.m. OK GNU C++17 TESTS 62 1107 88166400
91243720 ks3rr F Aug. 28, 2020, 8:49 p.m. OK GNU C++17 TESTS 96 1123 30924800
87908295 Radewoosh F July 24, 2020, 3:53 p.m. OK GNU C++17 TESTS 62 1201 39731200
89453916 wlzhouzhuan F Aug. 9, 2020, 4:50 p.m. OK GNU C++17 TESTS 96 1247 41676800
88284373 Devil F July 29, 2020, 12:22 p.m. OK GNU C++17 TESTS 96 1294 34508800
88917534 Devil F Aug. 5, 2020, 5:26 a.m. OK GNU C++17 TESTS 96 1497 39936000
88118238 pajenegod F July 27, 2020, 10:41 a.m. OK GNU C++17 TESTS 87 1560 41062400
88117962 pajenegod F July 27, 2020, 10:36 a.m. OK GNU C++17 TESTS 87 1606 40652800
87913953 jtnydv25 F July 24, 2020, 4:08 p.m. OK GNU C++17 TESTS 62 1731 235315200
88143085 Devil F July 27, 2020, 4:12 p.m. OK GNU C++17 TESTS 93 1934 38809600
88284903 Devil F July 29, 2020, 12:28 p.m. OK GNU C++17 (64) TESTS 96 966 35430400
87912844 yosupo F July 24, 2020, 4:05 p.m. OK GNU C++17 (64) TESTS 62 1138 6963200
91633513 vjudge1 F Sept. 2, 2020, 10:57 a.m. OK GNU C++17 (64) TESTS 96 1169 31027200
88917643 Devil F Aug. 5, 2020, 5:28 a.m. OK GNU C++17 (64) TESTS 96 1216 32768000
91624204 vjudge1 F Sept. 2, 2020, 8:26 a.m. OK GNU C++17 (64) TESTS 96 1294 41574400
87971241 cuizhuyefei F July 25, 2020, 8:31 a.m. OK GNU C++17 (64) TESTS 65 1528 169267200
87913228 ecnerwala F July 24, 2020, 4:06 p.m. OK GNU C++17 (64) TESTS 62 1575 16896000
87899541 tfg F July 24, 2020, 3:31 p.m. OK GNU C++17 (64) TESTS 62 1653 13312000
88189933 Dgeka24 F July 28, 2020, 9:25 a.m. OK GNU C++17 (64) TESTS 96 1778 44134400
87901413 Benq F July 24, 2020, 3:36 p.m. OK GNU C++17 (64) TESTS 62 1840 16691200

remove filters

Back to search problems