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 |
1097
|
Hello 2019 |
FINISHED |
False |
10800 |
190912524 |
Jan. 4, 2019, 2:45 p.m. |
Problems
B'Alex decided to try his luck in TV shows. He once went to the quiz named "What 's That Word?!". After perfectly answering the questions "How is a pseudonym commonly referred to in the Internet?" ("Um... a nick?"), "After which famous inventor we name the unit of the magnetic field strength?" ("Um... Nikola Tesla?") and "Which rock band performs "How You Remind Me"?" ("Um... Nickelback?"), he decided to apply to a little bit more difficult TV show: "What 's in This Multiset?!". The rules of this TV show are as follows: there are n multisets numbered from 1 to n . Each of them is initially empty. Then, q events happen; each of them is in one of the four possible types: Note, that x , y and z described above are not necessarily different. In events of types 2 and 3 , the sum or the product is computed first, and then the assignment is performed. Alex is confused by the complicated rules of the show. Can you help him answer the requests of the 4 -th type? The first line contains two integers n and q ( 1 <= q n <= q 10^5 , 1 <= q q <= q 10^6 ) -- the number of multisets and the number of events. Each of the following q lines describes next event in the format given in statement. It 's guaranteed that 1 <= q x,y,z <= q n and 1 <= q v <= q 7000 always holds. It 's guaranteed that there will be at least one event of the 4 -th type. Print a string which consists of digits 0 and 1 only, and has length equal to the number of events of the 4 -th type. The i -th digit of the string should be equal to the answer for the i -th query of the 4 -th type. Here is how the multisets look in the example test after each of the events; i is the number of queries processed so far: '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
48015901 |
rainboy |
F |
Jan. 5, 2019, 10:46 p.m. |
OK |
GNU C11 |
TESTS |
40 |
654 |
101580800 |
|
2400 |
47973100 |
ruhan.habib39 |
F |
Jan. 5, 2019, 4:04 p.m. |
OK |
GNU C11 |
TESTS |
40 |
997 |
94924800 |
|
2400 |
61989417 |
Tunder__Sun |
F |
Oct. 6, 2019, 2:40 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
295 |
133734400 |
|
2400 |
48198603 |
luogu_bot3 |
F |
Jan. 11, 2019, 2:43 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
311 |
133734400 |
|
2400 |
61989510 |
Tunder__Sun |
F |
Oct. 6, 2019, 2:42 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
327 |
133734400 |
|
2400 |
54221484 |
__23333 |
F |
May 16, 2019, 3:37 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
483 |
97689600 |
|
2400 |
61989127 |
Tunder__Sun |
F |
Oct. 6, 2019, 2:35 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
592 |
100147200 |
|
2400 |
47935902 |
panole |
F |
Jan. 4, 2019, 4:40 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
639 |
100864000 |
|
2400 |
49209049 |
didgogns |
F |
Jan. 30, 2019, 2:54 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
686 |
100352000 |
|
2400 |
49364008 |
mrsrz |
F |
Feb. 2, 2019, 2:11 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
716 |
99942400 |
|
2400 |
49552978 |
CaptainSlow |
F |
Feb. 7, 2019, 7:33 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
716 |
107520000 |
|
2400 |
48117566 |
ldy419 |
F |
Jan. 9, 2019, 1:46 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
733 |
100147200 |
|
2400 |
48654373 |
ReaLNero1 |
F |
Jan. 21, 2019, 1:30 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
374 |
94003200 |
|
2400 |
47944737 |
neal |
F |
Jan. 4, 2019, 6:56 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
405 |
94003200 |
|
2400 |
47940568 |
yashChandnani |
F |
Jan. 4, 2019, 5:18 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
810 |
88985600 |
|
2400 |
47944514 |
neal |
F |
Jan. 4, 2019, 6:52 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
826 |
94003200 |
|
2400 |
60957029 |
iotang |
F |
Sept. 21, 2019, 3:17 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
826 |
100147200 |
|
2400 |
47939927 |
kyleliu |
F |
Jan. 4, 2019, 5:13 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
842 |
104550400 |
|
2400 |
47945462 |
waynetuinfor |
F |
Jan. 4, 2019, 7:13 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
888 |
100454400 |
|
2400 |
47942861 |
tokitsukaze |
F |
Jan. 4, 2019, 5:39 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
888 |
104550400 |
|
2400 |
47947059 |
860579 |
F |
Jan. 4, 2019, 8:06 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
904 |
95539200 |
|
2400 |
47947725 |
TadijaSebez |
F |
Jan. 4, 2019, 8:35 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
904 |
100249600 |
|
2400 |
47945453 |
ludo |
F |
Jan. 4, 2019, 7:13 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
795 |
100454400 |
|
2400 |
56512738 |
nickluo |
F |
July 4, 2019, 11:14 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
811 |
100659200 |
|
2400 |
68156762 |
HIR180 |
F |
Jan. 4, 2020, 9:14 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
857 |
100761600 |
|
2400 |
59940327 |
gitarist |
F |
Sept. 3, 2019, 11:13 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
904 |
100044800 |
|
2400 |
47934091 |
pekempey |
F |
Jan. 4, 2019, 4:27 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
967 |
100352000 |
|
2400 |
47967412 |
karasek |
F |
Jan. 5, 2019, 12:50 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
967 |
102809600 |
|
2400 |
60944872 |
Phortox |
F |
Sept. 20, 2019, 6:28 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
1029 |
100147200 |
|
2400 |
50141538 |
agrbin |
F |
Feb. 18, 2019, 10:27 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
1029 |
100556800 |
|
2400 |
47967561 |
karasek |
F |
Jan. 5, 2019, 12:54 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
1029 |
103116800 |
|
2400 |
48004874 |
redotter |
F |
Jan. 5, 2019, 6:26 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
1029 |
103833600 |
|
2400 |
47933335 |
Egor |
F |
Jan. 4, 2019, 4:21 p.m. |
OK |
Java 8 |
TESTS |
40 |
717 |
145612800 |
|
2400 |
48015900 |
Dukkha |
F |
Jan. 5, 2019, 10:46 p.m. |
OK |
Java 8 |
TESTS |
40 |
1029 |
142028800 |
|
2400 |
65571527 |
dalt |
F |
Nov. 23, 2019, 8:01 a.m. |
OK |
Java 8 |
TESTS |
40 |
1154 |
167116800 |
|
2400 |
47958159 |
tri |
F |
Jan. 5, 2019, 7:41 a.m. |
OK |
Java 8 |
TESTS |
40 |
1419 |
142745600 |
|
2400 |
47937872 |
mmaxio |
F |
Jan. 4, 2019, 4:54 p.m. |
OK |
Java 8 |
TESTS |
40 |
1653 |
237772800 |
|
2400 |
48094022 |
kessido |
F |
Jan. 8, 2019, 3:34 p.m. |
OK |
Java 8 |
TESTS |
40 |
1715 |
144486400 |
|
2400 |
47931707 |
uwi |
F |
Jan. 4, 2019, 4:11 p.m. |
OK |
Java 8 |
TESTS |
40 |
1778 |
258867200 |
|
2400 |
49066389 |
fetetriste |
F |
Jan. 27, 2019, 5:56 p.m. |
OK |
Java 8 |
TESTS |
40 |
1794 |
234700800 |
|
2400 |
47934471 |
Petr |
F |
Jan. 4, 2019, 4:29 p.m. |
OK |
Java 8 |
TESTS |
40 |
2012 |
145817600 |
|
2400 |
52519319 |
Morgan_Y |
F |
April 9, 2019, 7:45 a.m. |
OK |
Java 8 |
TESTS |
40 |
2074 |
214937600 |
|
2400 |
47941009 |
chokudai |
F |
Jan. 4, 2019, 5:22 p.m. |
OK |
Mono C# |
TESTS |
40 |
1450 |
121344000 |
|
2400 |
60956126 |
vjudge4 |
F |
Sept. 21, 2019, 2:44 a.m. |
OK |
MS C++ |
TESTS |
40 |
1216 |
265011200 |
|
2400 |
47938666 |
jokerwyt |
F |
Jan. 4, 2019, 5:01 p.m. |
OK |
MS C++ |
TESTS |
40 |
1310 |
264601600 |
|
2400 |
60706125 |
vjudge2 |
F |
Sept. 17, 2019, 5:19 a.m. |
OK |
MS C++ |
TESTS |
40 |
1419 |
100556800 |
|
2400 |
47942392 |
wa1tz719 |
F |
Jan. 4, 2019, 5:35 p.m. |
OK |
MS C++ |
TESTS |
40 |
1513 |
100556800 |
|
2400 |
52920277 |
AleksanderBalobanov |
F |
April 17, 2019, 5:31 p.m. |
OK |
MS C++ 2017 |
TESTS |
40 |
1388 |
102195200 |
|
2400 |
66436410 |
sansen |
F |
Dec. 7, 2019, 6:22 a.m. |
OK |
Rust |
TESTS |
40 |
607 |
122572800 |
|
2400 |
48027747 |
kobae964 |
F |
Jan. 6, 2019, 10:13 a.m. |
OK |
Rust |
TESTS |
40 |
1388 |
105779200 |
|
2400 |
remove filters
Back to search problems