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 are given an integer n . Find a sequence of n integers a_1, a_2, ... , a_n such that 1 <= q a_i <= q 10^9 for all i and a_1 oplus a_2 oplus ... oplus a_n = frac{a_1 + a_2 + ... + a_n}{n}, where oplus represents the bitwise XOR. It can be proven that there exists a sequence of integers that satisfies all the conditions above. The first line of input contains t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first and only line of each test case contains one integer n ( 1 <= q n <= q 10^5 ) -- the length of the sequence you have to find. The sum of n over all test cases does not exceed 10^5 . For each test case, output n space-separated integers a_1, a_2, ... , a_n satisfying the conditions in the statement. If there are several possible answers, you can output any of them. In the first test case, 69 = frac{69}{1} = 69 . In the second test case, 13 oplus 2 oplus 8 oplus 1 = frac{13 + 2 + 8 + 1}{4} = 6 . '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
182582203 |
chrisfcoder |
B |
Nov. 26, 2022, 2:13 a.m. |
OK |
C# 10 |
TESTS |
9 |
61 |
1638400 |
|
|
182532258 |
absa1am |
B |
Nov. 25, 2022, 5:12 p.m. |
OK |
C# 10 |
TESTS |
9 |
327 |
2867200 |
|
|
182546931 |
WAAAAAAAAAAAAAAAAAAAAA |
B |
Nov. 25, 2022, 6:12 p.m. |
OK |
C# 10 |
TESTS |
9 |
342 |
0 |
|
|
182545972 |
Antroz |
B |
Nov. 25, 2022, 6:08 p.m. |
OK |
C# 10 |
TESTS |
9 |
342 |
4096000 |
|
|
182579725 |
bluemegane |
B |
Nov. 26, 2022, 1:16 a.m. |
OK |
C# 8 |
TESTS |
9 |
108 |
1536000 |
|
|
182577638 |
big--head |
B |
Nov. 26, 2022, 12:06 a.m. |
OK |
Clang++17 Diagnostics |
TESTS |
9 |
124 |
0 |
|
|
182549428 |
anogroup |
B |
Nov. 25, 2022, 6:24 p.m. |
OK |
Clang++20 Diagnostics |
TESTS |
9 |
62 |
0 |
|
|
182563714 |
pradeepc |
B |
Nov. 25, 2022, 8:03 p.m. |
OK |
GNU C11 |
TESTS |
9 |
374 |
0 |
|
|
182598023 |
Jahidul_CSE |
B |
Nov. 26, 2022, 5:53 a.m. |
OK |
GNU C11 |
TESTS |
9 |
374 |
819200 |
|
|
182566666 |
shawon265 |
B |
Nov. 25, 2022, 8:34 p.m. |
OK |
GNU C11 |
TESTS |
9 |
390 |
0 |
|
|
182540046 |
SAFIN07 |
B |
Nov. 25, 2022, 5:31 p.m. |
OK |
GNU C11 |
TESTS |
9 |
390 |
0 |
|
|
182545543 |
nestor_makhno |
B |
Nov. 25, 2022, 6:06 p.m. |
OK |
GNU C11 |
TESTS |
9 |
390 |
0 |
|
|
182554393 |
SP2003 |
B |
Nov. 25, 2022, 6:52 p.m. |
OK |
GNU C11 |
TESTS |
9 |
405 |
0 |
|
|
182565591 |
shawon265 |
B |
Nov. 25, 2022, 8:22 p.m. |
OK |
GNU C11 |
TESTS |
9 |
405 |
0 |
|
|
182532098 |
LN697 |
B |
Nov. 25, 2022, 5:12 p.m. |
OK |
GNU C11 |
TESTS |
9 |
436 |
0 |
|
|
182535562 |
Siddhant_254 |
B |
Nov. 25, 2022, 5:20 p.m. |
OK |
GNU C11 |
TESTS |
9 |
436 |
0 |
|
|
182540625 |
Md._Asif_Samrat |
B |
Nov. 25, 2022, 5:32 p.m. |
OK |
GNU C11 |
TESTS |
9 |
452 |
0 |
|
|
182589912 |
SakshiBhavsar |
B |
Nov. 26, 2022, 4:25 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182587908 |
codeforceszxr |
B |
Nov. 26, 2022, 3:59 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182587071 |
lwq132lwq |
B |
Nov. 26, 2022, 3:45 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182586617 |
...pluto |
B |
Nov. 26, 2022, 3:37 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182585428 |
shashank_11 |
B |
Nov. 26, 2022, 3:16 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182584702 |
Aurora- |
B |
Nov. 26, 2022, 3:03 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182584271 |
Cycyes |
B |
Nov. 26, 2022, 2:54 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182580989 |
include_BM |
B |
Nov. 26, 2022, 1:45 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182597879 |
tul_is_best_frnd |
B |
Nov. 26, 2022, 5:52 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182595900 |
Lxyu |
B |
Nov. 26, 2022, 5:32 a.m. |
OK |
GNU C++14 |
TESTS |
9 |
15 |
0 |
|
|
182540559 |
Atri_My_Dear_Moments |
B |
Nov. 25, 2022, 5:32 p.m. |
OK |
GNU C++17 |
TESTS |
9 |
0 |
0 |
|
|
182594536 |
c213104 |
B |
Nov. 26, 2022, 5:18 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182594937 |
Mosam219 |
B |
Nov. 26, 2022, 5:22 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182596570 |
Divyansh_0811 |
B |
Nov. 26, 2022, 5:39 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182596695 |
Cyber |
B |
Nov. 26, 2022, 5:40 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182597402 |
ToW_hiD |
B |
Nov. 26, 2022, 5:47 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182597498 |
suyog_73 |
B |
Nov. 26, 2022, 5:48 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182593715 |
Shark_Eater |
B |
Nov. 26, 2022, 5:09 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182594004 |
optsolution |
B |
Nov. 26, 2022, 5:12 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182592933 |
iwsi |
B |
Nov. 26, 2022, 5:01 a.m. |
OK |
GNU C++17 |
TESTS |
9 |
15 |
0 |
|
|
182596448 |
shock_wav3 |
B |
Nov. 26, 2022, 5:38 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182598681 |
meki |
B |
Nov. 26, 2022, 5:59 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182597046 |
Caraxes |
B |
Nov. 26, 2022, 5:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182596864 |
WA_automata |
B |
Nov. 26, 2022, 5:42 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182596104 |
jtf_shine |
B |
Nov. 26, 2022, 5:34 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182589740 |
cwxcai |
B |
Nov. 26, 2022, 4:23 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182587848 |
donald_duck123 |
B |
Nov. 26, 2022, 3:58 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182587230 |
pursuit_of_happiness |
B |
Nov. 26, 2022, 3:48 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182584298 |
hhh3 |
B |
Nov. 26, 2022, 2:55 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182583647 |
Ac_love_QWQ |
B |
Nov. 26, 2022, 2:41 a.m. |
OK |
GNU C++17 (64) |
TESTS |
9 |
15 |
0 |
|
|
182548829 |
AbubiBoba |
B |
Nov. 25, 2022, 6:21 p.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
0 |
0 |
|
|
182555787 |
pakhandi98 |
B |
Nov. 25, 2022, 7:01 p.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
0 |
0 |
|
|
182556738 |
ScorpioDagger |
B |
Nov. 25, 2022, 7:07 p.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
0 |
0 |
|
|
182565017 |
harryosborn |
B |
Nov. 25, 2022, 8:16 p.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
0 |
0 |
|
|
182547390 |
Eskler |
B |
Nov. 25, 2022, 6:14 p.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
0 |
0 |
|
|
182593910 |
FGN06 |
B |
Nov. 26, 2022, 5:11 a.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
0 |
7987200 |
|
|
182598006 |
litachloveyou |
B |
Nov. 26, 2022, 5:53 a.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
15 |
0 |
|
|
182598033 |
Saytara |
B |
Nov. 26, 2022, 5:53 a.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
15 |
0 |
|
|
182598712 |
TangM |
B |
Nov. 26, 2022, 6 a.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
15 |
0 |
|
|
182598781 |
fishcathu. |
B |
Nov. 26, 2022, 6 a.m. |
OK |
GNU C++20 (64) |
TESTS |
9 |
15 |
0 |
|
|
182534276 |
shiro |
B |
Nov. 25, 2022, 5:17 p.m. |
OK |
Go |
TESTS |
9 |
46 |
819200 |
|
|
182578994 |
tongtongac |
B |
Nov. 26, 2022, 12:55 a.m. |
OK |
Go |
TESTS |
9 |
280 |
0 |
|
|
182595309 |
__Serendipity |
B |
Nov. 26, 2022, 5:26 a.m. |
OK |
Java 11 |
TESTS |
9 |
170 |
0 |
|
|
182549213 |
Ste |
B |
Nov. 25, 2022, 6:23 p.m. |
OK |
Java 11 |
TESTS |
9 |
171 |
0 |
|
|
182590224 |
deepaksach |
B |
Nov. 26, 2022, 4:29 a.m. |
OK |
Java 11 |
TESTS |
9 |
171 |
0 |
|
|
182587647 |
daftdove |
B |
Nov. 26, 2022, 3:54 a.m. |
OK |
Java 11 |
TESTS |
9 |
171 |
0 |
|
|
182578757 |
krishnakarrupansivan |
B |
Nov. 26, 2022, 12:46 a.m. |
OK |
Java 11 |
TESTS |
9 |
171 |
0 |
|
|
182592301 |
Melsonic |
B |
Nov. 26, 2022, 4:54 a.m. |
OK |
Java 11 |
TESTS |
9 |
187 |
0 |
|
|
182551371 |
fishy15 |
B |
Nov. 25, 2022, 6:34 p.m. |
OK |
Java 11 |
TESTS |
9 |
187 |
0 |
|
|
182534831 |
isose |
B |
Nov. 25, 2022, 5:19 p.m. |
OK |
Java 11 |
TESTS |
9 |
202 |
0 |
|
|
182579155 |
mcrash12 |
B |
Nov. 26, 2022, 1 a.m. |
OK |
Java 11 |
TESTS |
9 |
217 |
0 |
|
|
182594607 |
enuguru_2002 |
B |
Nov. 26, 2022, 5:18 a.m. |
OK |
Java 11 |
TESTS |
9 |
218 |
5836800 |
|
|
182564673 |
daemon404 |
B |
Nov. 25, 2022, 8:13 p.m. |
OK |
Java 17 |
TESTS |
9 |
171 |
8294400 |
|
|
182595301 |
irachit0702 |
B |
Nov. 26, 2022, 5:26 a.m. |
OK |
Java 17 |
TESTS |
9 |
186 |
307200 |
|
|
182590509 |
tbs-jyy |
B |
Nov. 26, 2022, 4:32 a.m. |
OK |
Java 17 |
TESTS |
9 |
217 |
409600 |
|
|
182547807 |
microsoft1212 |
B |
Nov. 25, 2022, 6:16 p.m. |
OK |
Java 17 |
TESTS |
9 |
233 |
0 |
|
|
182549378 |
AdityaGupta19 |
B |
Nov. 25, 2022, 6:24 p.m. |
OK |
Java 17 |
TESTS |
9 |
233 |
204800 |
|
|
182588019 |
Thejas_n |
B |
Nov. 26, 2022, 4:01 a.m. |
OK |
Java 17 |
TESTS |
9 |
233 |
409600 |
|
|
182579616 |
Abhinavrajhans |
B |
Nov. 26, 2022, 1:13 a.m. |
OK |
Java 17 |
TESTS |
9 |
233 |
716800 |
|
|
182541025 |
dchang0524 |
B |
Nov. 25, 2022, 5:33 p.m. |
OK |
Java 17 |
TESTS |
9 |
249 |
102400 |
|
|
182565005 |
abhayptsr |
B |
Nov. 25, 2022, 8:16 p.m. |
OK |
Java 17 |
TESTS |
9 |
249 |
204800 |
|
|
182550357 |
Eslam_Ahmed |
B |
Nov. 25, 2022, 6:29 p.m. |
OK |
Java 17 |
TESTS |
9 |
280 |
614400 |
|
|
182589514 |
swarup_312 |
B |
Nov. 26, 2022, 4:20 a.m. |
OK |
Java 8 |
TESTS |
9 |
92 |
0 |
|
|
182573804 |
mohamedhassan_c |
B |
Nov. 25, 2022, 10:29 p.m. |
OK |
Java 8 |
TESTS |
9 |
108 |
0 |
|
|
182549884 |
Rayhan_ChowdhuRy |
B |
Nov. 25, 2022, 6:26 p.m. |
OK |
Java 8 |
TESTS |
9 |
109 |
0 |
|
|
182550113 |
Rayhan_07 |
B |
Nov. 25, 2022, 6:27 p.m. |
OK |
Java 8 |
TESTS |
9 |
109 |
0 |
|
|
182536140 |
gagan_6730 |
B |
Nov. 25, 2022, 5:22 p.m. |
OK |
Java 8 |
TESTS |
9 |
109 |
0 |
|
|
182532396 |
gaju321 |
B |
Nov. 25, 2022, 5:12 p.m. |
OK |
Java 8 |
TESTS |
9 |
109 |
0 |
|
|
182563838 |
Mohamed308 |
B |
Nov. 25, 2022, 8:04 p.m. |
OK |
Java 8 |
TESTS |
9 |
124 |
0 |
|
|
182564608 |
amgi_001 |
B |
Nov. 25, 2022, 8:12 p.m. |
OK |
Java 8 |
TESTS |
9 |
124 |
0 |
|
|
182549424 |
Juhaied_nabid |
B |
Nov. 25, 2022, 6:24 p.m. |
OK |
Java 8 |
TESTS |
9 |
124 |
0 |
|
|
182572820 |
ItsZaki |
B |
Nov. 25, 2022, 10:05 p.m. |
OK |
Java 8 |
TESTS |
9 |
140 |
0 |
|
|
182589466 |
aRaha_0_0 |
B |
Nov. 26, 2022, 4:20 a.m. |
OK |
Mono C# |
TESTS |
9 |
296 |
102400 |
|
|
182582038 |
njnuqy |
B |
Nov. 26, 2022, 2:09 a.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
15 |
0 |
|
|
182533159 |
agniv123 |
B |
Nov. 25, 2022, 5:14 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
61 |
0 |
|
|
182537253 |
whiteReboot |
B |
Nov. 25, 2022, 5:25 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
62 |
0 |
|
|
182578116 |
juruowtcl |
B |
Nov. 26, 2022, 12:24 a.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
62 |
0 |
|
|
182569229 |
rusha465 |
B |
Nov. 25, 2022, 9:05 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
62 |
0 |
|
|
182545475 |
Eldies |
B |
Nov. 25, 2022, 6:06 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
62 |
0 |
|
|
182541187 |
koynov |
B |
Nov. 25, 2022, 5:33 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
62 |
0 |
|
|
182533883 |
belief_010 |
B |
Nov. 25, 2022, 5:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
77 |
0 |
|
|
182538348 |
ronak9910 |
B |
Nov. 25, 2022, 5:27 p.m. |
OK |
MS C++ 2017 |
TESTS |
9 |
77 |
0 |
|
|
182570110 |
WalrusRamen21 |
B |
Nov. 25, 2022, 9:18 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
124 |
5324800 |
|
|
182561164 |
Justin_Foley |
B |
Nov. 25, 2022, 7:41 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
186 |
9932800 |
|
|
182574868 |
hxu10 |
B |
Nov. 25, 2022, 10:55 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
218 |
10035200 |
|
|
182555335 |
jaytau |
B |
Nov. 25, 2022, 6:58 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
265 |
9011200 |
|
|
182587790 |
Ench_Lolz |
B |
Nov. 26, 2022, 3:57 a.m. |
OK |
PyPy 3 |
TESTS |
9 |
280 |
7475200 |
|
|
182551107 |
manish.17 |
B |
Nov. 25, 2022, 6:33 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
343 |
9830400 |
|
|
182561450 |
Homeo |
B |
Nov. 25, 2022, 7:43 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
358 |
9830400 |
|
|
182571865 |
uz2ee |
B |
Nov. 25, 2022, 9:47 p.m. |
OK |
PyPy 3 |
TESTS |
9 |
576 |
8908800 |
|
|
182598578 |
_tb |
B |
Nov. 26, 2022, 5:58 a.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
61 |
7475200 |
|
|
182549845 |
hkwu6013 |
B |
Nov. 25, 2022, 6:26 p.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
77 |
6041600 |
|
|
182577818 |
8by8 |
B |
Nov. 26, 2022, 12:12 a.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
93 |
7270400 |
|
|
182549715 |
Nabeel_Ismaeel |
B |
Nov. 25, 2022, 6:25 p.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
108 |
9318400 |
|
|
182553900 |
SangeetaSingh |
B |
Nov. 25, 2022, 6:49 p.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
108 |
9932800 |
|
|
182596783 |
generalPurpose |
B |
Nov. 26, 2022, 5:41 a.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
108 |
10137600 |
|
|
182553997 |
SangeetaSingh |
B |
Nov. 25, 2022, 6:49 p.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
124 |
9932800 |
|
|
182581402 |
cppygod |
B |
Nov. 26, 2022, 1:54 a.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
124 |
10035200 |
|
|
182547010 |
pizet |
B |
Nov. 25, 2022, 6:12 p.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
139 |
10342400 |
|
|
182576510 |
crapcode |
B |
Nov. 25, 2022, 11:23 p.m. |
OK |
PyPy 3-64 |
TESTS |
9 |
140 |
9625600 |
|
|
182586107 |
LanYan |
B |
Nov. 26, 2022, 3:29 a.m. |
OK |
Python 3 |
TESTS |
9 |
46 |
102400 |
|
|
182580128 |
DLDM |
B |
Nov. 26, 2022, 1:25 a.m. |
OK |
Python 3 |
TESTS |
9 |
46 |
921600 |
|
|
182580961 |
abdullah_sharif |
B |
Nov. 26, 2022, 1:44 a.m. |
OK |
Python 3 |
TESTS |
9 |
62 |
204800 |
|
|
182585687 |
LanYan |
B |
Nov. 26, 2022, 3:21 a.m. |
OK |
Python 3 |
TESTS |
9 |
62 |
409600 |
|
|
182538833 |
Garrulous |
B |
Nov. 25, 2022, 5:28 p.m. |
OK |
Python 3 |
TESTS |
9 |
62 |
1228800 |
|
|
182596781 |
Pawan_Lahoti |
B |
Nov. 26, 2022, 5:41 a.m. |
OK |
Python 3 |
TESTS |
9 |
92 |
102400 |
|
|
182539341 |
SMAM-MAHDI |
B |
Nov. 25, 2022, 5:30 p.m. |
OK |
Python 3 |
TESTS |
9 |
92 |
102400 |
|
|
182582700 |
Mahad_SundarSTEM |
B |
Nov. 26, 2022, 2:23 a.m. |
OK |
Python 3 |
TESTS |
9 |
93 |
102400 |
|
|
182555186 |
deyanuz |
B |
Nov. 25, 2022, 6:57 p.m. |
OK |
Python 3 |
TESTS |
9 |
93 |
102400 |
|
|
182536596 |
nayanawasthi973 |
B |
Nov. 25, 2022, 5:23 p.m. |
OK |
Python 3 |
TESTS |
9 |
93 |
307200 |
|
|
remove filters
Back to search problems