Codeforces Global Round 20

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
1672 Codeforces Global Round 20 FINISHED False 10800 86543662 April 23, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 994 ) H Zigu Zagu PROGRAMMING constructive algorithms greedy 2700

B'You have a binary string a of length n consisting only of digits 0 and 1 . You are given q queries. In the i -th query, you are given two indices l and r such that 1 <= l <= r <= n . Let s=a[l,r] . You are allowed to do the following operation on s : For each of the q queries, find the minimum number of operations needed to make s an empty string. Note that for a string s , s[l,r] denotes the subsegment s_l,s_{l+1}, ldots,s_r . The first line contains two integers n and q ( 1 <= n, q <= 2 cdot 10 ^ 5 ) -- the length of the binary string a and the number of queries respectively. The second line contains a binary string a of length n ( a_i in {0, 1 } ). Each of the next q lines contains two integers l and r ( 1 <= l <= r <= n ) -- representing the substring of each query. Print q lines, the i -th line representing the minimum number of operations needed for the i -th query. In the first test case, '...

Tutorials

Global Round 20 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154781457 dean.menezes H April 23, 2022, 6:51 p.m. OK GNU C11 TESTS 27 109 3584000 2700
154866342 rainboy H April 24, 2022, 3:12 p.m. OK GNU C11 TESTS 27 873 1843200 2700
154782797 rainboy H April 23, 2022, 7:11 p.m. OK GNU C11 TESTS 27 873 5017600 2700
154802578 eecs H April 24, 2022, 2:43 a.m. OK GNU C++14 TESTS 27 109 1843200 2700
154839740 CunFu_ZhuGe H April 24, 2022, 10:58 a.m. OK GNU C++14 TESTS 27 124 1740800 2700
154801936 peiwenjun H April 24, 2022, 2:28 a.m. OK GNU C++14 TESTS 27 124 1843200 2700
154896948 KING_OF_TURTLE H April 25, 2022, 1:59 a.m. OK GNU C++14 TESTS 27 124 1843200 2700
154840966 walk_alone H April 24, 2022, 11:11 a.m. OK GNU C++14 TESTS 27 124 1843200 2700
154812444 Aokana H April 24, 2022, 5:45 a.m. OK GNU C++14 TESTS 27 124 1843200 2700
154801509 L7-56 H April 24, 2022, 2:17 a.m. OK GNU C++14 TESTS 27 139 1843200 2700
154784800 lukamosiashvili H April 23, 2022, 7:41 p.m. OK GNU C++14 TESTS 27 139 2969600 2700
154858935 XueYJ H April 24, 2022, 1:52 p.m. OK GNU C++14 TESTS 27 139 3379200 2700
154802984 Suiseiseki H April 24, 2022, 2:52 a.m. OK GNU C++14 TESTS 27 140 1740800 2700
154806496 MonkeyKing H April 24, 2022, 4:08 a.m. OK GNU C++17 TESTS 27 124 1843200 2700
154803720 DerekFeng H April 24, 2022, 3:09 a.m. OK GNU C++17 TESTS 27 139 1843200 2700
154775406 okwedook H April 23, 2022, 5:43 p.m. OK GNU C++17 TESTS 27 139 2150400 2700
154877189 dayuanx H April 24, 2022, 5:17 p.m. OK GNU C++17 TESTS 27 139 2662400 2700
154784443 forgothandle H April 23, 2022, 7:35 p.m. OK GNU C++17 TESTS 27 140 2150400 2700
154788546 se1ka2 H April 23, 2022, 8:43 p.m. OK GNU C++17 TESTS 27 140 2150400 2700
154803578 Chirography_11 H April 24, 2022, 3:06 a.m. OK GNU C++17 TESTS 27 140 2150400 2700
154826127 ooaa H April 24, 2022, 8:24 a.m. OK GNU C++17 TESTS 27 140 2150400 2700
154785469 _LeMur_ H April 23, 2022, 7:51 p.m. OK GNU C++17 TESTS 27 140 2969600 2700
154798558 tokusakurai H April 24, 2022, 12:53 a.m. OK GNU C++17 TESTS 27 140 4505600 2700
154906330 CE_WA_TLE H April 25, 2022, 5:34 a.m. OK GNU C++17 (64) TESTS 27 46 22323200 2700
154814475 froggyzhang H April 24, 2022, 6:12 a.m. OK GNU C++17 (64) TESTS 27 78 1843200 2700
154896202 enslaved H April 24, 2022, 11:34 p.m. OK GNU C++17 (64) TESTS 27 92 4608000 2700
154866423 rainboy H April 24, 2022, 3:12 p.m. OK GNU C++17 (64) TESTS 27 93 1740800 2700
154806014 xyf007 H April 24, 2022, 3:57 a.m. OK GNU C++17 (64) TESTS 27 93 1843200 2700
154813972 zhangguangxuan99 H April 24, 2022, 6:05 a.m. OK GNU C++17 (64) TESTS 27 93 2150400 2700
154792569 caan_do H April 23, 2022, 10:01 p.m. OK GNU C++17 (64) TESTS 27 93 2150400 2700
154804508 tyin H April 24, 2022, 3:26 a.m. OK GNU C++17 (64) TESTS 27 93 2560000 2700
154795192 keep__calm H April 23, 2022, 11:08 p.m. OK GNU C++17 (64) TESTS 27 93 3686400 2700
154900476 HeartFireW H April 25, 2022, 3:27 a.m. OK GNU C++17 (64) TESTS 27 93 27033600 2700
154809050 Ivan_len H April 24, 2022, 4:59 a.m. OK GNU C++20 (64) TESTS 27 62 2150400 2700
154776509 lpl_albert H April 23, 2022, 5:52 p.m. OK GNU C++20 (64) TESTS 27 77 2150400 2700
154798392 HollwoQ_Pelw H April 24, 2022, 12:48 a.m. OK GNU C++20 (64) TESTS 27 77 2969600 2700
154774023 A_G H April 23, 2022, 5:32 p.m. OK GNU C++20 (64) TESTS 27 78 2150400 2700
154878654 komeiji_koishi514 H April 24, 2022, 5:38 p.m. OK GNU C++20 (64) TESTS 27 78 2150400 2700
154826500 Grapeee H April 24, 2022, 8:28 a.m. OK GNU C++20 (64) TESTS 27 78 2150400 2700
154791165 IntoTheNight H April 23, 2022, 9:31 p.m. OK GNU C++20 (64) TESTS 27 78 2150400 2700
154784328 jeroenodb H April 23, 2022, 7:33 p.m. OK GNU C++20 (64) TESTS 27 78 2150400 2700
154783457 tox1c_kid H April 23, 2022, 7:20 p.m. OK GNU C++20 (64) TESTS 27 78 2150400 2700
154807941 fishcathu. H April 24, 2022, 4:37 a.m. OK GNU C++20 (64) TESTS 27 78 2457600 2700
154780434 Hakiobo H April 23, 2022, 6:36 p.m. OK Kotlin 1.4 TESTS 27 296 66150400 2700
154866385 rainboy H April 24, 2022, 3:12 p.m. OK MS C++ 2017 TESTS 27 156 1843200 2700
154866490 titia H April 24, 2022, 3:13 p.m. OK PyPy 3 TESTS 27 639 10342400 2700
154784523 clause H April 23, 2022, 7:36 p.m. OK Rust 2021 TESTS 27 156 6963200 2700
154784409 clause H April 23, 2022, 7:34 p.m. OK Rust 2021 TESTS 27 156 6963200 2700

remove filters

Back to search problems