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 |
---|---|---|---|---|---|---|
1240 | Codeforces Round 591 (Div. 1, based on Technocup 2020 Elimination Round 1) | FINISHED | False | 7200 | 161448899 | Oct. 6, 2019, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 256 ) | F | Football | PROGRAMMING | graphs | 3100 |
B'There are n football teams in the world. The Main Football Organization (MFO) wants to host at most m games. MFO wants the i -th game to be played between the teams a_i and b_i in one of the k stadiums. Let s_{ij} be the numbers of games the i -th team played in the j -th stadium. MFO does not want a team to have much more games in one stadium than in the others. Therefore, for each team i , the absolute difference between the maximum and minimum among s_{i1}, s_{i2}, ldots, s_{ik} should not exceed 2 . Each team has w_i -- the amount of money MFO will earn for each game of the i -th team. If the i -th team plays l games, MFO will earn w_i cdot l . MFO needs to find what games in what stadiums they need to host in order to earn as much money as possible, not violating the rule they set. However, this problem is too complicated for MFO. Therefore, they are asking you to help them. The first line contains three integers n , m , k ( 3 <= q n <= q 100 , 0 <= q m <= q 1 ,000 , 1 <= q k <= q 1 ,000 ) -- the number of teams, the number of games, and the number of stadiums. The second line contains n integers w_1, w_2, ldots, w_n ( 1 <= q w_i <= q 1 ,000 ) -- the amount of money MFO will earn for each game of the i -th game. Each of the following m lines contains two integers a_i and b_i ( 1 <= q a_i, b_i <= q n , a_i neq b_i ) -- the teams that can play the i -th game. It is guaranteed that each pair of teams can play at most one game. For each game in the same order, print t_i ( 1 <= q t_i <= q k ) -- the number of the stadium, in which a_i and b_i will play the game. If the i -th game should not be played, t_i should be equal to 0 . If there are multiple answers, print any. One of possible solutions to the example is shown below: '... |
Сodeforces Round 591 (Технокубок 2020 — Отборочный раунд 1) Разбор |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
65717029 | SkuLexX | F | Nov. 25, 2019, 5:05 p.m. | OK | GNU C11 | TESTS | 42 | 31 | 409600 | 3100 | |
63661117 | cjy2003 | F | Oct. 28, 2019, 2:05 p.m. | OK | GNU C++11 | TESTS | 42 | 31 | 0 | 3100 | |
62023134 | 1919810 | F | Oct. 6, 2019, 5:02 p.m. | OK | GNU C++11 | TESTS | 42 | 31 | 409600 | 3100 | |
63120014 | yyf0309 | F | Oct. 22, 2019, 10:53 a.m. | OK | GNU C++11 | TESTS | 42 | 31 | 512000 | 3100 | |
62116375 | BeNoble | F | Oct. 8, 2019, 1:29 p.m. | OK | GNU C++11 | TESTS | 42 | 31 | 512000 | 3100 | |
63419833 | yyf0309 | F | Oct. 26, 2019, 6 a.m. | OK | GNU C++11 | TESTS | 42 | 31 | 512000 | 3100 | |
64054550 | wyntxdy | F | Nov. 2, 2019, 12:25 a.m. | OK | GNU C++11 | TESTS | 42 | 31 | 6656000 | 3100 | |
63647280 | BEKKKK | F | Oct. 28, 2019, 10:10 a.m. | OK | GNU C++11 | TESTS | 42 | 31 | 8192000 | 3100 | |
62258471 | WZYYN | F | Oct. 10, 2019, 11:29 a.m. | OK | GNU C++11 | TESTS | 42 | 31 | 48435200 | 3100 | |
62617290 | 03056 | F | Oct. 15, 2019, 11:49 a.m. | OK | GNU C++11 | TESTS | 42 | 31 | 222720000 | 3100 | |
62086008 | cuizhuyefei | F | Oct. 8, 2019, 1:56 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 5939200 | 3100 | |
62142639 | Kali_Lunix | F | Oct. 8, 2019, 3:52 p.m. | OK | GNU C++14 | TESTS | 42 | 30 | 6860800 | 3100 | |
62444405 | darry140 | F | Oct. 12, 2019, 9:35 p.m. | OK | GNU C++14 | TESTS | 42 | 31 | 307200 | 3100 | |
66577228 | yan-zp | F | Dec. 10, 2019, 7:53 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 307200 | 3100 | |
63969220 | LODB---D | F | Nov. 1, 2019, 8:27 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 409600 | 3100 | |
62075375 | hamza911 | F | Oct. 7, 2019, 6:12 p.m. | OK | GNU C++14 | TESTS | 42 | 31 | 409600 | 3100 | |
66578293 | yan-zp | F | Dec. 10, 2019, 8:19 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 512000 | 3100 | |
63771003 | Toxel | F | Oct. 30, 2019, 7:59 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 614400 | 3100 | |
62357685 | cowardme | F | Oct. 11, 2019, 11:27 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 716800 | 3100 | |
62344723 | zhuzizhizhu | F | Oct. 11, 2019, 6:57 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 6860800 | 3100 | |
62084842 | Batrr | F | Oct. 8, 2019, 12:37 a.m. | OK | GNU C++14 | TESTS | 42 | 31 | 6860800 | 3100 | |
62085629 | jiangly | F | Oct. 8, 2019, 1:30 a.m. | OK | GNU C++17 | TESTS | 42 | 30 | 409600 | 3100 | |
62038407 | neal | F | Oct. 7, 2019, 4:58 a.m. | OK | GNU C++17 | TESTS | 42 | 30 | 409600 | 3100 | |
62054690 | ivan100sic | F | Oct. 7, 2019, 11:39 a.m. | OK | GNU C++17 | TESTS | 42 | 30 | 819200 | 3100 | |
62060347 | Benq | F | Oct. 7, 2019, 1:26 p.m. | OK | GNU C++17 | TESTS | 42 | 31 | 204800 | 3100 | |
67495529 | krijgertje | F | Dec. 23, 2019, 10:21 p.m. | OK | GNU C++17 | TESTS | 42 | 31 | 204800 | 3100 | |
62443941 | matthew99 | F | Oct. 12, 2019, 9:10 p.m. | OK | GNU C++17 | TESTS | 42 | 31 | 307200 | 3100 | |
66795920 | yhchang3 | F | Dec. 13, 2019, 5:04 p.m. | OK | GNU C++17 | TESTS | 42 | 31 | 307200 | 3100 | |
62443904 | matthew99 | F | Oct. 12, 2019, 9:09 p.m. | OK | GNU C++17 | TESTS | 42 | 31 | 307200 | 3100 | |
62062717 | Super_M. | F | Oct. 7, 2019, 2:10 p.m. | OK | GNU C++17 | TESTS | 42 | 31 | 409600 | 3100 | |
62559543 | ak_taniya | F | Oct. 14, 2019, 11:35 a.m. | OK | GNU C++17 | TESTS | 42 | 31 | 409600 | 3100 | |
62945435 | ivankevin | F | Oct. 19, 2019, 5:08 p.m. | OK | Java 8 | TESTS | 42 | 187 | 6041600 | 3100 | |
62945349 | ivankevin | F | Oct. 19, 2019, 5:06 p.m. | OK | Java 8 | TESTS | 42 | 217 | 6041600 | 3100 | |
63110796 | wretar | F | Oct. 22, 2019, 7:20 a.m. | OK | Java 8 | TESTS | 42 | 234 | 144384000 | 3100 |
Back to search problems