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 |
---|---|---|---|---|---|---|
1580 | Codeforces Round 745 (Div. 1) | FINISHED | False | 7200 | 98826299 | Sept. 30, 2021, 10:15 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1830 ) | C | Train Maintenance | PROGRAMMING | brute force data structures implementation | 2200 |
B"Kawasiro Nitori is excellent in engineering. Thus she has been appointed to help maintain trains. There are n models of trains, and Nitori's department will only have at most one train of each model at any moment. In the beginning, there are no trains, at each of the following m days, one train will be added, or one train will be removed. When a train of model i is added at day t , it works for x_i days (day t inclusive), then it is in maintenance for y_i days, then in work for x_i days again, and so on until it is removed. In order to make management easier, Nitori wants you to help her calculate how many trains are in maintenance in each day. On a day a train is removed, it is not counted as in maintenance. The first line contains two integers n , m ( 1 <= n,m <= 2 cdot 10^5 ). The i -th of the next n lines contains two integers x_i,y_i ( 1 <= x_i,y_i <= 10^9 ). Each of the next m lines contains two integers op , k ( 1 <= k <= n , op = 1 or op = 2 ). If op=1 , it means this day's a train of model k is added, otherwise the train of model k is removed. It is guaranteed that when a train of model x is added, there is no train of the same model in the department, and when a train of model x is removed, there is such a train in the department. Print m lines, The i -th of these lines contains one integers, denoting the number of trains in maintenance in the i -th day. Consider the first example: The first day: Nitori adds a train of model 3 . Only a train of model 3 is running and no train is in maintenance. The second day: Nitori adds a train of model 1 . A train of model 1 is running and a train of model 3 is in maintenance. The third day: Nitori removes a train of model 1 . The situation is the same as the first day. The fourth day: Nitori removes a train of mo"... |
Codeforces Round #745 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
130358896 | satori_____ | C | Sept. 30, 2021, 11:28 a.m. | OK | GNU C++14 | TESTS | 35 | 264 | 11366400 | 2200 | |
130357895 | djq_fpc | C | Sept. 30, 2021, 11:24 a.m. | OK | GNU C++14 | TESTS | 35 | 280 | 20377600 | 2200 | |
130355617 | playerzmr | C | Sept. 30, 2021, 11:16 a.m. | OK | GNU C++14 | TESTS | 35 | 327 | 8806400 | 2200 | |
130369314 | _zzw4257 | C | Sept. 30, 2021, 12:10 p.m. | OK | GNU C++14 | TESTS | 35 | 327 | 11673600 | 2200 | |
130352023 | tiinthp | C | Sept. 30, 2021, 11:03 a.m. | OK | GNU C++14 | TESTS | 35 | 327 | 28569600 | 2200 | |
130373473 | mata_chuan | C | Sept. 30, 2021, 12:46 p.m. | OK | GNU C++14 | TESTS | 35 | 358 | 168038400 | 2200 | |
130423438 | keenlf | C | Oct. 1, 2021, 2:21 a.m. | OK | GNU C++14 | TESTS | 51 | 374 | 16998400 | 2200 | |
130421918 | asuldb | C | Oct. 1, 2021, 1:33 a.m. | OK | GNU C++14 | TESTS | 51 | 374 | 168038400 | 2200 | |
130421776 | luogu_bot2 | C | Oct. 1, 2021, 1:29 a.m. | OK | GNU C++14 | TESTS | 51 | 374 | 419737600 | 2200 | |
130357014 | liuhengxi | C | Sept. 30, 2021, 11:21 a.m. | OK | GNU C++14 | TESTS | 35 | 374 | 419737600 | 2200 | |
130412953 | maxplus | C | Sept. 30, 2021, 8:10 p.m. | OK | GNU C++17 | TESTS | 51 | 156 | 10649600 | 2200 | |
130412907 | maxplus | C | Sept. 30, 2021, 8:09 p.m. | OK | GNU C++17 | TESTS | 51 | 156 | 11161600 | 2200 | |
130412453 | maxplus | C | Sept. 30, 2021, 8:02 p.m. | OK | GNU C++17 | TESTS | 51 | 156 | 11673600 | 2200 | |
130412378 | maxplus | C | Sept. 30, 2021, 8 p.m. | OK | GNU C++17 | TESTS | 51 | 156 | 11673600 | 2200 | |
130412479 | maxplus | C | Sept. 30, 2021, 8:02 p.m. | OK | GNU C++17 | TESTS | 51 | 156 | 12185600 | 2200 | |
130412928 | maxplus | C | Sept. 30, 2021, 8:10 p.m. | OK | GNU C++17 | TESTS | 51 | 171 | 10956800 | 2200 | |
130412988 | maxplus | C | Sept. 30, 2021, 8:11 p.m. | OK | GNU C++17 | TESTS | 51 | 171 | 11161600 | 2200 | |
130412625 | maxplus | C | Sept. 30, 2021, 8:05 p.m. | OK | GNU C++17 | TESTS | 51 | 171 | 11161600 | 2200 | |
130412889 | maxplus | C | Sept. 30, 2021, 8:09 p.m. | OK | GNU C++17 | TESTS | 51 | 171 | 11468800 | 2200 | |
130412537 | maxplus | C | Sept. 30, 2021, 8:03 p.m. | OK | GNU C++17 | TESTS | 51 | 171 | 11673600 | 2200 | |
130368647 | LayCurse | C | Sept. 30, 2021, 12:08 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 62 | 109772800 | 2200 | |
130357664 | risujiroh | C | Sept. 30, 2021, 11:23 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 7782400 | 2200 | |
130413534 | maxplus | C | Sept. 30, 2021, 8:22 p.m. | OK | GNU C++17 (64) | TESTS | 51 | 186 | 11776000 | 2200 | |
130363784 | shivensinha4 | C | Sept. 30, 2021, 11:48 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 202 | 7987200 | 2200 | |
130365555 | yosupo | C | Sept. 30, 2021, 11:55 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 233 | 7782400 | 2200 | |
130349443 | SpyCheese | C | Sept. 30, 2021, 10:55 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 233 | 17305600 | 2200 | |
130349751 | Farhod_Farmon | C | Sept. 30, 2021, 10:56 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 233 | 18022400 | 2200 | |
130360602 | noimi | C | Sept. 30, 2021, 11:35 a.m. | OK | GNU C++17 (64) | TESTS | 35 | 233 | 108236800 | 2200 | |
130380209 | tianbu | C | Sept. 30, 2021, 1:45 p.m. | OK | GNU C++17 (64) | TESTS | 45 | 249 | 13414400 | 2200 | |
130379168 | Lucina | C | Sept. 30, 2021, 1:35 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 265 | 11366400 | 2200 | |
130375250 | uwi | C | Sept. 30, 2021, 12:59 p.m. | OK | Java 11 | TESTS | 36 | 545 | 31744000 | 2200 | |
130365369 | SecondThread | C | Sept. 30, 2021, 11:54 a.m. | OK | Java 8 | TESTS | 35 | 701 | 21094400 | 2200 | |
130386630 | Spheniscine | C | Sept. 30, 2021, 2:46 p.m. | OK | Kotlin | TESTS | 46 | 639 | 21504000 | 2200 | |
130357882 | _tryhard | C | Sept. 30, 2021, 11:24 a.m. | OK | MS C++ 2017 | TESTS | 35 | 873 | 295219200 | 2200 | |
130389352 | noogler | C | Sept. 30, 2021, 3:12 p.m. | OK | Rust | TESTS | 46 | 514 | 7372800 | 2200 | |
130389393 | noogler | C | Sept. 30, 2021, 3:13 p.m. | OK | Rust | TESTS | 46 | 529 | 7372800 | 2200 | |
130383596 | Spheniscine | C | Sept. 30, 2021, 2:17 p.m. | OK | Rust | TESTS | 45 | 529 | 8294400 | 2200 | |
130387689 | Spheniscine | C | Sept. 30, 2021, 2:56 p.m. | OK | Rust | TESTS | 46 | 529 | 8396800 | 2200 | |
130406919 | noogler | C | Sept. 30, 2021, 6:34 p.m. | OK | Rust | TESTS | 51 | 546 | 7372800 | 2200 | |
130386675 | noogler | C | Sept. 30, 2021, 2:46 p.m. | OK | Rust | TESTS | 46 | 546 | 7372800 | 2200 |
Back to search problems