Codeforces Round 371 (Div. 1)

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
713 Codeforces Round 371 (Div. 1) FINISHED False 7200 263827504 Sept. 13, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8531 ) A Sonya and Queries PROGRAMMING data structures implementation 1500

B"Today Sonya learned about long integers and invited all her friends to share the fun. Sonya has an initially empty multiset with integers. Friends give her t queries, each of one of the following type: For example, if the pattern is s xe2 x80 x89= xe2 x80 x89010, than integers 92, 2212, 50 and 414 match the pattern, while integers 3, 110, 25 and 1030 do not. The first line of the input contains an integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of operation Sonya has to perform. Next t lines provide the descriptions of the queries in order they appear in the input file. The i-th row starts with a character ci -- the type of the corresponding operation. If ci is equal to '+' or '-' then it's followed by a space and an integer ai (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89< xe2 x80 x891018) given without leading zeroes (unless it's 0). If ci equals '?' then it's followed by a space and a sequence of zeroes and onse, giving the pattern of length no more than 18. It's guaranteed that there will be at least one query of type '?'. It's guaranteed that any time some integer is removed from the multiset, there will be at least one occurrence of this integer in it. For each query of the third type print the number of integers matching the given pattern. Each integer is counted as many times, as it appears in the multiset at this moment of time. Consider the integers matching the patterns from the queries of the third type. Queries are numbered in the order they appear in the input. "...

Tutorials

Codeforces Round #371 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
50236166 0101 A Feb. 20, 2019, 10:50 a.m. OK FPC TESTS 37 233 1126400 1500
27967659 KagamiharaNadeshiko A June 22, 2017, 2:45 p.m. OK FPC TESTS 37 249 5939200 1500
22203468 bzh A Nov. 14, 2016, 7:02 a.m. OK FPC TESTS 37 327 4096000 1500
22589683 yigezhe A Nov. 29, 2016, 1:48 a.m. OK GNU C TESTS 37 46 1228800 1500
21557017 Rizro A Oct. 18, 2016, 4:32 a.m. OK GNU C TESTS 37 62 4300800 1500
21636597 NoSoul A Oct. 21, 2016, 8:40 a.m. OK GNU C TESTS 37 62 22835200 1500
22594932 yigezhe A Nov. 29, 2016, 9:17 a.m. OK GNU C TESTS 37 78 2150400 1500
21595614 pierre A Oct. 19, 2016, 2:12 p.m. OK GNU C TESTS 37 78 5939200 1500
21869428 849145427 A Oct. 29, 2016, 10:46 a.m. OK GNU C TESTS 37 93 1228800 1500
20636137 prodipdatta7 A Sept. 15, 2016, 9:13 a.m. OK GNU C TESTS 37 93 1228800 1500
21405060 BLF2 A Oct. 13, 2016, 2:10 p.m. OK GNU C TESTS 37 93 3379200 1500
36798435 ilovenwd A April 1, 2018, 12:49 p.m. OK GNU C TESTS 37 93 4812800 1500
20585694 Chipe1 A Sept. 13, 2016, 5:25 p.m. OK GNU C TESTS 37 93 7987200 1500
20662248 CJCJLLL A Sept. 16, 2016, 2:39 p.m. OK GNU C++ TESTS 37 46 3891200 1500
20578147 scli A Sept. 13, 2016, 4:56 p.m. OK GNU C++ TESTS 37 46 4198400 1500
20655220 zmxzmx A Sept. 16, 2016, 7:56 a.m. OK GNU C++ TESTS 37 46 23859200 1500
20572185 yic A Sept. 13, 2016, 4:40 p.m. OK GNU C++ TESTS 37 61 3993600 1500
20671486 ShinriiTin A Sept. 17, 2016, 2:22 a.m. OK GNU C++ TESTS 37 62 819200 1500
41545073 Scut82 A Aug. 13, 2018, 3:51 a.m. OK GNU C++ TESTS 37 62 1024000 1500
21022815 2742195759 A Sept. 30, 2016, 2:27 p.m. OK GNU C++ TESTS 37 62 1024000 1500
20821284 WhyWhy A Sept. 22, 2016, 3:32 p.m. OK GNU C++ TESTS 37 62 1024000 1500
20659271 stonepage A Sept. 16, 2016, 12:11 p.m. OK GNU C++ TESTS 37 62 1024000 1500
20573379 natsugiri A Sept. 13, 2016, 4:44 p.m. OK GNU C++ TESTS 37 62 1024000 1500
49192924 vjudge2 A Jan. 30, 2019, 9:01 a.m. OK GNU C11 TESTS 37 234 3993600 1500
21127570 sianzhan A Oct. 3, 2016, 2:43 a.m. OK GNU C11 TESTS 37 280 1024000 1500
29784068 3-4-1-20-13-8 A Aug. 25, 2017, 2:43 p.m. OK GNU C++11 TESTS 37 31 1024000 1500
20764964 s_p A Sept. 19, 2016, 9:14 p.m. OK GNU C++11 TESTS 37 31 3993600 1500
40983753 ReaLNero1 A July 30, 2018, 7 p.m. OK GNU C++11 TESTS 37 46 3993600 1500
49193898 vjudge1 A Jan. 30, 2019, 9:27 a.m. OK GNU C++11 TESTS 37 46 8396800 1500
24841857 sunghoo A Feb. 20, 2017, 5:20 p.m. OK GNU C++11 TESTS 37 46 9728000 1500
24841306 sunghoo A Feb. 20, 2017, 5:16 p.m. OK GNU C++11 TESTS 37 46 9728000 1500
54967058 BlakeGriffin A June 2, 2019, 6:53 a.m. OK GNU C++11 TESTS 37 61 2150400 1500
57022423 sunny_fei A July 14, 2019, 2:43 p.m. OK GNU C++11 TESTS 37 61 2457600 1500
20572042 Herzu A Sept. 13, 2016, 4:40 p.m. OK GNU C++11 TESTS 37 62 819200 1500
68608563 vjudge5 A Jan. 11, 2020, 2:53 p.m. OK GNU C++11 TESTS 37 62 1024000 1500
21008565 CODEFORCESERAZER A Sept. 30, 2016, 6:47 a.m. OK GNU C++14 TESTS 37 46 2150400 1500
21838459 Zhaoyz A Oct. 28, 2016, 3:54 a.m. OK GNU C++14 TESTS 37 61 2048000 1500
59856933 Nazarov_Rodion A Sept. 1, 2019, 1:54 p.m. OK GNU C++14 TESTS 37 61 2150400 1500
20610129 yanush A Sept. 14, 2016, 9:11 a.m. OK GNU C++14 TESTS 37 61 9420800 1500
27012676 Ilya-bar A May 11, 2017, 12:29 p.m. OK GNU C++14 TESTS 37 62 1024000 1500
69397513 vjudge4 A Jan. 23, 2020, 7:01 a.m. OK GNU C++14 TESTS 37 62 2048000 1500
20577334 snowy_smile A Sept. 13, 2016, 4:54 p.m. OK GNU C++14 TESTS 37 62 2150400 1500
23356225 NiroBC A Dec. 27, 2016, 9:34 a.m. OK GNU C++14 TESTS 37 62 2969600 1500
23693761 t51645 A Jan. 11, 2017, 8:25 a.m. OK GNU C++14 TESTS 37 62 3379200 1500
45661672 greenblade A Nov. 13, 2018, 7 a.m. OK GNU C++14 TESTS 37 62 3993600 1500
52637502 fahimfarhan A April 12, 2019, 10:55 a.m. OK GNU C++17 TESTS 37 46 1024000 1500
50524937 xbwcan A Feb. 26, 2019, 11:21 a.m. OK GNU C++17 TESTS 37 62 1024000 1500
44534728 William324 A Oct. 19, 2018, 8:21 a.m. OK GNU C++17 TESTS 37 62 1024000 1500
49355319 vjudge1 A Feb. 2, 2019, 10:45 a.m. OK GNU C++17 TESTS 37 62 2048000 1500
52933171 kostyanf14 A April 18, 2019, 4:20 a.m. OK GNU C++17 TESTS 37 62 2150400 1500
58262054 lonely_wind_ A Aug. 4, 2019, 12:44 p.m. OK GNU C++17 TESTS 37 62 4198400 1500
49184828 vjudge5 A Jan. 30, 2019, 5:15 a.m. OK GNU C++17 TESTS 37 62 4403200 1500
65054257 user202729_ A Nov. 15, 2019, 2:30 p.m. OK GNU C++17 TESTS 37 62 4710400 1500
62174875 Best_ll A Oct. 9, 2019, 3:31 a.m. OK GNU C++17 TESTS 37 62 8499200 1500
67073027 king_of_sun A Dec. 17, 2019, 1:28 p.m. OK GNU C++17 TESTS 37 62 16793600 1500
20605678 artyom.fedosov A Sept. 14, 2016, 5:09 a.m. OK Go TESTS 37 78 9728000 1500
53870478 guptautkarsh028 A May 8, 2019, 8:33 a.m. OK Java 8 TESTS 37 155 0 1500
20571594 ilyakor A Sept. 13, 2016, 4:39 p.m. OK Java 8 TESTS 37 155 0 1500
20961758 safarisoul A Sept. 28, 2016, 7:22 a.m. OK Java 8 TESTS 37 170 0 1500
42723714 ashcodish A Sept. 10, 2018, 5:19 a.m. OK Java 8 TESTS 37 171 0 1500
20571985 uwi A Sept. 13, 2016, 4:40 p.m. OK Java 8 TESTS 37 186 0 1500
20575082 alexyz A Sept. 13, 2016, 4:48 p.m. OK Java 8 TESTS 37 187 0 1500
20573299 kuldeeppatel A Sept. 13, 2016, 4:43 p.m. OK Java 8 TESTS 37 187 0 1500
65615329 maheshwari29 A Nov. 24, 2019, 3:07 a.m. OK Java 8 TESTS 37 202 0 1500
40166754 aavakaaya A July 10, 2018, 10:22 a.m. OK Java 8 TESTS 37 202 0 1500
20575292 pitfall A Sept. 13, 2016, 4:48 p.m. OK Java 8 TESTS 37 202 0 1500
20614355 Sehnsucht A Sept. 14, 2016, 12:48 p.m. OK Kotlin TESTS 37 732 1433600 1500
50521825 nemars A Feb. 26, 2019, 9:47 a.m. OK Mono C# TESTS 37 639 14950400 1500
20573181 azukun A Sept. 13, 2016, 4:43 p.m. OK MS C# TESTS 37 171 4505600 1500
20681343 leonidvasilyev A Sept. 17, 2016, noon OK MS C# TESTS 37 265 11366400 1500
27260065 VCipher A May 21, 2017, 6:17 a.m. OK MS C# TESTS 37 311 15872000 1500
23687966 m1_k3 A Jan. 10, 2017, 9:15 p.m. OK MS C# TESTS 37 405 20582400 1500
21969935 pomjuice A Nov. 1, 2016, 2:13 p.m. OK MS C# TESTS 37 482 27750400 1500
20772579 Chubcheg A Sept. 20, 2016, 10:08 a.m. OK MS C# TESTS 37 810 14643200 1500
20573288 Hujiwara A Sept. 13, 2016, 4:43 p.m. OK MS C++ TESTS 37 62 1024000 1500
49189329 vjudge2 A Jan. 30, 2019, 7:33 a.m. OK MS C++ TESTS 37 62 1228800 1500
37434218 vjudge4 A April 18, 2018, 11:43 a.m. OK MS C++ TESTS 37 62 6246400 1500
50290760 vjudge1 A Feb. 21, 2019, 5:19 p.m. OK MS C++ TESTS 37 77 3993600 1500
49210829 vjudge1 A Jan. 30, 2019, 3:31 p.m. OK MS C++ TESTS 37 78 1024000 1500
31733298 vjudge2 A Oct. 26, 2017, 9:11 a.m. OK MS C++ TESTS 37 78 1331200 1500
31733471 vjudge3 A Oct. 26, 2017, 9:20 a.m. OK MS C++ TESTS 37 78 1331200 1500
51107487 vjudge4 A March 10, 2019, 12:50 a.m. OK MS C++ TESTS 37 78 1433600 1500
49190187 vjudge5 A Jan. 30, 2019, 7:55 a.m. OK MS C++ TESTS 37 78 40140800 1500
31733947 vjudge3 A Oct. 26, 2017, 9:42 a.m. OK MS C++ TESTS 37 93 1331200 1500
69056856 vjudge1 A Jan. 18, 2020, 2:51 p.m. OK MS C++ 2017 TESTS 37 93 1024000 1500
58929488 CtrlAlt A Aug. 16, 2019, 10:29 p.m. OK MS C++ 2017 TESTS 37 171 15974400 1500
58242445 vjudge2 A Aug. 4, 2019, 2:29 a.m. OK MS C++ 2017 TESTS 37 218 80179200 1500
50804751 BLACK55 A March 5, 2019, 4:18 a.m. OK MS C++ 2017 TESTS 37 280 1228800 1500
64444986 yuanyuan2048 A Nov. 7, 2019, 6:11 a.m. OK MS C++ 2017 TESTS 37 311 2662400 1500
68581623 vjudge3 A Jan. 11, 2020, 10:14 a.m. OK MS C++ 2017 TESTS 37 389 3379200 1500
68939794 vjudge3 A Jan. 16, 2020, 2:03 p.m. OK MS C++ 2017 TESTS 37 420 3379200 1500
68683955 vjudge1 A Jan. 13, 2020, 1:49 a.m. OK MS C++ 2017 TESTS 37 420 3379200 1500
65790101 onipp A Nov. 26, 2019, 9:34 p.m. OK MS C++ 2017 TESTS 37 420 7987200 1500
47520908 mayakin A Dec. 26, 2018, 1:02 p.m. OK PHP TESTS 37 436 7884800 1500
20572560 hellman_ A Sept. 13, 2016, 4:42 p.m. OK PyPy 2 TESTS 37 748 10547200 1500
20809014 merolish A Sept. 22, 2016, 2:13 a.m. OK PyPy 2 TESTS 37 764 5529600 1500
20611234 cielavenir A Sept. 14, 2016, 10:18 a.m. OK PyPy 2 TESTS 37 794 7884800 1500
48928489 noob77777 A Jan. 25, 2019, 11:35 a.m. OK PyPy 2 TESTS 37 826 9216000 1500
35805549 FatherofBenoni A March 1, 2018, 8:05 a.m. OK PyPy 2 TESTS 37 857 32563200 1500
20601090 boombastic A Sept. 13, 2016, 10:25 p.m. OK PyPy 2 TESTS 37 935 8192000 1500
20629035 nealzane A Sept. 15, 2016, 12:02 a.m. OK PyPy 2 TESTS 37 967 12390400 1500
20599819 boombastic A Sept. 13, 2016, 8:58 p.m. OK PyPy 2 TESTS 37 997 9113600 1500
37985259 wolffd A May 7, 2018, 5 a.m. OK PyPy 2 TESTS 37 998 32256000 1500
33842561 laoliumang A Jan. 1, 2018, 6:40 a.m. OK Python 2 TESTS 37 436 7065600 1500
20934561 llllllll A Sept. 26, 2016, 9 p.m. OK Python 2 TESTS 37 451 4198400 1500
22088989 franckmy A Nov. 7, 2016, 6:19 a.m. OK Python 2 TESTS 37 545 1024000 1500
20809009 merolish A Sept. 22, 2016, 2:12 a.m. OK Python 2 TESTS 37 670 1024000 1500
34573582 dragonwarrior A Jan. 26, 2018, 11:22 a.m. OK Python 2 TESTS 37 826 11468800 1500
20659530 orailly A Sept. 16, 2016, 12:23 p.m. OK Python 3 TESTS 37 373 9420800 1500
65285113 Mohamed_Ayman A Nov. 18, 2019, 7:47 a.m. OK Python 3 TESTS 37 389 4608000 1500
20659818 orailly A Sept. 16, 2016, 12:38 p.m. OK Python 3 TESTS 37 451 1843200 1500
42118422 Mk_Python_v1 A Aug. 26, 2018, 11:09 a.m. OK Python 3 TESTS 37 452 1536000 1500
20601540 N1amr A Sept. 13, 2016, 11:18 p.m. OK Python 3 TESTS 37 623 4403200 1500
48695114 amirah A Jan. 21, 2019, 8:30 p.m. OK Python 3 TESTS 37 670 1024000 1500
46181418 jaaguptamme A Nov. 24, 2018, 6:10 p.m. OK Python 3 TESTS 37 670 1024000 1500
46654867 Silky_Littleraisin A Dec. 5, 2018, 3:47 p.m. OK Python 3 TESTS 37 686 1945600 1500
63682760 rishus23 A Oct. 28, 2019, 8:42 p.m. OK Python 3 TESTS 37 717 4710400 1500
48086507 xumouyi A Jan. 8, 2019, 11:36 a.m. OK Python 3 TESTS 37 732 3891200 1500
23534590 dione A Jan. 4, 2017, 11:51 a.m. OK Ruby TESTS 37 655 17510400 1500
21661687 reldan A Oct. 22, 2016, 8:49 a.m. OK Scala TESTS 37 623 30412800 1500
20748282 mialerxd A Sept. 19, 2016, 5:59 a.m. OK Scala TESTS 37 936 8192000 1500
20762455 Ramadoka. A Sept. 19, 2016, 6:11 p.m. OK Scala TESTS 37 998 0 1500

remove filters

Back to search problems