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.
Problems
B'You have an array a_1,a_2, ... , a_n . Each element initially has value 0 and color 1 . You are also given q queries to perform: The first line of input contains two integers n and q ( 1 <= n,q <= 10^6 ) -- the length of array a and the number of queries you have to perform. Each of the next q lines contains the query given in the form described in the problem statement. Print the answers to the queries of the third type on separate lines. The first sample test is explained below. Blue, red and green represent colors 1 , 2 and 3 respectively. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
146460802 |
gzchenben |
E |
Feb. 15, 2022, 12:35 a.m. |
OK |
GNU C++14 |
TESTS |
84 |
1419 |
21094400 |
|
|
146427386 |
tiinpeng |
E |
Feb. 14, 2022, 4:33 p.m. |
OK |
GNU C++14 |
TESTS |
84 |
1434 |
47104000 |
|
|
146460975 |
tiinpeng |
E |
Feb. 15, 2022, 12:40 a.m. |
OK |
GNU C++14 |
TESTS |
84 |
1481 |
47104000 |
|
|
146477938 |
TheSadError |
E |
Feb. 15, 2022, 5:42 a.m. |
OK |
GNU C++14 |
TESTS |
86 |
1559 |
48332800 |
|
|
146462189 |
xukai |
E |
Feb. 15, 2022, 1:19 a.m. |
OK |
GNU C++14 |
TESTS |
84 |
1574 |
37273600 |
|
|
146426091 |
xukai |
E |
Feb. 14, 2022, 4:30 p.m. |
OK |
GNU C++14 |
TESTS |
84 |
1574 |
37273600 |
|
|
146476243 |
hefengchen |
E |
Feb. 15, 2022, 5:21 a.m. |
OK |
GNU C++14 |
TESTS |
86 |
1575 |
48332800 |
|
|
146477292 |
kongweisa |
E |
Feb. 15, 2022, 5:35 a.m. |
OK |
GNU C++14 |
TESTS |
86 |
1621 |
104243200 |
|
|
146463632 |
chaihf |
E |
Feb. 15, 2022, 1:56 a.m. |
OK |
GNU C++14 |
TESTS |
84 |
1638 |
88473600 |
|
|
146463177 |
Wanus |
E |
Feb. 15, 2022, 1:45 a.m. |
OK |
GNU C++14 |
TESTS |
84 |
1653 |
21196800 |
|
|
146473699 |
hotwords |
E |
Feb. 15, 2022, 4:48 a.m. |
OK |
GNU C++17 |
TESTS |
86 |
1247 |
48332800 |
|
|
146479108 |
two_lcl |
E |
Feb. 15, 2022, 5:56 a.m. |
OK |
GNU C++17 |
TESTS |
86 |
1404 |
160358400 |
|
|
146445340 |
islingr |
E |
Feb. 14, 2022, 7:11 p.m. |
OK |
GNU C++17 |
TESTS |
84 |
1435 |
29388800 |
|
|
146423797 |
casual11 |
E |
Feb. 14, 2022, 4:24 p.m. |
OK |
GNU C++17 |
TESTS |
84 |
1512 |
29286400 |
|
|
146467114 |
lxyb |
E |
Feb. 15, 2022, 3:07 a.m. |
OK |
GNU C++17 |
TESTS |
86 |
1528 |
64409600 |
|
|
146472348 |
wifiiii |
E |
Feb. 15, 2022, 4:29 a.m. |
OK |
GNU C++17 |
TESTS |
86 |
1528 |
64716800 |
|
|
146422429 |
emofunc |
E |
Feb. 14, 2022, 4:20 p.m. |
OK |
GNU C++17 |
TESTS |
84 |
1528 |
76185600 |
|
|
146470080 |
_no_mercy |
E |
Feb. 15, 2022, 3:55 a.m. |
OK |
GNU C++17 |
TESTS |
86 |
1559 |
48332800 |
|
|
146467293 |
handlecurrentinuse |
E |
Feb. 15, 2022, 3:11 a.m. |
OK |
GNU C++17 |
TESTS |
86 |
1559 |
64409600 |
|
|
146427125 |
purinliang |
E |
Feb. 14, 2022, 4:32 p.m. |
OK |
GNU C++17 |
TESTS |
84 |
1559 |
64409600 |
|
|
146425943 |
orz_liuwei |
E |
Feb. 14, 2022, 4:29 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1247 |
32972800 |
|
|
146457032 |
fxhd |
E |
Feb. 14, 2022, 10:07 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1247 |
77926400 |
|
|
146445656 |
nohaxjustsoflo |
E |
Feb. 14, 2022, 7:12 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1387 |
44134400 |
|
|
146465793 |
suta |
E |
Feb. 15, 2022, 2:41 a.m. |
OK |
GNU C++17 (64) |
TESTS |
85 |
1418 |
104448000 |
|
|
146452169 |
Graphter |
E |
Feb. 14, 2022, 8:25 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1435 |
24166400 |
|
|
146447309 |
suzuken_w |
E |
Feb. 14, 2022, 7:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1481 |
24064000 |
|
|
146464774 |
cridaflo |
E |
Feb. 15, 2022, 2:21 a.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1512 |
32563200 |
|
|
146453132 |
Golden |
E |
Feb. 14, 2022, 8:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1512 |
136294400 |
|
|
146419750 |
LittleCube |
E |
Feb. 14, 2022, 4:13 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1575 |
184524800 |
|
|
146423774 |
solaimanope |
E |
Feb. 14, 2022, 4:24 p.m. |
OK |
GNU C++17 (64) |
TESTS |
84 |
1606 |
69939200 |
|
|
146420060 |
maspy |
E |
Feb. 14, 2022, 4:14 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
670 |
24780800 |
|
|
146465029 |
Vercingetorix |
E |
Feb. 15, 2022, 2:26 a.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
982 |
33177600 |
|
|
146461094 |
overnap |
E |
Feb. 15, 2022, 12:45 a.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1076 |
22016000 |
|
|
146451158 |
Kotoblepass |
E |
Feb. 14, 2022, 8:09 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1107 |
38092800 |
|
|
146470543 |
Lavine |
E |
Feb. 15, 2022, 4:02 a.m. |
OK |
GNU C++20 (64) |
TESTS |
86 |
1123 |
72192000 |
|
|
146421865 |
flukehn |
E |
Feb. 14, 2022, 4:18 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1153 |
24473600 |
|
|
146422720 |
keywet06 |
E |
Feb. 14, 2022, 4:21 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1169 |
33280000 |
|
|
146455746 |
baddog |
E |
Feb. 14, 2022, 9:33 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1201 |
22016000 |
|
|
146448244 |
kaiboy |
E |
Feb. 14, 2022, 7:33 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1216 |
26214400 |
|
|
146447981 |
kaiboy |
E |
Feb. 14, 2022, 7:31 p.m. |
OK |
GNU C++20 (64) |
TESTS |
84 |
1216 |
26214400 |
|
|
146447283 |
Dukkha |
E |
Feb. 14, 2022, 7:24 p.m. |
OK |
Java 11 |
TESTS |
84 |
2262 |
40652800 |
|
|
146445086 |
MagentaCobra |
E |
Feb. 14, 2022, 7:10 p.m. |
OK |
Java 8 |
TESTS |
84 |
2714 |
58880000 |
|
|
146445217 |
YahiaSherif |
E |
Feb. 14, 2022, 7:10 p.m. |
OK |
Java 8 |
TESTS |
84 |
3821 |
37171200 |
|
|
146473850 |
OLOGY |
E |
Feb. 15, 2022, 4:49 a.m. |
OK |
PyPy 3-64 |
TESTS |
86 |
3697 |
162918400 |
|
|
146474296 |
OLOGY |
E |
Feb. 15, 2022, 4:55 a.m. |
OK |
PyPy 3-64 |
TESTS |
86 |
3728 |
162816000 |
|
|
146474999 |
OLOGY |
E |
Feb. 15, 2022, 5:06 a.m. |
OK |
PyPy 3-64 |
TESTS |
86 |
3728 |
164147200 |
|
|
146475493 |
OLOGY |
E |
Feb. 15, 2022, 5:12 a.m. |
OK |
PyPy 3-64 |
TESTS |
86 |
3744 |
163020800 |
|
|
146462955 |
sansen |
E |
Feb. 15, 2022, 1:39 a.m. |
OK |
Rust 2021 |
TESTS |
84 |
1528 |
66867200 |
|
|
remove filters
Back to search problems