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 |
|---|---|---|---|---|---|---|
| 730 | 2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 299196023 | Oct. 23, 2016, 8 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 2727 ) | I | Olympiad in Programming and Sports | PROGRAMMING | dp flows greedy | 2200 |
There are n students at Berland State University. Every student has two skills, each measured as a number: a i — the programming skill and b i — the sports skill. It is announced that an Olympiad in programming and sports will be held soon. That's why Berland State University should choose two teams: one to take part in the programming track and one to take part in the sports track. There should be exactly p students in the programming team and exactly s students in the sports team. A student can't be a member of both teams. The university management considers that the strength of the university on the Olympiad is equal to the sum of two values: the programming team strength and the sports team strength. The strength of a team is the sum of skills of its members in the corresponding area, so the strength of the programming team is the sum of all a i and the strength of the sports team is the sum of all b i over corresponding team members. Help Berland State University to compose two teams to maximize the total strength of the university on the Olympiad. The first line contains three positive integer numbers n , p and s ( 2 ≤ n ≤ 3000 , p + s ≤ n ) — the number of students, the size of the programming team and the size of the sports team. The second line contains n positive integers a 1 , a 2 , ..., a n ( 1 ≤ a i ≤ 3000 ), where a i is the programming skill of the i -th student. The third line contains n positive integers b 1 , b 2 , ..., b n ( 1 ≤ b i ≤ 3000 ), where b i is the sports skill of the i -th student. In the first line, print the the maximum strength of the university on the Olympiad. In the second line, print p numbers — the members of the programming team. In the third line, print s numbers — the members of the sports team. The students are numbered from 1 to n as they are given in the input. All numbers printed in the second and in the third lines should be distinct and can be printed in arbitrary order. If there are multiple solutions, print |
| Разбор задач (видео, по-русски) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 21710921 | Phoenix_Galaxy | I | Oct. 23, 2016, 11:58 a.m. | OK | GNU C | TESTS | 152 | 46 | 102400 | 2200 | |
| 22156372 | TA123 | I | Nov. 11, 2016, 12:03 a.m. | OK | GNU C++ | TESTS | 152 | 30 | 102400 | 2200 | |
| 21797096 | Garudaa | I | Oct. 26, 2016, 2:30 p.m. | OK | GNU C++ | TESTS | 152 | 30 | 204800 | 2200 | |
| 23547313 | CuSO45H2O | I | Jan. 5, 2017, 3:50 a.m. | OK | GNU C++ | TESTS | 152 | 30 | 2252800 | 2200 | |
| 21732628 | allzysyz | I | Oct. 24, 2016, 3:43 a.m. | OK | GNU C++ | TESTS | 152 | 30 | 37171200 | 2200 | |
| 21732607 | allzysyz | I | Oct. 24, 2016, 3:41 a.m. | OK | GNU C++ | TESTS | 152 | 30 | 37171200 | 2200 | |
| 21826748 | vjudge1 | I | Oct. 27, 2016, 2:47 p.m. | OK | GNU C++ | TESTS | 152 | 31 | 0 | 2200 | |
| 21826736 | vjudge4 | I | Oct. 27, 2016, 2:47 p.m. | OK | GNU C++ | TESTS | 152 | 31 | 0 | 2200 | |
| 21711248 | Kanosword zqh_wz Chenhongkan | I | Oct. 23, 2016, 12:10 p.m. | OK | GNU C++ | TESTS | 152 | 31 | 102400 | 2200 | |
| 21733356 | Burglar_h | I | Oct. 24, 2016, 5:05 a.m. | OK | GNU C++ | TESTS | 152 | 31 | 204800 | 2200 | |
| 21730744 | TusanHomichi | I | Oct. 23, 2016, 11:14 p.m. | OK | GNU C++ | TESTS | 152 | 31 | 204800 | 2200 | |
| 21852309 | F.Darcy | I | Oct. 28, 2016, 4:23 p.m. | OK | GNU C++11 | TESTS | 152 | 15 | 102400 | 2200 | |
| 27573315 | petil777 | I | June 5, 2017, 12:18 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 22654876 | devilplus | I | Dec. 2, 2016, 9:31 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 22654813 | devilplus | I | Dec. 2, 2016, 9:27 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 22075673 | Charles_Han | I | Nov. 6, 2016, 1:09 p.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 21956880 | jimola | I | Nov. 1, 2016, 4:55 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 21901718 | waterfalls | I | Oct. 31, 2016, 12:55 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 21864375 | PlayfulPanda | I | Oct. 29, 2016, 5:50 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 204800 | 2200 | |
| 28795215 | phlirock | I | July 23, 2017, 7:55 a.m. | OK | GNU C++11 | TESTS | 152 | 15 | 2252800 | 2200 | |
| 22197396 | krijgertje | I | Nov. 13, 2016, 5:39 p.m. | OK | GNU C++11 | TESTS | 152 | 30 | 307200 | 2200 | |
| 30982200 | abutoto | I | Oct. 4, 2017, 3:28 a.m. | OK | GNU C++14 | TESTS | 152 | 15 | 204800 | 2200 | |
| 22881298 | bibibibi | I | Dec. 11, 2016, 1:57 p.m. | OK | GNU C++14 | TESTS | 152 | 15 | 204800 | 2200 | |
| 22074048 | krem.bananowy | I | Nov. 6, 2016, 11:51 a.m. | OK | GNU C++14 | TESTS | 152 | 15 | 307200 | 2200 | |
| 21705920 | bmerry | I | Oct. 23, 2016, 9:44 a.m. | OK | GNU C++14 | TESTS | 152 | 15 | 409600 | 2200 | |
| 33029068 | Reem | I | Dec. 8, 2017, 5:08 p.m. | OK | GNU C++14 | TESTS | 152 | 15 | 2048000 | 2200 | |
| 21899870 | ch_egor | I | Oct. 30, 2016, 8:52 p.m. | OK | GNU C++14 | TESTS | 152 | 15 | 2150400 | 2200 | |
| 32289039 | ljaneczk | I | Nov. 13, 2017, 4:10 p.m. | OK | GNU C++14 | TESTS | 152 | 30 | 102400 | 2200 | |
| 31705992 | _8u | I | Oct. 25, 2017, 10:51 a.m. | OK | GNU C++14 | TESTS | 152 | 30 | 512000 | 2200 | |
| 21763355 | haleyk100198 | I | Oct. 25, 2016, 4:27 a.m. | OK | GNU C++14 | TESTS | 152 | 31 | 102400 | 2200 | |
| 31706175 | _8u | I | Oct. 25, 2017, 10:58 a.m. | OK | GNU C++14 | TESTS | 152 | 31 | 204800 | 2200 | |
| 54827461 | imAnik | I | May 30, 2019, 7:16 a.m. | OK | GNU C++17 | TESTS | 152 | 31 | 102400 | 2200 | |
| 56030031 | nishank.suresh | I | June 25, 2019, 9:01 a.m. | OK | GNU C++17 | TESTS | 152 | 31 | 204800 | 2200 | |
| 50711210 | KidsXH Trote_w forever97 | I | March 3, 2019, 6:57 a.m. | OK | GNU C++17 | TESTS | 152 | 31 | 409600 | 2200 | |
| 58708979 | vjudge5 | I | Aug. 13, 2019, 11:31 a.m. | OK | GNU C++17 | TESTS | 152 | 31 | 16179200 | 2200 | |
| 54591634 | vjudge3 | I | May 25, 2019, 8:53 a.m. | OK | GNU C++17 | TESTS | 152 | 46 | 102400 | 2200 | |
| 42103185 | elManco | I | Aug. 25, 2018, 9:01 p.m. | OK | GNU C++17 | TESTS | 152 | 46 | 409600 | 2200 | |
| 61034253 | meowmeow321 | I | Sept. 21, 2019, 7 p.m. | OK | GNU C++17 | TESTS | 152 | 46 | 1433600 | 2200 | |
| 69603668 | aliraiisrohani | I | Jan. 27, 2020, 8:52 a.m. | OK | GNU C++17 | TESTS | 152 | 46 | 45363200 | 2200 | |
| 69613959 | Pippinpaddleopsicopolis | I | Jan. 27, 2020, 12:32 p.m. | OK | GNU C++17 | TESTS | 152 | 46 | 57753600 | 2200 | |
| 69554964 | rohamizadidoost | I | Jan. 26, 2020, 8:23 a.m. | OK | GNU C++17 | TESTS | 152 | 61 | 36966400 | 2200 | |
| 22511056 | PugachAG | I | Nov. 26, 2016, 1:55 p.m. | OK | Go | TESTS | 152 | 1902 | 23347200 | 2200 | |
| 21800134 | stevie1024 | I | Oct. 26, 2016, 4:15 p.m. | OK | Java 8 | TESTS | 152 | 233 | 0 | 2200 | |
| 22203093 | alexrcoleman | I | Nov. 14, 2016, 6:16 a.m. | OK | Java 8 | TESTS | 152 | 234 | 0 | 2200 | |
| 21793870 | stevie1024 | I | Oct. 26, 2016, 12:31 p.m. | OK | Java 8 | TESTS | 152 | 249 | 0 | 2200 | |
| 27204712 | Kharouba Minaa aabdelzaher | I | May 18, 2017, 9:11 p.m. | OK | Java 8 | TESTS | 152 | 280 | 39526400 | 2200 | |
| 27202054 | OmarRadwan Kammola | I | May 18, 2017, 5:43 p.m. | OK | Java 8 | TESTS | 152 | 296 | 37580800 | 2200 | |
| 22202642 | alexrcoleman | I | Nov. 14, 2016, 5:25 a.m. | OK | Java 8 | TESTS | 152 | 358 | 41267200 | 2200 | |
| 21710009 | Azat_Yusupov | I | Oct. 23, 2016, 11:32 a.m. | OK | Java 8 | TESTS | 152 | 997 | 0 | 2200 | |
| 22199441 | immigrant | I | Nov. 13, 2016, 8:26 p.m. | OK | Java 8 | TESTS | 152 | 1044 | 0 | 2200 | |
| 46395885 | brsvtanya | I | Nov. 30, 2018, 9:14 a.m. | OK | Java 8 | TESTS | 152 | 1153 | 0 | 2200 | |
| 21733455 | safarisoul | I | Oct. 24, 2016, 5:17 a.m. | OK | Java 8 | TESTS | 152 | 1294 | 0 | 2200 | |
| 29841894 | vjudge4 | I | Aug. 28, 2017, 9:09 a.m. | OK | MS C++ | TESTS | 152 | 15 | 307200 | 2200 | |
| 21867165 | Krainov_Dmitry | I | Oct. 29, 2016, 8:33 a.m. | OK | MS C++ | TESTS | 152 | 30 | 204800 | 2200 | |
| 21867117 | Krainov_Dmitry | I | Oct. 29, 2016, 8:30 a.m. | OK | MS C++ | TESTS | 152 | 30 | 204800 | 2200 | |
| 22268649 | Filyan | I | Nov. 16, 2016, 1:39 p.m. | OK | MS C++ | TESTS | 152 | 46 | 74444800 | 2200 | |
| 22274609 | Filyan | I | Nov. 16, 2016, 5:51 p.m. | OK | MS C++ | TESTS | 152 | 62 | 111411200 | 2200 | |
| 21740709 | AleksanderBalobanov | I | Oct. 24, 2016, 12:20 p.m. | OK | MS C++ | TESTS | 152 | 155 | 201420800 | 2200 | |
| 21707321 | cacophonix urahara Silent_coder | I | Oct. 23, 2016, 10:17 a.m. | OK | MS C++ | TESTS | 152 | 187 | 167936000 | 2200 | |
| 22043456 | SGulyaev | I | Nov. 4, 2016, 8:26 p.m. | OK | MS C++ | TESTS | 152 | 327 | 72396800 | 2200 | |
| 21709391 | Krainov_Dmitry AGrigorii Luca_Brasi | I | Oct. 23, 2016, 11:13 a.m. | OK | MS C++ | TESTS | 152 | 405 | 819200 | 2200 | |
| 22187340 | miha715lev | I | Nov. 13, 2016, 5:28 a.m. | OK | MS C++ | TESTS | 152 | 530 | 204800 | 2200 | |
| 62379610 | nik1998 | I | Oct. 11, 2019, 6:35 p.m. | OK | MS C++ 2017 | TESTS | 152 | 546 | 307200 | 2200 | |
| 61186041 | pajenegod | I | Sept. 23, 2019, 10:46 p.m. | OK | PyPy 2 | TESTS | 152 | 233 | 7577600 | 2200 | |
| 25329824 | rasto93 | I | March 7, 2017, 8:58 p.m. | OK | Python 3 | TESTS | 152 | 77 | 6246400 | 2200 | |
| 21700669 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 | ||
| 21700533 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 | ||
| 21700504 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 | ||
| 21700485 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 | ||
| 21700472 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 | ||
| 21700302 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 | ||
| 21700270 | I | Oct. 23, 2016, 7:19 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2200 |
Back to search problems