Codeforces Round 368 (Div. 2)

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
707 Codeforces Round 368 (Div. 2) FINISHED False 7200 265913704 Aug. 20, 2016, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2748 ) D Persistent Bookcase PROGRAMMING bitmasks data structures dfs and similar implementation 2100

B"Recently in school Alina has learned what are the persistent data structures: they are data structures that always preserves the previous version of itself and access to it when it is modified. After reaching home Alina decided to invent her own persistent data structure. Inventing didn't take long: there is a bookcase right behind her bed. Alina thinks that the bookcase is a good choice for a persistent data structure. Initially the bookcase is empty, thus there is no book at any position at any shelf. The bookcase consists of n shelves, and each shelf has exactly m positions for books at it. Alina enumerates shelves by integers from 1 to n and positions at shelves -- from 1 to m. Initially the bookcase is empty, thus there is no book at any position at any shelf in it. Alina wrote down q operations, which will be consecutively applied to the bookcase. Each of the operations has one of four types: After applying each of operation Alina is interested in the number of books in the bookcase. Alina got 'A' in the school and had no problem finding this values. Will you do so? The first line of the input contains three integers n, m and q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89103, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the bookcase dimensions and the number of operations respectively. The next q lines describes operations in chronological order -- i-th of them describes i-th operation in one of the four formats described in the statement. It is guaranteed that shelf indices and position indices are correct, and in each of fourth-type operation the number k corresponds to some operation before it or equals to 0. For each operation, print the number of books in the bookcase after applying it in a separate line. The answers should be printed in chronological order. This image illustrates the second sample case. "...

Tutorials

46662

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
23179372 SirNickolas D Dec. 20, 2016, 3:04 p.m. OK D TESTS 75 1216 228966400 2100
23175484 SirNickolas D Dec. 20, 2016, 11:16 a.m. OK D TESTS 75 1340 228966400 2100
29024653 NikNag D July 30, 2017, 6:52 p.m. OK FPC TESTS 75 498 9113600 2100
20908524 k2nt D Sept. 25, 2016, 1:11 p.m. OK FPC TESTS 75 498 43315200 2100
20908516 arctic D Sept. 25, 2016, 1:11 p.m. OK FPC TESTS 75 498 43315200 2100
21867758 vjudge5 D Oct. 29, 2016, 9:06 a.m. OK FPC TESTS 75 608 35532800 2100
21863191 vjudge5 D Oct. 29, 2016, 4:21 a.m. OK FPC TESTS 75 655 18944000 2100
21867742 vjudge2 D Oct. 29, 2016, 9:05 a.m. OK FPC TESTS 75 701 35532800 2100
21862877 vjudge2 D Oct. 29, 2016, 3:53 a.m. OK FPC TESTS 75 810 9011200 2100
35975168 rainboy D March 5, 2018, 7:09 p.m. OK GNU C TESTS 75 78 15564800 2100
20494557 luoyuchu D Sept. 10, 2016, 9:59 a.m. OK GNU C++ TESTS 75 46 8704000 2100
21006011 zhanglexing D Sept. 30, 2016, 3:08 a.m. OK GNU C++ TESTS 75 46 10035200 2100
30745153 yyc_ D Sept. 26, 2017, 9:02 a.m. OK GNU C++ TESTS 75 46 10752000 2100
30745112 yyc_ D Sept. 26, 2017, 9 a.m. OK GNU C++ TESTS 75 46 13312000 2100
20549608 ws_syx D Sept. 12, 2016, 1:11 p.m. OK GNU C++ TESTS 75 46 45363200 2100
40983859 ReaLNero1 D July 30, 2018, 7:04 p.m. OK GNU C++ TESTS 75 62 10649600 2100
30745205 yyc_ D Sept. 26, 2017, 9:05 a.m. OK GNU C++ TESTS 75 62 10752000 2100
35145930 vjudge4 D Feb. 11, 2018, 8:11 a.m. OK GNU C++ TESTS 75 62 15462400 2100
21274609 danagi D Oct. 8, 2016, 7:59 a.m. OK GNU C++ TESTS 75 62 95436800 2100
36183986 vjudge4 D March 11, 2018, 3:14 a.m. OK GNU C++ TESTS 75 77 13414400 2100
45206018 Unlimited D Nov. 2, 2018, 12:47 p.m. OK GNU C++11 TESTS 75 46 9932800 2100
45206509 AntiQuality D Nov. 2, 2018, 1:01 p.m. OK GNU C++11 TESTS 75 61 14950400 2100
63127101 zhumingyang D Oct. 22, 2019, 1:08 p.m. OK GNU C++11 TESTS 75 62 11059200 2100
20419897 MuChen123 D Sept. 6, 2016, 1:36 p.m. OK GNU C++11 TESTS 75 62 23756800 2100
50694067 nowhere132 D March 2, 2019, 5:10 p.m. OK GNU C++11 TESTS 75 62 26112000 2100
27351094 buctacm2 D May 26, 2017, 7:55 a.m. OK GNU C++11 TESTS 75 62 93388800 2100
20399083 bird_14 D Sept. 5, 2016, 12:02 p.m. OK GNU C++11 TESTS 75 77 10444800 2100
27023451 Kuroni D May 11, 2017, 4:17 p.m. OK GNU C++11 TESTS 75 77 11878400 2100
20419877 MuChen123 D Sept. 6, 2016, 1:34 p.m. OK GNU C++11 TESTS 75 77 23756800 2100
27351538 buctacm2 D May 26, 2017, 8:23 a.m. OK GNU C++11 TESTS 75 78 11878400 2100
32354962 lanasheep D Nov. 16, 2017, 12:32 p.m. OK GNU C++14 TESTS 75 77 13619200 2100
30872265 sudoBug D Sept. 30, 2017, 4:52 p.m. OK GNU C++14 TESTS 75 78 11161600 2100
39689834 andtit2001 D June 27, 2018, 3:18 a.m. OK GNU C++14 TESTS 75 78 12390400 2100
36332710 3EVEHAR_KOAVA D March 16, 2018, 5:10 p.m. OK GNU C++14 TESTS 75 78 13209600 2100
34690159 Fortin D Jan. 29, 2018, 8:35 p.m. OK GNU C++14 TESTS 75 78 14643200 2100
25339121 mengxiang000 D March 8, 2017, 10:48 a.m. OK GNU C++14 TESTS 75 78 15360000 2100
36683437 sandoval D March 28, 2018, 5:15 a.m. OK GNU C++14 TESTS 75 78 15667200 2100
34661212 DeadPillow D Jan. 29, 2018, 12:37 p.m. OK GNU C++14 TESTS 75 78 16896000 2100
33976494 Marckess D Jan. 7, 2018, 5:08 a.m. OK GNU C++14 TESTS 75 78 18124800 2100
36332737 3EVEHAR_KOAVA D March 16, 2018, 5:12 p.m. OK GNU C++14 TESTS 75 92 13209600 2100
63391857 kostia244 D Oct. 25, 2019, 3:29 p.m. OK GNU C++17 TESTS 75 78 10649600 2100
54527450 Nobel_ruettt D May 23, 2019, 3:13 p.m. OK GNU C++17 TESTS 75 78 13209600 2100
66196396 UESTC_Forsaken D Dec. 2, 2019, 6:37 p.m. OK GNU C++17 TESTS 75 93 9318400 2100
53726024 luogu_bot2 D May 4, 2019, 4:22 a.m. OK GNU C++17 TESTS 75 93 9318400 2100
53726005 Aestus_estus D May 4, 2019, 4:21 a.m. OK GNU C++17 TESTS 75 93 9318400 2100
66647244 zeus_orz D Dec. 11, 2019, 5:17 p.m. OK GNU C++17 TESTS 75 93 13619200 2100
69000735 darkkcyan D Jan. 17, 2020, 7:29 p.m. OK GNU C++17 TESTS 75 93 13926400 2100
49527032 lis D Feb. 6, 2019, 11:54 a.m. OK GNU C++17 TESTS 75 93 14131200 2100
53695411 vjudge5 D May 3, 2019, 7:27 a.m. OK GNU C++17 TESTS 75 93 15052800 2100
54888295 vjudge4 D May 31, 2019, 6:42 p.m. OK GNU C++17 TESTS 75 93 15667200 2100
24617593 omarfarhat97 D Feb. 12, 2017, 9:43 p.m. OK Go TESTS 75 733 38912000 2100
24617514 omarfarhat97 D Feb. 12, 2017, 9:35 p.m. OK Go TESTS 75 763 40140800 2100
24617429 omarfarhat97 D Feb. 12, 2017, 9:28 p.m. OK Go TESTS 75 967 40140800 2100
20472844 JialinOuyang D Sept. 9, 2016, 6:22 a.m. OK Java 8 TESTS 75 171 4812800 2100
25780376 Kammola D March 24, 2017, 6:14 p.m. OK Java 8 TESTS 75 202 21196800 2100
49470291 ZeyadKhattab D Feb. 4, 2019, 4:50 p.m. OK Java 8 TESTS 75 218 25395200 2100
27471469 U_Square D May 31, 2017, 4:54 p.m. OK Java 8 TESTS 75 233 31334400 2100
25780033 Kammola D March 24, 2017, 5:56 p.m. OK Java 8 TESTS 75 234 21196800 2100
28794866 kunalk D July 23, 2017, 7:39 a.m. OK Java 8 TESTS 75 248 73830400 2100
28730265 RP_9 D July 20, 2017, 5:08 p.m. OK Java 8 TESTS 75 249 56115200 2100
29208819 Maulik_Patel D Aug. 5, 2017, 4:10 a.m. OK Java 8 TESTS 75 264 65945600 2100
29631761 PrakharJain D Aug. 20, 2017, 11:08 p.m. OK Java 8 TESTS 75 265 24576000 2100
21267956 nka55 D Oct. 7, 2016, 10:37 p.m. OK Java 8 TESTS 75 280 48332800 2100
38103983 wleung_bvg D May 11, 2018, 2:29 a.m. OK Mono C# TESTS 75 1216 167526400 2100
24274134 og.kostya D Jan. 30, 2017, 5:54 p.m. OK MS C# TESTS 75 124 27340800 2100
24273844 og.kostya D Jan. 30, 2017, 5:41 p.m. OK MS C# TESTS 75 764 31334400 2100
20929283 AnatolyTolstobrov D Sept. 26, 2016, 4:01 p.m. OK MS C# TESTS 75 935 29081600 2100
53694274 vjudge4 D May 3, 2019, 6:51 a.m. OK MS C++ TESTS 75 78 10444800 2100
50839476 vjudge1 D March 5, 2019, 3:50 p.m. OK MS C++ TESTS 75 93 21401600 2100
50995985 vjudge3 D March 8, 2019, 3:43 a.m. OK MS C++ TESTS 75 108 8192000 2100
51553121 vjudge1 D March 20, 2019, 2:35 a.m. OK MS C++ TESTS 75 109 7372800 2100
53696069 vjudge4 D May 3, 2019, 7:48 a.m. OK MS C++ TESTS 75 109 8192000 2100
21383510 AWCXV D Oct. 12, 2016, 2:03 p.m. OK MS C++ TESTS 75 124 11878400 2100
51576736 vjudge5 D March 20, 2019, 1:11 p.m. OK MS C++ TESTS 75 124 20992000 2100
56276320 vjudge5 D June 29, 2019, 2:26 p.m. OK MS C++ TESTS 75 171 9113600 2100
29699981 marszed D Aug. 23, 2017, 7:06 a.m. OK MS C++ TESTS 75 452 13107200 2100
20482680 ferc D Sept. 9, 2016, 4:48 p.m. OK MS C++ TESTS 75 498 255897600 2100
53884839 Stepavly D May 8, 2019, 5:20 p.m. OK MS C++ 2017 TESTS 75 234 22937600 2100
23179108 SirNickolas D Dec. 20, 2016, 2:49 p.m. OK Ocaml TESTS 75 732 119398400 2100
20391101 lavin D Sept. 4, 2016, 11:46 p.m. OK PyPy 2 TESTS 75 1294 19660800 2100
20391097 lavin D Sept. 4, 2016, 11:45 p.m. OK Python 2 TESTS 75 810 23859200 2100
20519357 krdln D Sept. 11, 2016, 3:56 a.m. OK Rust TESTS 75 1169 528486400 2100
20379897 mialerxd D Sept. 4, 2016, 10:23 a.m. OK Scala TESTS 75 1481 73830400 2100

remove filters

Back to search problems