Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov!

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
1340 Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov! FINISHED False 9000 149699711 April 23, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 548 ) F Nastya and CBS PROGRAMMING brute force data structures hashing

B' Nastya is a competitive programmer, but she is only studying now. Recently, Denis told her about the way to check if the string is correct bracket sequence. After that, unexpectedly, Nastya came up with a much more complex problem that Denis couldn 't solve. Can you solve it? A string s is given. It consists of k kinds of pairs of brackets. Each bracket has the form t -- it is an integer, such that 1 <= q |t| <= q k . If the bracket has a form t , then: Thus, there are k types of pairs of brackets in total. The queries need to be answered: The first line contains an integer n (1 <= q n <= q 10^5) -- length of string and k (1 <= q k <= q n) -- the number of kinds of pairs of brackets. The second line contains string s of length n -- n integers s_1, s_2, ldots, s_n (1 <= q |s_i| <= q k) The third line contains single integer q (1 <= q q <= q 10^5) -- the number of queries. Each of the following q lines describes the queries: For each query of 2 type, output "Yes" if the substring from the query is the correct bracket sequence and "No", otherwise. All letters can be displayed in any case. In the fourth test, initially, the string is not a correct bracket sequence, so the answer to the first query is "No". After two changes it will be equal to " 1 -1 ", so it is a correct bracket sequence and the answer to the fourth query is "Yes". '...

Tutorials

Codeforces Round #637 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77972032 beginend F April 25, 2020, 3:42 a.m. OK GNU C++14 TESTS 83 499 26112000
77902949 Rose_max F April 24, 2020, 10:40 a.m. OK GNU C++14 TESTS 82 717 12390400
77980385 jijiang F April 25, 2020, 5:56 a.m. OK GNU C++14 TESTS 83 3010 2048000
77958385 theStaticMind F April 24, 2020, 9:20 p.m. OK GNU C++14 TESTS 83 3073 6041600
77889377 Elegia F April 24, 2020, 7:40 a.m. OK GNU C++17 TESTS 82 545 5017600
77904971 I_love_myself F April 24, 2020, 11:07 a.m. OK GNU C++17 TESTS 82 1497 58982400
77864845 superguymj F April 24, 2020, 1:21 a.m. OK GNU C++17 TESTS 82 1700 26009600
77933264 _Ash__ F April 24, 2020, 3:59 p.m. OK GNU C++17 TESTS 83 1762 6553600
77936572 liouzhou_101 F April 24, 2020, 4:30 p.m. OK GNU C++17 TESTS 83 1965 2252800
77975513 dragonslayerintraining F April 25, 2020, 4:48 a.m. OK GNU C++17 TESTS 83 2012 2662400
77930947 liouzhou_101 F April 24, 2020, 3:39 p.m. OK GNU C++17 TESTS 83 2059 2252800
77933672 liouzhou_101 F April 24, 2020, 4:03 p.m. OK GNU C++17 TESTS 83 2090 2252800
77981725 yhchang3 F April 25, 2020, 6:12 a.m. OK GNU C++17 TESTS 83 2292 229273600
77844929 amethyst0 F April 23, 2020, 4:55 p.m. OK GNU C++17 TESTS 82 2324 173158400
77980958 emma F April 25, 2020, 6:03 a.m. OK GNU C++17 (64) TESTS 83 187 7475200
77980911 emma F April 25, 2020, 6:02 a.m. OK GNU C++17 (64) TESTS 83 187 7475200
77981045 emma F April 25, 2020, 6:04 a.m. OK GNU C++17 (64) TESTS 83 202 7475200
77980151 emma F April 25, 2020, 5:53 a.m. OK GNU C++17 (64) TESTS 83 265 7372800
77980774 emma F April 25, 2020, 6:01 a.m. OK GNU C++17 (64) TESTS 83 280 7372800
77861280 ecnerwala F April 23, 2020, 11:31 p.m. OK GNU C++17 (64) TESTS 82 608 259788800
77870728 skip2004 F April 24, 2020, 3:33 a.m. OK GNU C++17 (64) TESTS 82 733 2457600
77882121 maroonrk F April 24, 2020, 6:16 a.m. OK GNU C++17 (64) TESTS 82 748 34099200
77870771 skip2004 F April 24, 2020, 3:33 a.m. OK GNU C++17 (64) TESTS 82 826 2048000
77809735 skip2004 F April 23, 2020, 3:36 p.m. OK GNU C++17 (64) TESTS 82 826 2252800

remove filters

Back to search problems