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"This is the easy version of the problem. The only difference is that here k=2 . You can make hacks only if both the versions of the problem are solved. This is an interactive problem. Every decimal number has a base k equivalent. The individual digits of a base k number are called k -its. Let's define the k -itwise XOR of two k -its a and b as (a + b) bmod k . The k -itwise XOR of two base k numbers is equal to the new number formed by taking the k -itwise XOR of their corresponding k -its. The k -itwise XOR of two decimal numbers a and b is denoted by a oplus_{k} b and is equal to the decimal representation of the k -itwise XOR of the base k representations of a and b . All further numbers used in the statement below are in decimal unless specified. When k = 2 (it is always true in this version), the k -itwise XOR is the same as the bitwise XOR. You have hacked the criminal database of Rockport Police Department (RPD), also known as the Rap Sheet. But in order to access it, you require a password. You don't know it, but you are quite sure that it lies between 0 and n-1 inclusive. So, you have decided to guess it. Luckily, you can try at most n times without being blocked by the system. But the system is adaptive. Each time you make an incorrect guess, it changes the password. Specifically, if the password before the guess was x , and you guess a different number y , then the system changes the password to a number z such that x oplus_{k} z=y . Guess the password and break into the system. The first line of input contains a single integer t ( 1 <= q t <= q 10 ,000 ) denoting the number of test cases. t test cases follow. The first line of each test case contains two integers n ( 1 <= q n <= q 2 cdot 10^5 ) and k ( k=2 ). It is guaranteed that the sum of n o"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
121653685 |
rainboy |
D1 |
July 7, 2021, 6:25 p.m. |
OK |
GNU C11 |
TESTS |
19 |
1575 |
0 |
|
|
121664299 |
ChenHuaXin |
D1 |
July 7, 2021, 9:08 p.m. |
OK |
GNU C11 |
TESTS |
19 |
1591 |
0 |
|
|
121657082 |
rainboy |
D1 |
July 7, 2021, 6:57 p.m. |
OK |
GNU C11 |
TESTS |
19 |
1715 |
0 |
|
|
121647324 |
Mrgglock |
D1 |
July 7, 2021, 4:47 p.m. |
OK |
GNU C11 |
TESTS |
19 |
2277 |
1638400 |
|
|
121675949 |
Echoyyy |
D1 |
July 8, 2021, 3:08 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
795 |
0 |
|
|
121670198 |
xqbf |
D1 |
July 8, 2021, 12:56 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
841 |
0 |
|
|
121669375 |
Mitsukasa_Ayase |
D1 |
July 8, 2021, 12:24 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
857 |
0 |
|
|
121670340 |
changle_cyx |
D1 |
July 8, 2021, 1:01 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
873 |
0 |
|
|
121670506 |
99_wood |
D1 |
July 8, 2021, 1:05 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
873 |
0 |
|
|
121673353 |
grass8cow |
D1 |
July 8, 2021, 2:16 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
888 |
1536000 |
|
|
121672921 |
E-ray |
D1 |
July 8, 2021, 2:05 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
904 |
0 |
|
|
121677183 |
do_while_true |
D1 |
July 8, 2021, 3:30 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
904 |
0 |
|
|
121670230 |
louhao088088 |
D1 |
July 8, 2021, 12:57 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
919 |
0 |
|
|
121678563 |
MayFlyyh |
D1 |
July 8, 2021, 3:54 a.m. |
OK |
GNU C++11 |
TESTS |
19 |
919 |
0 |
|
|
121671583 |
Satwik_Mishra1 |
D1 |
July 8, 2021, 1:34 a.m. |
OK |
GNU C++14 |
TESTS |
19 |
1387 |
0 |
|
|
121661591 |
avg_cf_user |
D1 |
July 7, 2021, 8:09 p.m. |
OK |
GNU C++14 |
TESTS |
19 |
1388 |
0 |
|
|
121671036 |
heyongxin233 |
D1 |
July 8, 2021, 1:20 a.m. |
OK |
GNU C++14 |
TESTS |
19 |
1404 |
0 |
|
|
121661647 |
dumb_dot |
D1 |
July 7, 2021, 8:10 p.m. |
OK |
GNU C++14 |
TESTS |
19 |
1419 |
0 |
|
|
121687096 |
No_Struggle_No_Progress |
D1 |
July 8, 2021, 5:55 a.m. |
OK |
GNU C++14 |
TESTS |
19 |
1419 |
0 |
|
|
121658108 |
rahul_shrestha |
D1 |
July 7, 2021, 7:10 p.m. |
OK |
GNU C++14 |
TESTS |
19 |
1419 |
3174400 |
|
|
121656037 |
gopikrishna01012001 |
D1 |
July 7, 2021, 6:46 p.m. |
OK |
GNU C++14 |
TESTS |
19 |
1434 |
0 |
|
|
121654555 |
chaitanyahardikar |
D1 |
July 7, 2021, 6:32 p.m. |
OK |
GNU C++14 |
TESTS |
19 |
1434 |
0 |
|
|
121652883 |
ashu_3916 |
D1 |
July 7, 2021, 6:19 p.m. |
OK |
GNU C++14 |
TESTS |
19 |
1434 |
0 |
|
|
121686009 |
Svapnil007 |
D1 |
July 8, 2021, 5:43 a.m. |
OK |
GNU C++14 |
TESTS |
19 |
1450 |
0 |
|
|
121644273 |
tharun_1241 |
D1 |
July 7, 2021, 4:41 p.m. |
OK |
GNU C++17 |
TESTS |
19 |
1356 |
1024000 |
|
|
121641200 |
AbhiNavBajaj |
D1 |
July 7, 2021, 4:33 p.m. |
OK |
GNU C++17 |
TESTS |
19 |
1356 |
3174400 |
|
|
121653527 |
SourabhYelluru |
D1 |
July 7, 2021, 6:24 p.m. |
OK |
GNU C++17 |
TESTS |
19 |
1372 |
0 |
|
|
121647866 |
cometplaytetris |
D1 |
July 7, 2021, 4:48 p.m. |
OK |
GNU C++17 |
TESTS |
19 |
1372 |
0 |
|
|
121677001 |
astelthottankara |
D1 |
July 8, 2021, 3:27 a.m. |
OK |
GNU C++17 |
TESTS |
19 |
1403 |
0 |
|
|
121652247 |
NogiNonoka |
D1 |
July 7, 2021, 6:17 p.m. |
OK |
GNU C++17 |
TESTS |
19 |
1403 |
0 |
|
|
121679381 |
GA_urav |
D1 |
July 8, 2021, 4:08 a.m. |
OK |
GNU C++17 |
TESTS |
19 |
1403 |
0 |
|
|
121648415 |
Encounter_qty |
D1 |
July 7, 2021, 4:49 p.m. |
OK |
GNU C++17 |
TESTS |
19 |
1403 |
2150400 |
|
|
121678572 |
rachavinay545 |
D1 |
July 8, 2021, 3:54 a.m. |
OK |
GNU C++17 |
TESTS |
19 |
1418 |
0 |
|
|
121685786 |
priyank_24 |
D1 |
July 8, 2021, 5:41 a.m. |
OK |
GNU C++17 |
TESTS |
19 |
1419 |
0 |
|
|
121676878 |
AfLZK |
D1 |
July 8, 2021, 3:24 a.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1278 |
0 |
|
|
121671352 |
cheissmart |
D1 |
July 8, 2021, 1:28 a.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1279 |
0 |
|
|
121660150 |
sharath101 |
D1 |
July 7, 2021, 7:43 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1279 |
0 |
|
|
121653164 |
empathy117 |
D1 |
July 7, 2021, 6:21 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1294 |
0 |
|
|
121645066 |
Chocola4ever |
D1 |
July 7, 2021, 4:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1294 |
5120000 |
|
|
121657956 |
pd_codes |
D1 |
July 7, 2021, 7:08 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1310 |
0 |
|
|
121652425 |
__fxtaco |
D1 |
July 7, 2021, 6:17 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1325 |
0 |
|
|
121679326 |
aryan57 |
D1 |
July 8, 2021, 4:07 a.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1325 |
0 |
|
|
121653185 |
Ayham_Dabah |
D1 |
July 7, 2021, 6:21 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1325 |
1638400 |
|
|
121667745 |
qscfthmko147 |
D1 |
July 7, 2021, 11:12 p.m. |
OK |
GNU C++17 (64) |
TESTS |
19 |
1325 |
4198400 |
|
|
121642339 |
pohzipohzi |
D1 |
July 7, 2021, 4:36 p.m. |
OK |
Go |
TESTS |
19 |
1808 |
0 |
|
|
121661732 |
meooow |
D1 |
July 7, 2021, 8:12 p.m. |
OK |
Haskell |
TESTS |
19 |
4960 |
204800 |
|
|
121662008 |
meooow |
D1 |
July 7, 2021, 8:17 p.m. |
OK |
Haskell |
TESTS |
19 |
4975 |
204800 |
|
|
121663206 |
himanshu_0624 |
D1 |
July 7, 2021, 8:42 p.m. |
OK |
Java 11 |
TESTS |
19 |
3774 |
0 |
|
|
121665142 |
prituladima |
D1 |
July 7, 2021, 9:35 p.m. |
OK |
Java 11 |
TESTS |
19 |
3790 |
0 |
|
|
121662986 |
himanshu_0624 |
D1 |
July 7, 2021, 8:37 p.m. |
OK |
Java 11 |
TESTS |
19 |
3992 |
0 |
|
|
121655311 |
amit_chas |
D1 |
July 7, 2021, 6:39 p.m. |
OK |
Java 11 |
TESTS |
19 |
4212 |
0 |
|
|
121682292 |
Swapniltri |
D1 |
July 8, 2021, 4:56 a.m. |
OK |
Java 11 |
TESTS |
19 |
4227 |
0 |
|
|
121683275 |
Swapniltri |
D1 |
July 8, 2021, 5:10 a.m. |
OK |
Java 11 |
TESTS |
19 |
4508 |
0 |
|
|
121653181 |
augurar |
D1 |
July 7, 2021, 6:21 p.m. |
OK |
Java 8 |
TESTS |
19 |
2105 |
0 |
|
|
121665170 |
prituladima |
D1 |
July 7, 2021, 9:36 p.m. |
OK |
Java 8 |
TESTS |
19 |
3681 |
0 |
|
|
121661227 |
Lior |
D1 |
July 7, 2021, 8:02 p.m. |
OK |
Java 8 |
TESTS |
19 |
3790 |
0 |
|
|
121659622 |
FlameFire |
D1 |
July 7, 2021, 7:33 p.m. |
OK |
Java 8 |
TESTS |
19 |
3852 |
0 |
|
|
121659961 |
FlameFire |
D1 |
July 7, 2021, 7:39 p.m. |
OK |
Java 8 |
TESTS |
19 |
3884 |
0 |
|
|
121668721 |
pdk.abhishek |
D1 |
July 7, 2021, 11:57 p.m. |
OK |
Java 8 |
TESTS |
19 |
4040 |
0 |
|
|
121659173 |
FlameFire |
D1 |
July 7, 2021, 7:25 p.m. |
OK |
Java 8 |
TESTS |
19 |
4040 |
0 |
|
|
121663894 |
kkkkush |
D1 |
July 7, 2021, 8:58 p.m. |
OK |
Java 8 |
TESTS |
19 |
4040 |
0 |
|
|
121683469 |
mike1729 |
D1 |
July 8, 2021, 5:12 a.m. |
OK |
Java 8 |
TESTS |
19 |
4040 |
0 |
|
|
121683600 |
mike1729 |
D1 |
July 8, 2021, 5:14 a.m. |
OK |
Java 8 |
TESTS |
19 |
4133 |
0 |
|
|
121669913 |
koboshi |
D1 |
July 8, 2021, 12:46 a.m. |
OK |
Kotlin |
TESTS |
19 |
1856 |
204800 |
|
|
121657713 |
Hakiobo |
D1 |
July 7, 2021, 7:05 p.m. |
OK |
Kotlin |
TESTS |
19 |
2293 |
204800 |
|
|
121657950 |
Hakiobo |
D1 |
July 7, 2021, 7:08 p.m. |
OK |
Kotlin |
TESTS |
19 |
2339 |
204800 |
|
|
121663751 |
dandoh |
D1 |
July 7, 2021, 8:54 p.m. |
OK |
Kotlin |
TESTS |
19 |
2433 |
102400 |
|
|
121659913 |
lightseba |
D1 |
July 7, 2021, 7:38 p.m. |
OK |
Kotlin |
TESTS |
19 |
2448 |
204800 |
|
|
121647570 |
matvey22122 |
D1 |
July 7, 2021, 4:47 p.m. |
OK |
MS C++ 2017 |
TESTS |
19 |
1996 |
0 |
|
|
121653024 |
Tangerine |
D1 |
July 7, 2021, 6:20 p.m. |
OK |
MS C++ 2017 |
TESTS |
19 |
2043 |
0 |
|
|
121645092 |
Tsovak |
D1 |
July 7, 2021, 4:42 p.m. |
OK |
MS C++ 2017 |
TESTS |
19 |
2214 |
0 |
|
|
121644183 |
changlin.fu |
D1 |
July 7, 2021, 4:40 p.m. |
OK |
MS C++ 2017 |
TESTS |
19 |
2386 |
0 |
|
|
121656015 |
Yuki_B |
D1 |
July 7, 2021, 6:46 p.m. |
OK |
.NET Core C# |
TESTS |
19 |
2027 |
4198400 |
|
|
121667230 |
TomTales |
D1 |
July 7, 2021, 10:50 p.m. |
OK |
.NET Core C# |
TESTS |
19 |
3588 |
4300800 |
|
|
121667220 |
TomTales |
D1 |
July 7, 2021, 10:50 p.m. |
OK |
.NET Core C# |
TESTS |
19 |
3790 |
4300800 |
|
|
121674835 |
c1729 |
D1 |
July 8, 2021, 2:47 a.m. |
OK |
PyPy 2 |
TESTS |
19 |
2620 |
7884800 |
|
|
121669931 |
lebron87 |
D1 |
July 8, 2021, 12:47 a.m. |
OK |
PyPy 2 |
TESTS |
19 |
2682 |
15462400 |
|
|
121667527 |
bjy |
D1 |
July 7, 2021, 11:03 p.m. |
OK |
PyPy 2 |
TESTS |
19 |
3104 |
1331200 |
|
|
121669895 |
lebron87 |
D1 |
July 8, 2021, 12:46 a.m. |
OK |
PyPy 2 |
TESTS |
19 |
4554 |
10137600 |
|
|
121669861 |
lebron87 |
D1 |
July 8, 2021, 12:45 a.m. |
OK |
PyPy 2 |
TESTS |
19 |
4835 |
10035200 |
|
|
121641688 |
kagu |
D1 |
July 7, 2021, 4:34 p.m. |
OK |
PyPy 2 |
TESTS |
19 |
4991 |
8396800 |
|
|
121680514 |
innocent_SINNER |
D1 |
July 8, 2021, 4:28 a.m. |
OK |
PyPy 3 |
TESTS |
19 |
3899 |
11059200 |
|
|
121653682 |
pk31299 |
D1 |
July 7, 2021, 6:25 p.m. |
OK |
PyPy 3 |
TESTS |
19 |
4071 |
9420800 |
|
|
121673866 |
dufresne_1949 |
D1 |
July 8, 2021, 2:26 a.m. |
OK |
PyPy 3 |
TESTS |
19 |
4102 |
9420800 |
|
|
121669948 |
lebron87 |
D1 |
July 8, 2021, 12:47 a.m. |
OK |
PyPy 3 |
TESTS |
19 |
4118 |
16076800 |
|
|
121661263 |
vermakunal088 |
D1 |
July 7, 2021, 8:03 p.m. |
OK |
PyPy 3 |
TESTS |
19 |
4149 |
9216000 |
|
|
121676942 |
Nemisis2.O |
D1 |
July 8, 2021, 3:26 a.m. |
OK |
PyPy 3 |
TESTS |
19 |
4180 |
9420800 |
|
|
121666613 |
plevande |
D1 |
July 7, 2021, 10:26 p.m. |
OK |
PyPy 3 |
TESTS |
19 |
4305 |
5120000 |
|
|
121652459 |
not_tehlka |
D1 |
July 7, 2021, 6:17 p.m. |
OK |
PyPy 3 |
TESTS |
19 |
4320 |
9420800 |
|
|
121669985 |
lebron87 |
D1 |
July 8, 2021, 12:48 a.m. |
OK |
PyPy 3 |
TESTS |
19 |
4445 |
16281600 |
|
|
121666852 |
nostar |
D1 |
July 7, 2021, 10:36 p.m. |
OK |
PyPy 3 |
TESTS |
19 |
4461 |
4198400 |
|
|
121667742 |
EpicChadGamer |
D1 |
July 7, 2021, 11:12 p.m. |
OK |
Python 3 |
TESTS |
19 |
4367 |
0 |
|
|
121660053 |
_aadiupadhyay_ |
D1 |
July 7, 2021, 7:41 p.m. |
OK |
Python 3 |
TESTS |
19 |
4524 |
307200 |
|
|
121647311 |
ramzz |
D1 |
July 7, 2021, 4:47 p.m. |
OK |
Python 3 |
TESTS |
19 |
4539 |
2252800 |
|
|
121672237 |
VioletVal |
D1 |
July 8, 2021, 1:49 a.m. |
OK |
Python 3 |
TESTS |
19 |
4585 |
0 |
|
|
121654177 |
KeiTsukishima |
D1 |
July 7, 2021, 6:30 p.m. |
OK |
Python 3 |
TESTS |
19 |
4586 |
409600 |
|
|
121652964 |
llllllll |
D1 |
July 7, 2021, 6:20 p.m. |
OK |
Python 3 |
TESTS |
19 |
4601 |
1024000 |
|
|
121669844 |
Klaycf |
D1 |
July 8, 2021, 12:44 a.m. |
OK |
Python 3 |
TESTS |
19 |
4617 |
0 |
|
|
121653831 |
jainmilind |
D1 |
July 7, 2021, 6:27 p.m. |
OK |
Python 3 |
TESTS |
19 |
4617 |
204800 |
|
|
121686536 |
BUCT-English2001-YZH |
D1 |
July 8, 2021, 5:49 a.m. |
OK |
Python 3 |
TESTS |
19 |
4632 |
204800 |
|
|
121664257 |
mayankmittal9269 |
D1 |
July 7, 2021, 9:07 p.m. |
OK |
Python 3 |
TESTS |
19 |
4632 |
204800 |
|
|
121641272 |
bqn |
D1 |
July 7, 2021, 4:33 p.m. |
OK |
Rust |
TESTS |
19 |
3197 |
0 |
|
|
remove filters
Back to search problems