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 |
|---|---|---|---|---|---|---|
| 903 | Educational Codeforces Round 34 (Rated for Div. 2) | FINISHED | False | 7200 | 263314523 | Dec. 12, 2017, 3:05 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 681 ) | G | Yet Another Maxflow Problem | PROGRAMMING | data structures flows graphs | 2700 |
In this problem you will have to deal with a very special network. The network consists of two parts: part A and part B . Each part consists of n vertices; i -th vertex of part A is denoted as A i , and i -th vertex of part B is denoted as B i . For each index i ( 1 ≤ i < n ) there is a directed edge from vertex A i to vertex A i + 1 , and from B i to B i + 1 , respectively. Capacities of these edges are given in the input. Also there might be several directed edges going from part A to part B (but never from B to A ). You have to calculate the maximum flow value from A 1 to B n in this network. Capacities of edges connecting A i to A i + 1 might sometimes change, and you also have to maintain the maximum flow value after these changes. Apart from that, the network is fixed (there are no changes in part B , no changes of edges going from A to B , and no edge insertions or deletions). Take a look at the example and the notes to understand the structure of the network better. The first line contains three integer numbers n , m and q ( 2 ≤ n , m ≤ 2·10 5 , 0 ≤ q ≤ 2·10 5 ) — the number of vertices in each part, the number of edges going from A to B and the number of changes, respectively. Then n - 1 lines follow, i -th line contains two integers x i and y i denoting that the edge from A i to A i + 1 has capacity x i and the edge from B i to B i + 1 has capacity y i ( 1 ≤ x i , y i ≤ 10 9 ). Then m lines follow, describing the edges from A to B . Each line contains three integers x , y and z denoting an edge from A x to B y with capacity z ( 1 ≤ x , y ≤ n , 1 ≤ z ≤ 10 9 ). There might be multiple edges from A x to B y . And then q lines follow, describing a sequence of changes to the network. i -th line contains two integers v i and w i , denoting that the capacity of the edge from A v i to A v i + 1 is set to w i ( 1 ≤ v i < n , 1 ≤ w i ≤ 10 9 ). Firstly, print the maximum flow value in the original network. Then print q integers, i -th of them must be equal |
| Educational Codeforces Round 34 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 34062590 | LZHlzh | G | Jan. 10, 2018, 5:48 a.m. | OK | GNU C++ | TESTS | 62 | 217 | 74240000 | 2700 | |
| 34064193 | yukuai26 | G | Jan. 10, 2018, 7:47 a.m. | OK | GNU C++ | TESTS | 62 | 280 | 71987200 | 2700 | |
| 33573498 | beginend | G | Dec. 23, 2017, 5:12 p.m. | OK | GNU C++ | TESTS | 62 | 295 | 31846400 | 2700 | |
| 36865697 | saoyang | G | April 2, 2018, 12:18 a.m. | OK | GNU C++ | TESTS | 62 | 295 | 33280000 | 2700 | |
| 36278986 | luogu_bot5 | G | March 14, 2018, 2:28 p.m. | OK | GNU C++ | TESTS | 62 | 311 | 20480000 | 2700 | |
| 36278718 | zsyzsy | G | March 14, 2018, 2:17 p.m. | OK | GNU C++ | TESTS | 62 | 311 | 20480000 | 2700 | |
| 35810621 | newbiegcz | G | March 1, 2018, 12:01 p.m. | OK | GNU C++ | TESTS | 62 | 312 | 38297600 | 2700 | |
| 35786463 | luogu_bot3 | G | Feb. 28, 2018, 1:45 p.m. | OK | GNU C++ | TESTS | 62 | 327 | 24166400 | 2700 | |
| 35786385 | yybyyb | G | Feb. 28, 2018, 1:43 p.m. | OK | GNU C++ | TESTS | 62 | 327 | 24166400 | 2700 | |
| 33885638 | wym6912 | G | Jan. 3, 2018, 1:32 p.m. | OK | GNU C++ | TESTS | 62 | 327 | 36249600 | 2700 | |
| 48046778 | remoon | G | Jan. 7, 2019, 4:22 a.m. | OK | GNU C++11 | TESTS | 62 | 218 | 24883200 | 2700 | |
| 48044343 | ql_wpc | G | Jan. 6, 2019, 11:51 p.m. | OK | GNU C++11 | TESTS | 62 | 218 | 26112000 | 2700 | |
| 69704977 | sunny_fei | G | Jan. 29, 2020, 3:58 a.m. | OK | GNU C++11 | TESTS | 62 | 233 | 28979200 | 2700 | |
| 55832838 | sunny_fei | G | June 20, 2019, 1:58 p.m. | OK | GNU C++11 | TESTS | 62 | 233 | 28979200 | 2700 | |
| 33889079 | petrescu | G | Jan. 3, 2018, 4:41 p.m. | OK | GNU C++11 | TESTS | 62 | 234 | 11059200 | 2700 | |
| 68762831 | dsl2002 | G | Jan. 14, 2020, 8:49 a.m. | OK | GNU C++11 | TESTS | 62 | 249 | 29184000 | 2700 | |
| 55830350 | sunny_fei | G | June 20, 2019, 12:51 p.m. | OK | GNU C++11 | TESTS | 62 | 264 | 21606400 | 2700 | |
| 62084875 | Dream-chasing_Juvenile | G | Oct. 8, 2019, 12:39 a.m. | OK | GNU C++11 | TESTS | 62 | 264 | 31232000 | 2700 | |
| 55830162 | sunny_fei | G | June 20, 2019, 12:45 p.m. | OK | GNU C++11 | TESTS | 62 | 265 | 21606400 | 2700 | |
| 33977818 | wfj_2048 | G | Jan. 7, 2018, 7:05 a.m. | OK | GNU C++11 | TESTS | 62 | 280 | 21299200 | 2700 | |
| 33618693 | Marco_L_T | G | Dec. 25, 2017, 1:59 p.m. | OK | GNU C++14 | TESTS | 62 | 217 | 44544000 | 2700 | |
| 33618637 | Marco_L_T | G | Dec. 25, 2017, 1:57 p.m. | OK | GNU C++14 | TESTS | 62 | 217 | 44544000 | 2700 | |
| 40978839 | ReaLNero1 | G | July 30, 2018, 4:49 p.m. | OK | GNU C++14 | TESTS | 62 | 233 | 43110400 | 2700 | |
| 34079613 | q234rty | G | Jan. 11, 2018, 1:37 a.m. | OK | GNU C++14 | TESTS | 62 | 265 | 67788800 | 2700 | |
| 33975027 | Marisa_Kirisame | G | Jan. 7, 2018, 2:08 a.m. | OK | GNU C++14 | TESTS | 62 | 280 | 62566400 | 2700 | |
| 33354415 | The_Unbeatable | G | Dec. 17, 2017, 1:07 p.m. | OK | GNU C++14 | TESTS | 62 | 389 | 22118400 | 2700 | |
| 47327359 | yzyyylx | G | Dec. 21, 2018, 11:08 a.m. | OK | GNU C++14 | TESTS | 62 | 529 | 31436800 | 2700 | |
| 34301598 | wkr | G | Jan. 19, 2018, 12:11 p.m. | OK | GNU C++14 | TESTS | 62 | 546 | 20377600 | 2700 | |
| 39519407 | xsc | G | June 22, 2018, 2:36 p.m. | OK | GNU C++14 | TESTS | 62 | 561 | 26112000 | 2700 | |
| 33481526 | mengrao | G | Dec. 21, 2017, 1:39 p.m. | OK | GNU C++14 | TESTS | 62 | 576 | 18432000 | 2700 | |
| 64622744 | hjk1030 | G | Nov. 10, 2019, 7:29 a.m. | OK | GNU C++17 | TESTS | 62 | 529 | 35020800 | 2700 | |
| 52781112 | VEGAnn | G | April 15, 2019, 2:22 p.m. | OK | GNU C++17 | TESTS | 62 | 607 | 35840000 | 2700 | |
| 46550204 | aviroop123 | G | Dec. 3, 2018, 5:22 p.m. | OK | GNU C++17 | TESTS | 62 | 654 | 24780800 | 2700 | |
| 40308791 | vjudge1 | G | July 14, 2018, 7:06 a.m. | OK | GNU C++17 | TESTS | 62 | 654 | 30412800 | 2700 | |
| 50597235 | Hacheylight | G | Feb. 28, 2019, 11:02 a.m. | OK | GNU C++17 | TESTS | 62 | 654 | 37683200 | 2700 | |
| 58874501 | vjudge5 | G | Aug. 15, 2019, 5:05 p.m. | OK | GNU C++17 | TESTS | 62 | 655 | 26009600 | 2700 | |
| 38599296 | ddpag | G | May 25, 2018, 2:17 a.m. | OK | GNU C++17 | TESTS | 62 | 685 | 21401600 | 2700 | |
| 58874407 | vjudge2 | G | Aug. 15, 2019, 5:02 p.m. | OK | GNU C++17 | TESTS | 62 | 701 | 26009600 | 2700 | |
| 46746807 | zhongyuwei | G | Dec. 8, 2018, 7:13 a.m. | OK | GNU C++17 | TESTS | 62 | 717 | 20070400 | 2700 | |
| 68716060 | hyjhyj | G | Jan. 13, 2020, 2:29 p.m. | OK | GNU C++17 | TESTS | 62 | 764 | 23040000 | 2700 | |
| 33201875 | uwi | G | Dec. 13, 2017, 4:33 a.m. | OK | Java 8 | TESTS | 62 | 545 | 38604800 | 2700 | |
| 33746475 | about | G | Dec. 28, 2017, 9:52 p.m. | OK | Java 8 | TESTS | 62 | 2854 | 60620800 | 2700 | |
| 46202026 | vjudge1 | G | Nov. 25, 2018, 12:03 p.m. | OK | MS C++ | TESTS | 62 | 468 | 30822400 | 2700 |
Back to search problems