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 |
|---|---|---|---|---|---|---|
| 601 | Codeforces Round 333 (Div. 1) | FINISHED | False | 7200 | 328022723 | Nov. 24, 2015, 4:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1116 ) | E | A Museum Robbery | PROGRAMMING | data structures dp | 2800 |
There's a famous museum in the city where Kleofáš lives. In the museum, n exhibits (numbered 1 through n ) had been displayed for a long time; the i -th of those exhibits has value v i and mass w i . Then, the museum was bought by a large financial group and started to vary the exhibits. At about the same time, Kleofáš... gained interest in the museum, so to say. You should process q events of three types: type 1 — the museum displays an exhibit with value v and mass w ; the exhibit displayed in the i -th event of this type is numbered n + i (see sample explanation for more details) type 2 — the museum removes the exhibit with number x and stores it safely in its vault type 3 — Kleofáš visits the museum and wonders (for no important reason at all, of course): if there was a robbery and exhibits with total mass at most m were stolen, what would their maximum possible total value be? For each event of type 3, let s ( m ) be the maximum possible total value of stolen exhibits with total mass ≤ m . Formally, let D be the set of numbers of all exhibits that are currently displayed (so initially D = {1, ..., n}). Let P ( D ) be the set of all subsets of D and let Then, s ( m ) is defined as Compute s ( m ) for each . Note that the output follows a special format. The first line of the input contains two space-separated integers n and k ( 1 ≤ n ≤ 5000 , 1 ≤ k ≤ 1000 ) — the initial number of exhibits in the museum and the maximum interesting mass of stolen exhibits. Then, n lines follow. The i -th of them contains two space-separated positive integers v i and w i ( 1 ≤ v i ≤ 1 000 000 , 1 ≤ w i ≤ 1000 ) — the value and mass of the i -th exhibit. The next line contains a single integer q ( 1 ≤ q ≤ 30 000 ) — the number of events. Each of the next q lines contains the description of one event in the following format: 1 v w — an event of type 1, a new exhibit with value v and mass w has been added ( 1 ≤ v ≤ 1 000 000 , 1 ≤ w ≤ 1000 ) 2 x — an event of type 2, the ex |
| Codeforces Round #333 — editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 40985619 | ReaLNero1 | E | July 30, 2018, 8:03 p.m. | OK | GNU C++ | TESTS | 86 | 280 | 16691200 | 2800 | |
| 24733805 | tlzmybm | E | Feb. 17, 2017, 7:53 a.m. | OK | GNU C++ | TESTS | 86 | 280 | 18739200 | 2800 | |
| 18113443 | htnhtn | E | May 27, 2016, 6:08 a.m. | OK | GNU C++ | TESTS | 86 | 295 | 8396800 | 2800 | |
| 18113447 | htnhtn | E | May 27, 2016, 6:08 a.m. | OK | GNU C++ | TESTS | 86 | 296 | 8192000 | 2800 | |
| 18113514 | htnhtn | E | May 27, 2016, 6:14 a.m. | OK | GNU C++ | TESTS | 86 | 296 | 8294400 | 2800 | |
| 18113460 | vjtest | E | May 27, 2016, 6:09 a.m. | OK | GNU C++ | TESTS | 86 | 311 | 8294400 | 2800 | |
| 18113406 | htnhtn | E | May 27, 2016, 6:06 a.m. | OK | GNU C++ | TESTS | 86 | 311 | 59904000 | 2800 | |
| 18124258 | vjtest | E | May 27, 2016, 11:53 p.m. | OK | GNU C++ | TESTS | 86 | 312 | 12390400 | 2800 | |
| 26319636 | Leefir | E | April 12, 2017, 2:23 p.m. | OK | GNU C++ | TESTS | 86 | 327 | 5427200 | 2800 | |
| 18113510 | htnhtn | E | May 27, 2016, 6:14 a.m. | OK | GNU C++ | TESTS | 86 | 327 | 8192000 | 2800 | |
| 56780127 | luogu_bot4 | E | July 10, 2019, 5:48 a.m. | OK | GNU C++11 | TESTS | 86 | 217 | 3072000 | 2800 | |
| 66635320 | ouuan | E | Dec. 11, 2019, 12:42 p.m. | OK | GNU C++11 | TESTS | 86 | 249 | 2764800 | 2800 | |
| 66635270 | ouuan | E | Dec. 11, 2019, 12:41 p.m. | OK | GNU C++11 | TESTS | 86 | 249 | 2764800 | 2800 | |
| 66634784 | ouuan | E | Dec. 11, 2019, 12:31 p.m. | OK | GNU C++11 | TESTS | 86 | 249 | 2764800 | 2800 | |
| 15489862 | Quang | E | Jan. 22, 2016, 3:26 a.m. | OK | GNU C++11 | TESTS | 86 | 280 | 3379200 | 2800 | |
| 16737204 | Syloviaely | E | March 16, 2016, 3:20 a.m. | OK | GNU C++11 | TESTS | 86 | 296 | 512000 | 2800 | |
| 15455708 | isdkfj | E | Jan. 20, 2016, 3:46 p.m. | OK | GNU C++11 | TESTS | 86 | 296 | 921600 | 2800 | |
| 18113494 | htnhtn | E | May 27, 2016, 6:12 a.m. | OK | GNU C++11 | TESTS | 86 | 296 | 8192000 | 2800 | |
| 15410543 | akaring | E | Jan. 17, 2016, 4:05 a.m. | OK | GNU C++11 | TESTS | 86 | 312 | 2150400 | 2800 | |
| 15091732 | codestrength | E | Dec. 30, 2015, 2:13 a.m. | OK | GNU C++11 | TESTS | 86 | 327 | 3276800 | 2800 | |
| 30838542 | xman1024 | E | Sept. 29, 2017, 6:34 p.m. | OK | GNU C++14 | TESTS | 86 | 296 | 125337600 | 2800 | |
| 26470403 | KyleYoung | E | April 18, 2017, 7:06 a.m. | OK | GNU C++14 | TESTS | 86 | 312 | 6246400 | 2800 | |
| 66416800 | Skywynne | E | Dec. 6, 2019, 5:24 p.m. | OK | GNU C++14 | TESTS | 86 | 342 | 3379200 | 2800 | |
| 31802095 | q234rty | E | Oct. 27, 2017, 2:26 p.m. | OK | GNU C++14 | TESTS | 86 | 343 | 33484800 | 2800 | |
| 31801743 | vjudge2 | E | Oct. 27, 2017, 2:23 p.m. | OK | GNU C++14 | TESTS | 86 | 343 | 33484800 | 2800 | |
| 65509020 | Devil | E | Nov. 22, 2019, 2:04 a.m. | OK | GNU C++14 | TESTS | 86 | 373 | 2048000 | 2800 | |
| 58932578 | Scut82 | E | Aug. 17, 2019, 1:54 a.m. | OK | GNU C++14 | TESTS | 86 | 374 | 4300800 | 2800 | |
| 55403905 | JU_RUO | E | June 10, 2019, 3:29 p.m. | OK | GNU C++14 | TESTS | 86 | 389 | 1126400 | 2800 | |
| 31778552 | vjudge2 | E | Oct. 27, 2017, 3:32 a.m. | OK | GNU C++14 | TESTS | 86 | 389 | 1228800 | 2800 | |
| 58932647 | Scut82 | E | Aug. 17, 2019, 1:57 a.m. | OK | GNU C++14 | TESTS | 86 | 389 | 4300800 | 2800 | |
| 56779919 | Fulisike | E | July 10, 2019, 5:40 a.m. | OK | GNU C++17 | TESTS | 86 | 218 | 3276800 | 2800 | |
| 67049768 | hjk1030 | E | Dec. 17, 2019, 3:01 a.m. | OK | GNU C++17 | TESTS | 86 | 234 | 4710400 | 2800 | |
| 57822381 | Benq | E | July 27, 2019, 12:32 a.m. | OK | GNU C++17 | TESTS | 86 | 295 | 266342400 | 2800 | |
| 55397847 | ppc_qjd | E | June 10, 2019, 12:37 p.m. | OK | GNU C++17 | TESTS | 86 | 327 | 4300800 | 2800 | |
| 67667107 | AliShahali1382 | E | Dec. 26, 2019, 6:21 p.m. | OK | GNU C++17 | TESTS | 86 | 342 | 4300800 | 2800 | |
| 51949218 | Fly_37 | E | March 28, 2019, 6:53 p.m. | OK | GNU C++17 | TESTS | 86 | 358 | 3993600 | 2800 | |
| 49919186 | ivan100sic | E | Feb. 14, 2019, 5:52 p.m. | OK | GNU C++17 | TESTS | 86 | 373 | 5529600 | 2800 | |
| 62052763 | hywer | E | Oct. 7, 2019, 10 a.m. | OK | GNU C++17 | TESTS | 86 | 374 | 4710400 | 2800 | |
| 62052712 | luogu_bot1 | E | Oct. 7, 2019, 9:59 a.m. | OK | GNU C++17 | TESTS | 86 | 374 | 4710400 | 2800 | |
| 51840631 | Fly_37 | E | March 25, 2019, 9:26 p.m. | OK | GNU C++17 | TESTS | 86 | 389 | 140697600 | 2800 | |
| 14690974 | gpita | E | Dec. 7, 2015, 7:37 p.m. | OK | Java 7 | TESTS | 86 | 1138 | 0 | 2800 | |
| 14628414 | edorundo | E | Dec. 3, 2015, 4:25 a.m. | OK | Java 7 | TESTS | 86 | 1466 | 157286400 | 2800 | |
| 15396063 | qwerty787788 | E | Jan. 15, 2016, 11:45 p.m. | OK | Java 8 | TESTS | 86 | 327 | 0 | 2800 | |
| 16868478 | Sumeet.Varma | E | March 22, 2016, 10:46 a.m. | OK | Java 8 | TESTS | 86 | 327 | 20684800 | 2800 | |
| 16868700 | Sumeet.Varma | E | March 22, 2016, 11:01 a.m. | OK | Java 8 | TESTS | 86 | 358 | 20684800 | 2800 | |
| 14463576 | uwi | E | Nov. 25, 2015, 6:18 a.m. | OK | Java 8 | TESTS | 86 | 655 | 0 | 2800 | |
| 14462812 | Ruins | E | Nov. 25, 2015, 5 a.m. | OK | Java 8 | TESTS | 86 | 857 | 0 | 2800 | |
| 14457438 | mmaxio | E | Nov. 24, 2015, 7:42 p.m. | OK | Java 8 | TESTS | 86 | 919 | 142233600 | 2800 | |
| 14501258 | AlexFetisov | E | Nov. 26, 2015, 9:13 p.m. | OK | Java 8 | TESTS | 86 | 1278 | 0 | 2800 | |
| 15433686 | antonkov | E | Jan. 18, 2016, 11:39 p.m. | OK | Java 8 | TESTS | 86 | 1794 | 0 | 2800 | |
| 14885518 | Xhark | E | Dec. 19, 2015, 4:18 p.m. | OK | MS C++ | TESTS | 86 | 498 | 242995200 | 2800 |
Back to search problems