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 |
---|---|---|---|---|---|---|
1082 | Educational Codeforces Round 55 (Rated for Div. 2) | FINISHED | False | 7200 | 188407499 | Nov. 28, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2143 ) | G | Petya and Graph | PROGRAMMING | flows graphs | 2400 |
B'Petya has a simple graph (that is, a graph without loops or multiple edges) consisting of n vertices and m edges. The weight of the i -th vertex is a_i . The weight of the i -th edge is w_i . A subgraph of a graph is some set of the graph vertices and some set of the graph edges. The set of edges must meet the condition: both ends of each edge from the set must belong to the chosen set of vertices. The weight of a subgraph is the sum of the weights of its edges, minus the sum of the weights of its vertices. You need to find the maximum weight of subgraph of given graph. The given graph does not contain loops and multiple edges. The first line contains two numbers n and m ( 1 <= n <= 10^3, 0 <= m <= 10^3 ) - the number of vertices and edges in the graph, respectively. The next line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) - the weights of the vertices of the graph. The following m lines contain edges: the i -e edge is defined by a triple of integers v_i, u_i, w_i ( 1 <= v_i, u_i <= n, 1 <= w_i <= 10^9, v_i neq u_i ). This triple means that between the vertices v_i and u_i there is an edge of weight w_i . It is guaranteed that the graph does not contain loops and multiple edges. Print one integer -- the maximum weight of the subgraph of the given graph. In the first test example, the optimal subgraph consists of the vertices {1, 3, 4} and has weight 4 + 4 + 5 - (1 + 2 + 2) = 8 . In the second test case, the optimal subgraph is empty. '... |
63544 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
49125423 | rainboy | G | Jan. 28, 2019, 10:25 p.m. | OK | GNU C11 | TESTS | 32 | 31 | 204800 | 2400 | |
55182077 | sansen | G | June 5, 2019, 11:47 p.m. | OK | GNU C11 | TESTS | 32 | 31 | 307200 | 2400 | |
46452993 | _aether | G | Dec. 1, 2018, 4:33 p.m. | OK | GNU C++11 | TESTS | 32 | 30 | 204800 | 2400 | |
46389153 | LucienShui | G | Nov. 30, 2018, 3:47 a.m. | OK | GNU C++11 | TESTS | 32 | 30 | 204800 | 2400 | |
54591040 | vjudge1 | G | May 25, 2019, 8:41 a.m. | OK | GNU C++11 | TESTS | 32 | 30 | 204800 | 2400 | |
46857034 | Zayin | G | Dec. 10, 2018, 3:29 p.m. | OK | GNU C++11 | TESTS | 32 | 30 | 204800 | 2400 | |
68656073 | alex_Harry | G | Jan. 12, 2020, 12:16 p.m. | OK | GNU C++11 | TESTS | 32 | 30 | 409600 | 2400 | |
53077347 | Scut82 | G | April 21, 2019, 2:14 a.m. | OK | GNU C++11 | TESTS | 32 | 30 | 819200 | 2400 | |
46397090 | Sooke | G | Nov. 30, 2018, 10:05 a.m. | OK | GNU C++11 | TESTS | 32 | 30 | 1433600 | 2400 | |
49034812 | vjudge1 | G | Jan. 27, 2019, 2:22 a.m. | OK | GNU C++11 | TESTS | 32 | 30 | 3379200 | 2400 | |
66614098 | whql | G | Dec. 11, 2019, 1:51 a.m. | OK | GNU C++11 | TESTS | 32 | 30 | 13209600 | 2400 | |
46339121 | meopass_0v0 | G | Nov. 28, 2018, 4:27 p.m. | OK | GNU C++11 | TESTS | 32 | 30 | 35328000 | 2400 | |
47008594 | iqqsoszs | G | Dec. 14, 2018, 3:13 p.m. | OK | GNU C++14 | TESTS | 32 | 15 | 307200 | 2400 | |
56432726 | bluefi | G | July 2, 2019, 12:47 p.m. | OK | GNU C++14 | TESTS | 32 | 15 | 409600 | 2400 | |
68977599 | Jeffrey | G | Jan. 17, 2020, 9:26 a.m. | OK | GNU C++14 | TESTS | 32 | 15 | 409600 | 2400 | |
46390535 | MarcosK | G | Nov. 30, 2018, 5:25 a.m. | OK | GNU C++14 | TESTS | 32 | 15 | 512000 | 2400 | |
46350009 | Danylo99 | G | Nov. 28, 2018, 8:46 p.m. | OK | GNU C++14 | TESTS | 32 | 15 | 512000 | 2400 | |
46750739 | Bong.06 | G | Dec. 8, 2018, 9:04 a.m. | OK | GNU C++14 | TESTS | 32 | 15 | 512000 | 2400 | |
46583545 | minson123 | G | Dec. 4, 2018, 12:14 p.m. | OK | GNU C++14 | TESTS | 32 | 15 | 512000 | 2400 | |
46354122 | wleung_bvg | G | Nov. 29, 2018, 7:11 a.m. | OK | GNU C++14 | TESTS | 32 | 15 | 614400 | 2400 | |
47350253 | ToMmyDong | G | Dec. 22, 2018, 1:48 a.m. | OK | GNU C++14 | TESTS | 32 | 15 | 614400 | 2400 | |
47016036 | Anachor | G | Dec. 14, 2018, 7:05 p.m. | OK | GNU C++14 | TESTS | 32 | 15 | 614400 | 2400 | |
46705117 | Quasrain | G | Dec. 7, 2018, 6:33 a.m. | OK | GNU C++17 | TESTS | 32 | 15 | 102400 | 2400 | |
46775659 | filippos | G | Dec. 8, 2018, 8:08 p.m. | OK | GNU C++17 | TESTS | 32 | 15 | 409600 | 2400 | |
46390619 | UESTC_Forsaken | G | Nov. 30, 2018, 5:30 a.m. | OK | GNU C++17 | TESTS | 32 | 15 | 512000 | 2400 | |
46422694 | ivan100sic | G | Nov. 30, 2018, 11:26 p.m. | OK | GNU C++17 | TESTS | 32 | 15 | 614400 | 2400 | |
47966681 | golden_deathadder | G | Jan. 5, 2019, 12:29 p.m. | OK | GNU C++17 | TESTS | 32 | 15 | 716800 | 2400 | |
46445301 | _comfortably_numb | G | Dec. 1, 2018, 1:06 p.m. | OK | GNU C++17 | TESTS | 32 | 15 | 716800 | 2400 | |
58073692 | low_kii_savage | G | July 31, 2019, 11:36 a.m. | OK | GNU C++17 | TESTS | 32 | 15 | 716800 | 2400 | |
50919307 | luogu_bot2 | G | March 7, 2019, 8:17 a.m. | OK | GNU C++17 | TESTS | 32 | 15 | 13824000 | 2400 | |
46371100 | nevernow | G | Nov. 29, 2018, 3:50 p.m. | OK | GNU C++17 | TESTS | 32 | 30 | 102400 | 2400 | |
46692300 | haleyk100198 | G | Dec. 6, 2018, 5:19 p.m. | OK | GNU C++17 | TESTS | 32 | 30 | 204800 | 2400 | |
52216679 | Ahmad | G | April 2, 2019, 2:39 a.m. | OK | Java 8 | TESTS | 32 | 109 | 0 | 2400 | |
52218258 | xodiac | G | April 2, 2019, 4:31 a.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
49125422 | Dukkha | G | Jan. 28, 2019, 10:25 p.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
47883602 | Suzukaze | G | Jan. 3, 2019, 8:03 p.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
46540349 | PrakharJain | G | Dec. 3, 2018, 11:38 a.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
46346132 | SchrodZzz | G | Nov. 28, 2018, 6:15 p.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
47820588 | spar5h | G | Jan. 1, 2019, 5:25 p.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
52218303 | xodiac | G | April 2, 2019, 4:34 a.m. | OK | Java 8 | TESTS | 32 | 124 | 0 | 2400 | |
46349894 | Harpae | G | Nov. 28, 2018, 8:41 p.m. | OK | Java 8 | TESTS | 32 | 124 | 4710400 | 2400 | |
46345150 | Harpae | G | Nov. 28, 2018, 5:42 p.m. | OK | Java 8 | TESTS | 32 | 124 | 4710400 | 2400 | |
46527630 | peregrinus | G | Dec. 3, 2018, 12:24 a.m. | OK | Mono C# | TESTS | 32 | 93 | 103628800 | 2400 | |
46527613 | peregrinus | G | Dec. 3, 2018, 12:22 a.m. | OK | Mono C# | TESTS | 32 | 155 | 109056000 | 2400 | |
54608752 | vjudge2 | G | May 25, 2019, 10:23 a.m. | OK | MS C++ | TESTS | 32 | 31 | 307200 | 2400 | |
59092295 | vjudge5 | G | Aug. 19, 2019, 1:07 p.m. | OK | MS C++ | TESTS | 32 | 31 | 307200 | 2400 | |
46362981 | cumt_fyj971217 | G | Nov. 29, 2018, noon | OK | MS C++ | TESTS | 32 | 31 | 4300800 | 2400 | |
54609663 | vjudge3 | G | May 25, 2019, 10:48 a.m. | OK | MS C++ | TESTS | 32 | 31 | 4915200 | 2400 | |
46362454 | cumt_fyj971217 | G | Nov. 29, 2018, 11:48 a.m. | OK | MS C++ | TESTS | 32 | 31 | 5120000 | 2400 | |
46362373 | cumt_fyj971217 | G | Nov. 29, 2018, 11:45 a.m. | OK | MS C++ | TESTS | 32 | 31 | 5120000 | 2400 | |
49051255 | vjudge2 | G | Jan. 27, 2019, 11:11 a.m. | OK | MS C++ | TESTS | 32 | 46 | 6656000 | 2400 | |
59645684 | siwei | G | Aug. 29, 2019, 5:37 a.m. | OK | MS C++ 2017 | TESTS | 32 | 140 | 32768000 | 2400 | |
48270980 | tiantian5 | G | Jan. 12, 2019, 2:03 a.m. | OK | PyPy 3 | TESTS | 32 | 296 | 7577600 | 2400 | |
46893170 | Charles_Han | G | Dec. 11, 2018, 7:34 a.m. | OK | Python 3 | TESTS | 32 | 1544 | 1126400 | 2400 | |
46766103 | Charles_Han | G | Dec. 8, 2018, 2:26 p.m. | OK | Python 3 | TESTS | 32 | 1606 | 1228800 | 2400 | |
46339690 | kobae964 | G | Nov. 28, 2018, 4:29 p.m. | OK | Rust | TESTS | 32 | 46 | 105472000 | 2400 |
Back to search problems