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 |
---|---|---|---|---|---|---|
1007 | Codeforces Round 497 (Div. 1) | FINISHED | False | 7800 | 206033124 | July 13, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 220 ) | E | Mini Metro | PROGRAMMING | dp | 3500 |
B'In a simplified version of a "Mini Metro" game, there is only one subway line, and all the trains go in the same direction. There are n stations on the line, a_i people are waiting for the train at the i -th station at the beginning of the game. The game starts at the beginning of the 0 -th hour. At the end of each hour (couple minutes before the end of the hour), b_i people instantly arrive to the i -th station. If at some moment, the number of people at the i -th station is larger than c_i , you lose. A player has several trains which he can appoint to some hours. The capacity of each train is k passengers. In the middle of the appointed hour, the train goes from the 1 -st to the n -th station, taking as many people at each station as it can accommodate. A train can not take people from the i -th station if there are people at the i-1 -th station. If multiple trains are appointed to the same hour, their capacities are being added up and they are moving together. The player wants to stay in the game for t hours. Determine the minimum number of trains he will need for it. The first line contains three integers n , t , and k ( 1 <= q n, t <= q 200, 1 <= q k <= q 10^9 ) -- the number of stations on the line, hours we want to survive, and capacity of each train respectively. Each of the next n lines contains three integers a_i , b_i , and c_i ( 0 <= q a_i, b_i <= q c_i <= q 10^9 ) -- number of people at the i -th station in the beginning of the game, number of people arriving to i -th station in the end of each hour and maximum number of people at the i -th station allowed respectively. Output a single integer number -- the answer to the problem. Let 's look at the sample. There are three stations, on the first, there are initially 2 people, 3 people on the second, and 4 people on the third. Maximal capacities of the st'... |
Editorial for Codeforces Round #497 by Skyglow |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
43336963 | Bismarck | E | Sept. 23, 2018, 3:54 p.m. | OK | GNU C++11 | TESTS | 49 | 218 | 1228800 | 3500 | |
55742250 | _twilight | E | June 19, 2019, 8:07 a.m. | OK | GNU C++11 | TESTS | 49 | 218 | 1331200 | 3500 | |
57869227 | lopare | E | July 28, 2019, 12:04 a.m. | OK | GNU C++11 | TESTS | 49 | 233 | 2867200 | 3500 | |
69422402 | vjudge3 | E | Jan. 23, 2020, 2:47 p.m. | OK | GNU C++11 | TESTS | 49 | 234 | 1433600 | 3500 | |
47508426 | newbiegcz | E | Dec. 26, 2018, 4:07 a.m. | OK | GNU C++11 | TESTS | 49 | 234 | 1433600 | 3500 | |
51108136 | Iscream2001 | E | March 10, 2019, 1:41 a.m. | OK | GNU C++11 | TESTS | 49 | 234 | 2048000 | 3500 | |
47314786 | zhouyuyang | E | Dec. 21, 2018, 1:24 a.m. | OK | GNU C++11 | TESTS | 49 | 249 | 1331200 | 3500 | |
51384341 | bhargav_0085 | E | March 16, 2019, 5:57 p.m. | OK | GNU C++11 | TESTS | 49 | 249 | 240128000 | 3500 | |
44492450 | saba.janelidze.1 | E | Oct. 18, 2018, 3:06 p.m. | OK | GNU C++11 | TESTS | 49 | 264 | 2867200 | 3500 | |
47314793 | yasugongshang | E | Dec. 21, 2018, 1:25 a.m. | OK | GNU C++11 | TESTS | 49 | 280 | 1433600 | 3500 | |
61531260 | cz_xuyixuan | E | Sept. 30, 2019, 3:18 a.m. | OK | GNU C++14 | TESTS | 49 | 202 | 1331200 | 3500 | |
69887587 | vjudge3 | E | Jan. 31, 2020, 8:48 a.m. | OK | GNU C++14 | TESTS | 49 | 218 | 1331200 | 3500 | |
69887530 | luogu_bot2 | E | Jan. 31, 2020, 8:46 a.m. | OK | GNU C++14 | TESTS | 49 | 218 | 1331200 | 3500 | |
61532290 | cz_xuyixuan | E | Sept. 30, 2019, 4:06 a.m. | OK | GNU C++14 | TESTS | 49 | 218 | 1331200 | 3500 | |
47887933 | zhou888 | E | Jan. 4, 2019, 2:39 a.m. | OK | GNU C++14 | TESTS | 49 | 218 | 1433600 | 3500 | |
55697528 | yhx-12243 | E | June 18, 2019, 12:33 a.m. | OK | GNU C++14 | TESTS | 49 | 218 | 2048000 | 3500 | |
54452689 | Ma_Ster1 | E | May 21, 2019, 2:19 p.m. | OK | GNU C++14 | TESTS | 49 | 218 | 2867200 | 3500 | |
49895788 | ochilov-2004 | E | Feb. 14, 2019, 6:51 a.m. | OK | GNU C++14 | TESTS | 49 | 218 | 2867200 | 3500 | |
41594713 | consecutivelimit | E | Aug. 14, 2018, 4:11 p.m. | OK | GNU C++14 | TESTS | 49 | 233 | 1433600 | 3500 | |
69887511 | dsl2002 | E | Jan. 31, 2020, 8:46 a.m. | OK | GNU C++14 | TESTS | 49 | 234 | 1331200 | 3500 | |
69507769 | gongsuidashen | E | Jan. 25, 2020, 9:21 a.m. | OK | GNU C++17 | TESTS | 49 | 202 | 1331200 | 3500 | |
54819990 | Benq | E | May 30, 2019, 1:19 a.m. | OK | GNU C++17 | TESTS | 49 | 218 | 1331200 | 3500 | |
54819956 | Benq | E | May 30, 2019, 1:15 a.m. | OK | GNU C++17 | TESTS | 49 | 218 | 1331200 | 3500 | |
69559609 | vjudge2 | E | Jan. 26, 2020, 10:07 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 1433600 | 3500 | |
44464942 | InvUsr | E | Oct. 18, 2018, 12:48 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 1638400 | 3500 | |
66384877 | Nikollya_cpp | E | Dec. 6, 2019, 7:08 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 2867200 | 3500 | |
62559317 | ak_taniya | E | Oct. 14, 2019, 11:32 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 2867200 | 3500 | |
45501112 | serega.ktl | E | Nov. 10, 2018, 7:40 a.m. | OK | GNU C++17 | TESTS | 49 | 234 | 3174400 | 3500 | |
44269944 | FanomYT | E | Oct. 13, 2018, 6:33 p.m. | OK | GNU C++17 | TESTS | 49 | 234 | 3174400 | 3500 | |
47855291 | AryssonFigueiredo | E | Jan. 2, 2019, 9:15 p.m. | OK | GNU C++17 | TESTS | 49 | 249 | 1331200 | 3500 | |
40554305 | -_-Hacker-_- | E | July 19, 2018, 4:44 p.m. | OK | MS C++ | TESTS | 49 | 577 | 1331200 | 3500 |
Back to search problems