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'Pak Chanek is traveling to Manado. It turns out that OSN (Indonesian National Scientific Olympiad) 2019 is being held. The contestants of OSN 2019 are currently lining up in a field to be photographed. The field is shaped like a grid of size N x 10^{100} with N rows and 10^{100} columns. The rows are numbered from 1 to N from north to south, the columns are numbered from 1 to 10^{100} from west to east. The tile in row r and column c is denoted as (r,c) . There are N provinces that participate in OSN 2019. Initially, each contestant who represents province i stands in tile (i, p) for each p satisfying L_i <= q p <= q R_i . So, we can see that there are R_i-L_i+1 contestants who represent province i . Pak Chanek has a variable Z that is initially equal to 0 . In one operation, Pak Chanek can choose a row i and a positive integer k . Then, Pak Chanek will do one of the two following possibilities: After each operation, the value of Z will change into Z text{ OR } k , with text{OR} being the bitwise OR operation. Note that Pak Chanek can do operations to the same row more than once. Also note that Pak Chanek is not allowed to move contestants out of the grid. There are Q questions. For the j -th question, you are given a positive integer W_j , Pak Chanek must do zero or more operations so that the final value of Z is exactly W_j . Define M as the biggest number such that after all operations, there is at least one column that contains exactly M contestants. For each question, you must find the biggest possible M for all sequences of operations that can be done by Pak Chanek. Note that the operations done by Pak Chanek for one question do not carry over to other questions. The first line contains a single integer N ( 1 <= q N <= q 10^5 ) -- the number of rows in'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
170865054 |
Tom66 2019wangminxiao AcceptedPower |
F |
Sept. 4, 2022, 3:30 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
264 |
4096000 |
|
|
170894398 |
Bedo_Sayed |
F |
Sept. 4, 2022, 9:19 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
280 |
88985600 |
|
|
170894299 |
Bedo_Sayed |
F |
Sept. 4, 2022, 9:17 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
343 |
169164800 |
|
|
170866502 |
Ace_02 |
F |
Sept. 4, 2022, 3:42 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
404 |
4198400 |
|
|
170865293 |
Jimanbanashi |
F |
Sept. 4, 2022, 3:32 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
405 |
7270400 |
|
|
170863568 |
realcomplex Valters07 ansisgustavs2 |
F |
Sept. 4, 2022, 3:19 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
420 |
7270400 |
|
|
170863637 |
bin9638 |
F |
Sept. 4, 2022, 3:19 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
467 |
33689600 |
|
|
170864524 |
MatrixCascade_qwq themoon |
F |
Sept. 4, 2022, 3:26 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
468 |
58368000 |
|
|
170863832 |
tan900 |
F |
Sept. 4, 2022, 3:21 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
529 |
36659200 |
|
|
170867607 |
yoy68 y0y68 Suffocating |
F |
Sept. 4, 2022, 3:51 p.m. |
OK |
GNU C++14 |
TESTS |
15 |
546 |
7270400 |
|
|
170869039 |
Bobocan |
F |
Sept. 4, 2022, 4:03 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
265 |
4505600 |
|
|
170878701 |
Nahhal TMHazem FarhanHY |
F |
Sept. 4, 2022, 5:34 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
358 |
7168000 |
|
|
170885695 |
Dakovalev1 |
F |
Sept. 4, 2022, 6:53 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
373 |
4096000 |
|
|
170869972 |
madmax klimoza |
F |
Sept. 4, 2022, 4:11 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
374 |
7270400 |
|
|
170857951 |
qiqi20021026 SSerxhs Randias |
F |
Sept. 4, 2022, 2:40 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
374 |
7372800 |
|
|
170862205 |
Pajaraja milisav allllekssssa |
F |
Sept. 4, 2022, 3:09 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
374 |
7577600 |
|
|
170886036 |
mahdi.hasnat |
F |
Sept. 4, 2022, 6:58 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
374 |
8908800 |
|
|
170872815 |
quanlt206 lmqzzz ShineNoLife |
F |
Sept. 4, 2022, 4:35 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
451 |
10035200 |
|
|
170858418 |
yyljkydr Suika_predator oipotato |
F |
Sept. 4, 2022, 2:43 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
467 |
61337600 |
|
|
170870126 |
Agreb |
F |
Sept. 4, 2022, 4:12 p.m. |
OK |
GNU C++17 |
TESTS |
15 |
468 |
9728000 |
|
|
170861783 |
PIachta Sophie_Neuenmuller |
F |
Sept. 4, 2022, 3:05 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
311 |
7168000 |
|
|
170861842 |
PIachta Sophie_Neuenmuller |
F |
Sept. 4, 2022, 3:06 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
311 |
8192000 |
|
|
170885165 |
bashkort |
F |
Sept. 4, 2022, 6:46 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
342 |
8294400 |
|
|
170885126 |
bashkort |
F |
Sept. 4, 2022, 6:46 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
374 |
8294400 |
|
|
170855962 |
errorgorn |
F |
Sept. 4, 2022, 2:28 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
451 |
15257600 |
|
|
170856907 |
potato167 |
F |
Sept. 4, 2022, 2:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
452 |
4300800 |
|
|
170867513 |
mbdbr |
F |
Sept. 4, 2022, 3:51 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
482 |
8192000 |
|
|
170866941 |
cuiaoxiang |
F |
Sept. 4, 2022, 3:46 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
514 |
4710400 |
|
|
170863814 |
shellbertt McPqndq mattagar6 |
F |
Sept. 4, 2022, 3:21 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
623 |
10547200 |
|
|
170877400 |
pachico |
F |
Sept. 4, 2022, 5:20 p.m. |
OK |
GNU C++17 (64) |
TESTS |
15 |
655 |
8396800 |
|
|
170884171 |
_skb_ DrSwad _timelord |
F |
Sept. 4, 2022, 6:34 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
170 |
9625600 |
|
|
170864694 |
fastmath turmax LeoPro |
F |
Sept. 4, 2022, 3:27 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
264 |
15769600 |
|
|
170885630 |
fwtt2 |
F |
Sept. 4, 2022, 6:52 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
296 |
5324800 |
|
|
170870256 |
jeroenodb |
F |
Sept. 4, 2022, 4:13 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
311 |
5017600 |
|
|
170861629 |
A_G |
F |
Sept. 4, 2022, 3:04 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
311 |
5017600 |
|
|
170857568 |
IntoTheNight brunovsky |
F |
Sept. 4, 2022, 2:38 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
358 |
8192000 |
|
|
170891541 |
Romy67 |
F |
Sept. 4, 2022, 8:24 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
358 |
8499200 |
|
|
170871352 |
Dart-Xeyter |
F |
Sept. 4, 2022, 4:23 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
358 |
9011200 |
|
|
170870689 |
OPsigma |
F |
Sept. 4, 2022, 4:17 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
358 |
9011200 |
|
|
170855936 |
Maksim1744 |
F |
Sept. 4, 2022, 2:28 p.m. |
OK |
GNU C++20 (64) |
TESTS |
15 |
374 |
12697600 |
|
|
170893079 |
ekwek |
F |
Sept. 4, 2022, 8:52 p.m. |
OK |
Java 11 |
TESTS |
15 |
420 |
0 |
|
|
170891967 |
ekwek |
F |
Sept. 4, 2022, 8:31 p.m. |
OK |
Java 11 |
TESTS |
15 |
498 |
0 |
|
|
170867315 |
kaiboy rainboy Dukkha |
F |
Sept. 4, 2022, 3:49 p.m. |
OK |
Java 17 |
TESTS |
15 |
467 |
102400 |
|
|
remove filters
Back to search problems