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 |
|---|---|---|---|---|---|---|
| 212 | VK Cup 2012 Finals (unofficial online-version) | FINISHED | False | 9000 | 433954823 | July 16, 2012, 3 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 222 ) | A | Privatization | PROGRAMMING | flows graphs | 2700 |
There is a developed network of flights between Berland and Beerland. All of them belong to the Berland state company BerAvia. Each flight connects some Berland city with some Beerland city. For each flight airplanes fly in both directions. Changes are coming to Berland — the state decided to privatize BerAvia, namely, to sell out all flights to t private companies. Each of these companies wants to get the maximal number of flights, so if the Berland flights are sold unevenly, Berland can be accused of partiality. Berland Government decided to sell the flights as evenly as possible between the t companies. The unevenness of the distribution of flights between companies is calculated as follows. For each city i (both Berland and Beerland) we'll calculate the value of Help the Berland government come up with the most even distribution plan of selling flights. The first input line contains four integers n , m , k and t ( 1 ≤ n , m , t ≤ 200;1 ≤ k ≤ 5000 ), where n , m are the numbers of cities in Berland and Beerland, correspondingly, k is the number of flights between them, and t is the number of private companies. Next k lines describe the flights, one per line, as pairs of positive integers x i , y i ( 1 ≤ x i ≤ n ;1 ≤ y i ≤ m ), where x i and y i are the indexes of cities in Berland and Beerland, correspondingly, connected by the i -th flight. There is at most one flight between any pair of cities, each flight connects cities of different countries. The cities in Berland are indexed from 1 to n , and in Beerland — from 1 to m . Print the unevenness of the sought plan on the first line. On the second line print a sequence of k integers c 1 , c 2 , ..., c k ( 1 ≤ c i ≤ t ), where c i is the index of the company that should buy the i -th flight. Assume that the flights are indexed from 1 to k in the order they appear in the input. If there are multiple solutions, print any of them. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1913805 | tourist | A | July 20, 2012, 10:46 a.m. | OK | Delphi | TESTS | 70 | 60 | 54169600 | 2700 | |
| 1940915 | blackapple | A | July 26, 2012, 6:20 a.m. | OK | FPC | TESTS | 70 | 670 | 2560000 | 2700 | |
| 1911678 | Al.Cash | A | July 19, 2012, 1:10 p.m. | OK | GNU C++ | TESTS | 70 | 50 | 1740800 | 2700 | |
| 1920313 | yakitori | A | July 21, 2012, 2:09 p.m. | OK | GNU C++ | TESTS | 70 | 60 | 3481600 | 2700 | |
| 1920286 | yakitori | A | July 21, 2012, 1:55 p.m. | OK | GNU C++ | TESTS | 70 | 60 | 3481600 | 2700 | |
| 17119069 | RNS_CUS | A | April 1, 2016, 8:23 p.m. | OK | GNU C++ | TESTS | 70 | 60 | 11264000 | 2700 | |
| 6147192 | CSUvjudge2 | A | March 26, 2014, 11:43 a.m. | OK | GNU C++ | TESTS | 70 | 62 | 1638400 | 2700 | |
| 33754695 | Worldwide_D | A | Dec. 29, 2017, 8:29 a.m. | OK | GNU C++ | TESTS | 70 | 62 | 134041600 | 2700 | |
| 2068230 | Onlylonely | A | Aug. 30, 2012, 5:14 a.m. | OK | GNU C++ | TESTS | 70 | 80 | 3072000 | 2700 | |
| 2068218 | Onlylonely | A | Aug. 30, 2012, 5:06 a.m. | OK | GNU C++ | TESTS | 70 | 80 | 22937600 | 2700 | |
| 16455777 | jiaqiyang | A | March 2, 2016, 12:10 a.m. | OK | GNU C++ | TESTS | 70 | 122 | 2457600 | 2700 | |
| 2043285 | imbanoob | A | Aug. 22, 2012, 6:05 p.m. | OK | GNU C++ | TESTS | 70 | 130 | 3072000 | 2700 | |
| 33584794 | blutrex | A | Dec. 24, 2017, 6:05 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 2150400 | 2700 | |
| 15285199 | Los_Angelos_Laycurse | A | Jan. 11, 2016, 7:50 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 7987200 | 2700 | |
| 15285134 | Los_Angelos_Laycurse | A | Jan. 11, 2016, 7:40 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 8089600 | 2700 | |
| 54499134 | WOSHIGEPACHONG2 | A | May 22, 2019, 7:31 p.m. | OK | GNU C++11 | TESTS | 70 | 62 | 10035200 | 2700 | |
| 48281211 | FizzyDavid | A | Jan. 12, 2019, 8:04 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 10035200 | 2700 | |
| 57899922 | lopare | A | July 28, 2019, 3:14 p.m. | OK | GNU C++11 | TESTS | 70 | 62 | 25190400 | 2700 | |
| 57822200 | py_ultron | A | July 27, 2019, 12:22 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 25190400 | 2700 | |
| 48166904 | luogu_bot5 | A | Jan. 10, 2019, 2:33 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 25190400 | 2700 | |
| 48166453 | xgzepto | A | Jan. 10, 2019, 1:55 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 25190400 | 2700 | |
| 48111735 | ilnil | A | Jan. 9, 2019, 9:59 a.m. | OK | GNU C++11 | TESTS | 70 | 62 | 26726400 | 2700 | |
| 42227526 | rxdoi | A | Aug. 29, 2018, 4:06 a.m. | OK | GNU C++14 | TESTS | 70 | 62 | 11264000 | 2700 | |
| 34300254 | yfzcsc | A | Jan. 19, 2018, 11:20 a.m. | OK | GNU C++14 | TESTS | 70 | 62 | 21708800 | 2700 | |
| 48104469 | alan_cty | A | Jan. 9, 2019, 2:57 a.m. | OK | GNU C++14 | TESTS | 70 | 92 | 24985600 | 2700 | |
| 67627032 | Benq | A | Dec. 25, 2019, 10:51 p.m. | OK | GNU C++14 | TESTS | 70 | 124 | 1228800 | 2700 | |
| 34274620 | apiadu | A | Jan. 18, 2018, 11:50 a.m. | OK | GNU C++14 | TESTS | 70 | 124 | 6348800 | 2700 | |
| 46997803 | yfzcsc | A | Dec. 14, 2018, 9:37 a.m. | OK | GNU C++14 | TESTS | 70 | 154 | 819200 | 2700 | |
| 23667813 | Ali.Pi | A | Jan. 9, 2017, 5:18 p.m. | OK | GNU C++14 | TESTS | 70 | 528 | 2969600 | 2700 | |
| 34104110 | Big_black_jujube | A | Jan. 12, 2018, 10:48 a.m. | OK | GNU C++14 | TESTS | 70 | 592 | 9113600 | 2700 | |
| 49950409 | vjudge2 | A | Feb. 15, 2019, 1:48 p.m. | OK | GNU C++17 | TESTS | 70 | 62 | 69529600 | 2700 | |
| 47086243 | kczno1 | A | Dec. 16, 2018, 3:06 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 69529600 | 2700 | |
| 50091621 | vjudge5 | A | Feb. 18, 2019, 10:42 a.m. | OK | GNU C++17 | TESTS | 70 | 62 | 132812800 | 2700 | |
| 66501113 | hjk1030 | A | Dec. 8, 2019, 12:35 p.m. | OK | GNU C++17 | TESTS | 70 | 92 | 1433600 | 2700 | |
| 61321836 | cerberus97 | A | Sept. 26, 2019, 12:47 p.m. | OK | GNU C++17 | TESTS | 70 | 124 | 1843200 | 2700 | |
| 61334197 | cerberus97 | A | Sept. 26, 2019, 3:55 p.m. | OK | GNU C++17 | TESTS | 70 | 310 | 1945600 | 2700 | |
| 61334631 | cerberus97 | A | Sept. 26, 2019, 4:03 p.m. | OK | GNU C++17 | TESTS | 70 | 342 | 1945600 | 2700 | |
| 47481410 | ruo | A | Dec. 25, 2018, 5:24 a.m. | OK | GNU C++17 | TESTS | 70 | 780 | 1331200 | 2700 | |
| 63110476 | wretar | A | Oct. 22, 2019, 7:11 a.m. | OK | Java 8 | TESTS | 70 | 466 | 142745600 | 2700 | |
| 63126696 | ivankevin | A | Oct. 22, 2019, 1 p.m. | OK | Java 8 | TESTS | 70 | 840 | 168550400 | 2700 | |
| 1912780 | ZOTAC89 | A | July 19, 2012, 9:55 p.m. | OK | MS C++ | TESTS | 70 | 50 | 1638400 | 2700 | |
| 15285210 | Los_Angelos_Laycurse | A | Jan. 11, 2016, 7:51 a.m. | OK | MS C++ | TESTS | 70 | 60 | 8089600 | 2700 | |
| 15285215 | Los_Angelos_Laycurse | A | Jan. 11, 2016, 7:52 a.m. | OK | MS C++ | TESTS | 70 | 62 | 8089600 | 2700 | |
| 40990931 | ReaLNero1 | A | July 31, 2018, 12:18 a.m. | OK | MS C++ | TESTS | 70 | 92 | 204800 | 2700 |
Back to search problems