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 |
---|---|---|---|---|---|---|
1872 | Codeforces Round 895 (Div. 3) | FINISHED | False | 8100 | 43082663 | Sept. 7, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 14604 ) | E | Data Structures Fan | PROGRAMMING | bitmasks data structures |
B"You are given an array of integers a_1, a_2, ldots, a_n , as well as a binary string ^{ dagger} s consisting of n characters. Augustin is a big fan of data structures. Therefore, he asked you to implement a data structure that can answer q queries. There are two types of queries: Please help Augustin to answer all the queries! For example, if n = 4 , a = [1, 2, 3, 6] , s = texttt{1001} , consider the following series of queries: ^{ dagger} A binary string is a string containing only characters texttt{0} or texttt{1} . The first line of the input contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the test. The descriptions of the test cases follow. The first line of each test case description contains an integer n ( 1 <= n <= 10^5 ) -- the length of the array. The second line of the test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ). The third line of the test case contains the binary string s of length n . The fourth line of the test case contains one integer q ( 1 <= q <= 10^5 ) -- the number of queries. The subsequent q lines of the test case describe the queries. The first number of each query, tp in {1, 2 } , characterizes the type of the query: if tp = 1 , then 2 integers 1 <= l <= r <= n follow, meaning that the operation of type 1 should be performed with parameters l, r , and if tp = 2 , then one integer g in {0, 1 } follows, meaning that the operation of type 2 should be performed with parameter g . It is guaranteed that the sum of n over all test cases does not exceed 10^5 , and also that the sum of q over all test cases does not exceed 10^5 . For each test case, and for each query of type 2 in it, output the answer to the corresponding query. Let's analyze the first test case:"... |
Codeforces Round 895 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
222391362 | bluemegane | E | Sept. 8, 2023, 4:04 a.m. | OK | C# 8 | TESTS | 8 | 218 | 18944000 | ||
222349254 | sreejanarsingoju | E | Sept. 7, 2023, 5:16 p.m. | OK | Clang++17 Diagnostics | TESTS | 8 | 1762 | 15052800 | ||
222386352 | Redpo | E | Sept. 8, 2023, 2:39 a.m. | OK | Clang++20 Diagnostics | TESTS | 8 | 1372 | 13107200 | ||
222385354 | rickyxrc | E | Sept. 8, 2023, 2:22 a.m. | OK | GNU C++14 | TESTS | 8 | 93 | 819200 | ||
222353032 | 6930kumarkundan | E | Sept. 7, 2023, 5:40 p.m. | OK | GNU C++14 | TESTS | 8 | 93 | 819200 | ||
222393257 | BIOSOIB | E | Sept. 8, 2023, 4:28 a.m. | OK | GNU C++14 | TESTS | 8 | 93 | 921600 | ||
222359776 | NaTsuuu | E | Sept. 7, 2023, 6:38 p.m. | OK | GNU C++14 | TESTS | 8 | 93 | 921600 | ||
222384600 | Blaze035 | E | Sept. 8, 2023, 2:09 a.m. | OK | GNU C++14 | TESTS | 8 | 93 | 1024000 | ||
222399920 | xinu | E | Sept. 8, 2023, 5:46 a.m. | OK | GNU C++14 | TESTS | 8 | 93 | 1228800 | ||
222386215 | funnyguyz | E | Sept. 8, 2023, 2:37 a.m. | OK | GNU C++14 | TESTS | 8 | 93 | 1228800 | ||
222384857 | ptilopsis- | E | Sept. 8, 2023, 2:13 a.m. | OK | GNU C++14 | TESTS | 8 | 93 | 1228800 | ||
222346659 | manjuan01 | E | Sept. 7, 2023, 5:03 p.m. | OK | GNU C++14 | TESTS | 8 | 93 | 1228800 | ||
222368602 | IngaleAnkur10 | E | Sept. 7, 2023, 8:24 p.m. | OK | GNU C++14 | TESTS | 8 | 93 | 1638400 | ||
222379354 | Xiaobaibubai | E | Sept. 8, 2023, 12:08 a.m. | OK | GNU C++17 | TESTS | 8 | 77 | 1228800 | ||
222372924 | Mohamed_Rezq | E | Sept. 7, 2023, 9:36 p.m. | OK | GNU C++17 | TESTS | 8 | 78 | 1228800 | ||
222373279 | animan17x | E | Sept. 7, 2023, 9:43 p.m. | OK | GNU C++17 | TESTS | 8 | 78 | 2048000 | ||
222380817 | HaPpY1213 | E | Sept. 8, 2023, 12:46 a.m. | OK | GNU C++17 | TESTS | 8 | 93 | 512000 | ||
222374457 | Nullius | E | Sept. 7, 2023, 10:05 p.m. | OK | GNU C++17 | TESTS | 8 | 93 | 819200 | ||
222366676 | LetsHaveFun2 | E | Sept. 7, 2023, 7:59 p.m. | OK | GNU C++17 | TESTS | 8 | 93 | 819200 | ||
222353953 | apollo301269 | E | Sept. 7, 2023, 5:47 p.m. | OK | GNU C++17 | TESTS | 8 | 93 | 819200 | ||
222387970 | circless | E | Sept. 8, 2023, 3:09 a.m. | OK | GNU C++17 | TESTS | 8 | 93 | 921600 | ||
222386560 | lsh_algorithm | E | Sept. 8, 2023, 2:43 a.m. | OK | GNU C++17 | TESTS | 8 | 93 | 921600 | ||
222371236 | FilipL | E | Sept. 7, 2023, 9:06 p.m. | OK | GNU C++17 | TESTS | 8 | 93 | 921600 | ||
222380770 | cheng1202 | E | Sept. 8, 2023, 12:44 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 819200 | ||
222400067 | sz_zx | E | Sept. 8, 2023, 5:47 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222389135 | hippo19 | E | Sept. 8, 2023, 3:28 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222382070 | _whb | E | Sept. 8, 2023, 1:16 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222381567 | yangjl | E | Sept. 8, 2023, 1:04 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222371207 | akdfjhafjlk | E | Sept. 7, 2023, 9:06 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222364160 | enslaved | E | Sept. 7, 2023, 7:28 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222362679 | camc | E | Sept. 7, 2023, 7:11 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222362395 | Misbaul_Hasan | E | Sept. 7, 2023, 7:08 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222356186 | anant83 | E | Sept. 7, 2023, 6:05 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 62 | 1228800 | ||
222399996 | Big_Feky | E | Sept. 8, 2023, 5:47 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222394793 | _learn_ | E | Sept. 8, 2023, 4:44 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222387863 | Dechancer | E | Sept. 8, 2023, 3:07 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222381710 | jvdss12 | E | Sept. 8, 2023, 1:08 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222363832 | __tmpy | E | Sept. 7, 2023, 7:25 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222356565 | Tansho | E | Sept. 7, 2023, 6:08 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222354374 | enjambhavana | E | Sept. 7, 2023, 5:50 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222347732 | RagnarOkk11 | E | Sept. 7, 2023, 5:08 p.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 819200 | ||
222400718 | Robbe | E | Sept. 8, 2023, 5:54 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 1228800 | ||
222400083 | xorzj | E | Sept. 8, 2023, 5:48 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 46 | 1228800 | ||
222355493 | botayhard | E | Sept. 7, 2023, 5:59 p.m. | OK | Go | TESTS | 8 | 62 | 20070400 | ||
222391593 | DATVN | E | Sept. 8, 2023, 4:07 a.m. | OK | Go | TESTS | 8 | 218 | 13619200 | ||
222382229 | Harwinvanak | E | Sept. 8, 2023, 1:20 a.m. | OK | Java 11 | TESTS | 8 | 249 | 0 | ||
222371455 | theSSS | E | Sept. 7, 2023, 9:10 p.m. | OK | Java 11 | TESTS | 8 | 249 | 0 | ||
222382105 | Harwinvanak | E | Sept. 8, 2023, 1:17 a.m. | OK | Java 11 | TESTS | 8 | 264 | 0 | ||
222359612 | gauravvv2204 | E | Sept. 7, 2023, 6:36 p.m. | OK | Java 11 | TESTS | 8 | 296 | 0 | ||
222400466 | f20201214 | E | Sept. 8, 2023, 5:52 a.m. | OK | Java 11 | TESTS | 8 | 312 | 0 | ||
222400885 | aishwarykesarwani | E | Sept. 8, 2023, 5:55 a.m. | OK | Java 11 | TESTS | 8 | 327 | 0 | ||
222354051 | WORTH | E | Sept. 7, 2023, 5:48 p.m. | OK | Java 11 | TESTS | 8 | 327 | 0 | ||
222393117 | ggghg | E | Sept. 8, 2023, 4:26 a.m. | OK | Java 11 | TESTS | 8 | 327 | 6963200 | ||
222382329 | Harwinvanak | E | Sept. 8, 2023, 1:22 a.m. | OK | Java 11 | TESTS | 8 | 561 | 0 | ||
222393666 | imsaurabhkhare | E | Sept. 8, 2023, 4:32 a.m. | OK | Java 11 | TESTS | 8 | 623 | 0 | ||
222394665 | d2s2 | E | Sept. 8, 2023, 4:42 a.m. | OK | Java 17 | TESTS | 8 | 280 | 307200 | ||
222400619 | ikun111 | E | Sept. 8, 2023, 5:53 a.m. | OK | Java 17 | TESTS | 8 | 295 | 4608000 | ||
222357332 | dinosparton_013 | E | Sept. 7, 2023, 6:16 p.m. | OK | Java 17 | TESTS | 8 | 296 | 512000 | ||
222351930 | iamdimonis | E | Sept. 7, 2023, 5:33 p.m. | OK | Java 17 | TESTS | 8 | 327 | 614400 | ||
222351312 | Just4Fun_ | E | Sept. 7, 2023, 5:28 p.m. | OK | Java 17 | TESTS | 8 | 327 | 614400 | ||
222352453 | _ryan18_ | E | Sept. 7, 2023, 5:36 p.m. | OK | Java 17 | TESTS | 8 | 327 | 819200 | ||
222346478 | ahmed.elbakly | E | Sept. 7, 2023, 5:03 p.m. | OK | Java 17 | TESTS | 8 | 342 | 6348800 | ||
222372425 | dzhi | E | Sept. 7, 2023, 9:27 p.m. | OK | Java 17 | TESTS | 8 | 436 | 18739200 | ||
222365651 | American_Eagle | E | Sept. 7, 2023, 7:47 p.m. | OK | Java 17 | TESTS | 8 | 560 | 819200 | ||
222389528 | QianCCC | E | Sept. 8, 2023, 3:34 a.m. | OK | Java 17 | TESTS | 8 | 780 | 1024000 | ||
222378176 | Y_T | E | Sept. 7, 2023, 11:35 p.m. | OK | Java 8 | TESTS | 8 | 155 | 0 | ||
222361472 | arutsudar | E | Sept. 7, 2023, 6:57 p.m. | OK | Java 8 | TESTS | 8 | 155 | 0 | ||
222361044 | UltimateST | E | Sept. 7, 2023, 6:52 p.m. | OK | Java 8 | TESTS | 8 | 155 | 70348800 | ||
222400724 | ikun111 | E | Sept. 8, 2023, 5:54 a.m. | OK | Java 8 | TESTS | 8 | 202 | 5120000 | ||
222400305 | ikun111 | E | Sept. 8, 2023, 5:50 a.m. | OK | Java 8 | TESTS | 8 | 202 | 5120000 | ||
222363628 | depurador_ik | E | Sept. 7, 2023, 7:22 p.m. | OK | Java 8 | TESTS | 8 | 217 | 0 | ||
222386524 | mohamedhassan_c | E | Sept. 8, 2023, 2:43 a.m. | OK | Java 8 | TESTS | 8 | 248 | 7884800 | ||
222371284 | Sumitsingh7 | E | Sept. 7, 2023, 9:07 p.m. | OK | Java 8 | TESTS | 8 | 389 | 7577600 | ||
222365520 | AbhayTiwari007 | E | Sept. 7, 2023, 7:45 p.m. | OK | Java 8 | TESTS | 8 | 577 | 0 | ||
222365414 | AbhayTiwari007 | E | Sept. 7, 2023, 7:44 p.m. | OK | Java 8 | TESTS | 8 | 997 | 0 | ||
222356161 | tatianyi | E | Sept. 7, 2023, 6:05 p.m. | OK | MS C++ 2017 | TESTS | 8 | 280 | 1126400 | ||
222386747 | Feng_Di233 | E | Sept. 8, 2023, 2:47 a.m. | OK | MS C++ 2017 | TESTS | 8 | 296 | 921600 | ||
222347371 | MMakurov | E | Sept. 7, 2023, 5:07 p.m. | OK | MS C++ 2017 | TESTS | 8 | 561 | 1740800 | ||
222351956 | biltharesatyendra | E | Sept. 7, 2023, 5:33 p.m. | OK | PyPy 2 | TESTS | 8 | 1231 | 8499200 | ||
222385551 | YMSeah | E | Sept. 8, 2023, 2:25 a.m. | OK | PyPy 3 | TESTS | 8 | 218 | 13312000 | ||
222388569 | stan23456 | E | Sept. 8, 2023, 3:18 a.m. | OK | PyPy 3 | TESTS | 8 | 514 | 14745600 | ||
222385356 | YMSeah | E | Sept. 8, 2023, 2:22 a.m. | OK | PyPy 3 | TESTS | 8 | 576 | 14131200 | ||
222388835 | Sruthi_11 | E | Sept. 8, 2023, 3:23 a.m. | OK | PyPy 3 | TESTS | 8 | 1294 | 11980800 | ||
222353813 | eugenechka.boyko.2_0-0 | E | Sept. 7, 2023, 5:46 p.m. | OK | PyPy 3 | TESTS | 8 | 1559 | 12288000 | ||
222391571 | satanclaws | E | Sept. 8, 2023, 4:07 a.m. | OK | PyPy 3 | TESTS | 8 | 1575 | 12390400 | ||
222355707 | RobinFromTheHood | E | Sept. 7, 2023, 6:01 p.m. | OK | PyPy 3-64 | TESTS | 8 | 202 | 16179200 | ||
222378122 | riroan | E | Sept. 7, 2023, 11:33 p.m. | OK | PyPy 3-64 | TESTS | 8 | 202 | 17920000 | ||
222355773 | rmr | E | Sept. 7, 2023, 6:02 p.m. | OK | PyPy 3-64 | TESTS | 8 | 202 | 24064000 | ||
222364820 | Chimpanzee | E | Sept. 7, 2023, 7:36 p.m. | OK | PyPy 3-64 | TESTS | 8 | 217 | 13721600 | ||
222353905 | Ana_naS | E | Sept. 7, 2023, 5:47 p.m. | OK | PyPy 3-64 | TESTS | 8 | 217 | 18227200 | ||
222353982 | alexwice | E | Sept. 7, 2023, 5:48 p.m. | OK | PyPy 3-64 | TESTS | 8 | 217 | 27545600 | ||
222350143 | HimanshuRajput | E | Sept. 7, 2023, 5:21 p.m. | OK | PyPy 3-64 | TESTS | 8 | 218 | 14028800 | ||
222397641 | harshk_52 | E | Sept. 8, 2023, 5:18 a.m. | OK | PyPy 3-64 | TESTS | 8 | 218 | 17510400 | ||
222371938 | Turtleeee | E | Sept. 7, 2023, 9:19 p.m. | OK | PyPy 3-64 | TESTS | 8 | 218 | 24883200 | ||
222354256 | Quick-One | E | Sept. 7, 2023, 5:49 p.m. | OK | PyPy 3-64 | TESTS | 8 | 233 | 13619200 | ||
222384729 | sami02jain | E | Sept. 8, 2023, 2:11 a.m. | OK | Python 3 | TESTS | 8 | 265 | 16384000 | ||
222351575 | YuRen-tw | E | Sept. 7, 2023, 5:30 p.m. | OK | Python 3 | TESTS | 8 | 327 | 12800000 | ||
222354334 | madhurisri2002 | E | Sept. 7, 2023, 5:50 p.m. | OK | Python 3 | TESTS | 8 | 358 | 19148800 | ||
222348318 | utoppia | E | Sept. 7, 2023, 5:11 p.m. | OK | Python 3 | TESTS | 8 | 358 | 21913600 | ||
222367616 | rajanlawar_24 | E | Sept. 7, 2023, 8:11 p.m. | OK | Python 3 | TESTS | 8 | 373 | 12902400 | ||
222366809 | ZsoldosP | E | Sept. 7, 2023, 8:01 p.m. | OK | Python 3 | TESTS | 8 | 373 | 12902400 | ||
222388556 | 2110030158_Nithin | E | Sept. 8, 2023, 3:18 a.m. | OK | Python 3 | TESTS | 8 | 374 | 12800000 | ||
222396128 | saikiranreddymekala28 | E | Sept. 8, 2023, 4:57 a.m. | OK | Python 3 | TESTS | 8 | 623 | 13312000 | ||
222369486 | rostoki | E | Sept. 7, 2023, 8:37 p.m. | OK | Python 3 | TESTS | 8 | 686 | 13516800 | ||
222351784 | 2110030033 | E | Sept. 7, 2023, 5:32 p.m. | OK | Python 3 | TESTS | 8 | 717 | 12800000 | ||
222366351 | matheusdacach | E | Sept. 7, 2023, 7:55 p.m. | OK | Rust 2021 | TESTS | 8 | 31 | 1024000 |
Back to search problems