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 array [a_1, a_2, ... , a_n] such that 1 <= a_i <= 10^9 . Let S be the sum of all elements of the array a . Let's call an array b of n integers beautiful if: Your task is to find any beautiful array. It can be shown that at least one beautiful array always exists. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Each test case consists of two lines. The first line contains one integer n ( 2 <= n <= 50 ). The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ). For each test case, print the beautiful array b_1, b_2, ... , b_n ( 1 <= b_i <= 10^9 ) on a separate line. It can be shown that at least one beautiful array exists under these circumstances. If there are multiple answers, print any of them. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
101580643 |
ruban |
B |
Dec. 17, 2020, 4:47 p.m. |
OK |
Delphi |
TESTS |
4 |
31 |
8806400 |
|
|
101599181 |
eugalt |
B |
Dec. 17, 2020, 11:43 p.m. |
OK |
GNU C11 |
TESTS |
18 |
46 |
0 |
|
|
101576675 |
1435730 |
B |
Dec. 17, 2020, 4:31 p.m. |
OK |
GNU C11 |
TESTS |
4 |
108 |
0 |
|
|
101579724 |
1435730 |
B |
Dec. 17, 2020, 4:41 p.m. |
OK |
GNU C11 |
TESTS |
4 |
109 |
0 |
|
|
101581000 |
topol |
B |
Dec. 17, 2020, 4:50 p.m. |
OK |
GNU C11 |
TESTS |
4 |
109 |
0 |
|
|
101582015 |
alcesmire |
B |
Dec. 17, 2020, 4:58 p.m. |
OK |
GNU C11 |
TESTS |
4 |
109 |
307200 |
|
|
101576135 |
HinanawiTenshi |
B |
Dec. 17, 2020, 4:30 p.m. |
OK |
GNU C++11 |
TESTS |
4 |
31 |
0 |
|
|
101602842 |
dutouyvluori |
B |
Dec. 18, 2020, 2:40 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
31 |
0 |
|
|
101602465 |
XueYJ |
B |
Dec. 18, 2020, 2:26 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
31 |
0 |
|
|
101601046 |
yicongli |
B |
Dec. 18, 2020, 1:22 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
31 |
0 |
|
|
101584250 |
ingyu1008 |
B |
Dec. 17, 2020, 5:23 p.m. |
OK |
GNU C++11 |
TESTS |
4 |
31 |
0 |
|
|
101583821 |
seeker_26 |
B |
Dec. 17, 2020, 5:18 p.m. |
OK |
GNU C++11 |
TESTS |
4 |
31 |
0 |
|
|
101579836 |
Dreamfarer |
B |
Dec. 17, 2020, 4:42 p.m. |
OK |
GNU C++11 |
TESTS |
4 |
31 |
0 |
|
|
101611406 |
yanwu |
B |
Dec. 18, 2020, 5:57 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
31 |
0 |
|
|
101604402 |
Mangata |
B |
Dec. 18, 2020, 3:27 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
31 |
0 |
|
|
101604105 |
wjmsxbd |
B |
Dec. 18, 2020, 3:20 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
31 |
0 |
|
|
101570060 |
huzhiyu |
B |
Dec. 17, 2020, 4:14 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
101585677 |
rafle |
B |
Dec. 17, 2020, 5:43 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
101585050 |
vibhorchatwani |
B |
Dec. 17, 2020, 5:34 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
101579821 |
vaibh.garg.3010 |
B |
Dec. 17, 2020, 4:42 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
101579659 |
harsh.singh1411 |
B |
Dec. 17, 2020, 4:41 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
101575192 |
the_traveler_ |
B |
Dec. 17, 2020, 4:28 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
0 |
|
|
101578948 |
Ashish.02 |
B |
Dec. 17, 2020, 4:37 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
102400 |
|
|
101583196 |
Boom_Baam |
B |
Dec. 17, 2020, 5:10 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
204800 |
|
|
101585114 |
temprer |
B |
Dec. 17, 2020, 5:35 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
15 |
204800 |
|
|
101590731 |
rahul_221007 |
B |
Dec. 17, 2020, 7:07 p.m. |
OK |
GNU C++14 |
TESTS |
4 |
30 |
0 |
|
|
101588182 |
vik_nash |
B |
Dec. 17, 2020, 6:21 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
15 |
0 |
|
|
101583500 |
IN_nik |
B |
Dec. 17, 2020, 5:14 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
15 |
0 |
|
|
101582133 |
prakharTLEGOD |
B |
Dec. 17, 2020, 4:59 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
15 |
204800 |
|
|
101590366 |
eggag32 |
B |
Dec. 17, 2020, 7 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
15 |
204800 |
|
|
101582004 |
sainad |
B |
Dec. 17, 2020, 4:58 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
15 |
204800 |
|
|
101589497 |
alankritanand001 |
B |
Dec. 17, 2020, 6:43 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
30 |
0 |
|
|
101588319 |
Karim_Symon |
B |
Dec. 17, 2020, 6:23 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
30 |
0 |
|
|
101588099 |
codelin |
B |
Dec. 17, 2020, 6:19 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
30 |
0 |
|
|
101587153 |
Swairik |
B |
Dec. 17, 2020, 6:05 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
30 |
0 |
|
|
101586882 |
reddyvinay_123 |
B |
Dec. 17, 2020, 6:02 p.m. |
OK |
GNU C++17 |
TESTS |
4 |
30 |
0 |
|
|
101580433 |
Dahiya27 |
B |
Dec. 17, 2020, 4:45 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101579925 |
_sad_ |
B |
Dec. 17, 2020, 4:42 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101577569 |
g_one15 |
B |
Dec. 17, 2020, 4:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101580810 |
i_am_legend1 |
B |
Dec. 17, 2020, 4:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101582282 |
essi |
B |
Dec. 17, 2020, 5:01 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101585476 |
f2016941 |
B |
Dec. 17, 2020, 5:40 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101588580 |
abhishek_dubey_2025 |
B |
Dec. 17, 2020, 6:27 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101590627 |
prosky |
B |
Dec. 17, 2020, 7:06 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
0 |
|
|
101586020 |
habib_0608 |
B |
Dec. 17, 2020, 5:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
15 |
102400 |
|
|
101588207 |
Arceus03 |
B |
Dec. 17, 2020, 6:21 p.m. |
OK |
GNU C++17 (64) |
TESTS |
4 |
30 |
0 |
|
|
101581337 |
eR6 |
B |
Dec. 17, 2020, 4:52 p.m. |
OK |
Go |
TESTS |
4 |
46 |
0 |
|
|
101578609 |
bnurgeldiyev514 |
B |
Dec. 17, 2020, 4:34 p.m. |
OK |
Go |
TESTS |
4 |
124 |
0 |
|
|
101578422 |
jepbar |
B |
Dec. 17, 2020, 4:34 p.m. |
OK |
Go |
TESTS |
4 |
139 |
0 |
|
|
101592491 |
N_o_o_B |
B |
Dec. 17, 2020, 7:45 p.m. |
OK |
Haskell |
TESTS |
18 |
187 |
102400 |
|
|
101585262 |
Codeispower |
B |
Dec. 17, 2020, 5:37 p.m. |
OK |
Java 11 |
TESTS |
4 |
186 |
0 |
|
|
101587199 |
decoder_1671 |
B |
Dec. 17, 2020, 6:06 p.m. |
OK |
Java 11 |
TESTS |
4 |
187 |
10444800 |
|
|
101587991 |
DetoAce |
B |
Dec. 17, 2020, 6:17 p.m. |
OK |
Java 11 |
TESTS |
4 |
202 |
0 |
|
|
101604727 |
liubenjamin |
B |
Dec. 18, 2020, 3:36 a.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
101603053 |
liubenjamin |
B |
Dec. 18, 2020, 2:47 a.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
101597152 |
ya_ne_xoxol_ya_kiborg |
B |
Dec. 17, 2020, 9:56 p.m. |
OK |
Java 11 |
TESTS |
18 |
202 |
0 |
|
|
101577081 |
tanmaychakrabortydhn |
B |
Dec. 17, 2020, 4:32 p.m. |
OK |
Java 11 |
TESTS |
4 |
202 |
0 |
|
|
101574310 |
amit_chas |
B |
Dec. 17, 2020, 4:25 p.m. |
OK |
Java 11 |
TESTS |
4 |
202 |
0 |
|
|
101573533 |
atishay127 |
B |
Dec. 17, 2020, 4:23 p.m. |
OK |
Java 11 |
TESTS |
4 |
202 |
3072000 |
|
|
101585255 |
gssakash |
B |
Dec. 17, 2020, 5:37 p.m. |
OK |
Java 11 |
TESTS |
4 |
217 |
0 |
|
|
101594000 |
tarun_sm |
B |
Dec. 17, 2020, 8:23 p.m. |
OK |
Java 8 |
TESTS |
18 |
108 |
0 |
|
|
101580699 |
XiangLi |
B |
Dec. 17, 2020, 4:47 p.m. |
OK |
Java 8 |
TESTS |
4 |
108 |
0 |
|
|
101569933 |
subhamdtu |
B |
Dec. 17, 2020, 4:14 p.m. |
OK |
Java 8 |
TESTS |
4 |
108 |
0 |
|
|
101581146 |
_robindhankhar |
B |
Dec. 17, 2020, 4:51 p.m. |
OK |
Java 8 |
TESTS |
4 |
109 |
0 |
|
|
101572330 |
rdsaurabh97 |
B |
Dec. 17, 2020, 4:20 p.m. |
OK |
Java 8 |
TESTS |
4 |
109 |
0 |
|
|
101569627 |
Adi_786 |
B |
Dec. 17, 2020, 4:13 p.m. |
OK |
Java 8 |
TESTS |
4 |
109 |
0 |
|
|
101594154 |
ineffablekenobi |
B |
Dec. 17, 2020, 8:27 p.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
101591463 |
KoustavBeginner |
B |
Dec. 17, 2020, 7:22 p.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
|
101588426 |
Bhaskar13 |
B |
Dec. 17, 2020, 6:25 p.m. |
OK |
Java 8 |
TESTS |
4 |
124 |
0 |
|
|
101587785 |
sameeksha01 |
B |
Dec. 17, 2020, 6:14 p.m. |
OK |
Java 8 |
TESTS |
4 |
124 |
0 |
|
|
101599549 |
Spheniscine |
B |
Dec. 18, 2020, 12:04 a.m. |
OK |
Kotlin |
TESTS |
18 |
155 |
1126400 |
|
|
101576285 |
diekautz |
B |
Dec. 17, 2020, 4:30 p.m. |
OK |
Kotlin |
TESTS |
4 |
171 |
1331200 |
|
|
101586733 |
ustaritz |
B |
Dec. 17, 2020, 6 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
46 |
0 |
|
|
101584232 |
MikuSakula |
B |
Dec. 17, 2020, 5:23 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
61 |
0 |
|
|
101581109 |
201901432 |
B |
Dec. 17, 2020, 4:50 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
61 |
102400 |
|
|
101581635 |
OMgL |
B |
Dec. 17, 2020, 4:55 p.m. |
OK |
MS C++ 2017 |
TESTS |
4 |
62 |
0 |
|
|
101606423 |
jongwook123 |
B |
Dec. 18, 2020, 4:22 a.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
77 |
0 |
|
|
101597114 |
Aram_2001 |
B |
Dec. 17, 2020, 9:55 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
78 |
0 |
|
|
101595519 |
peachy |
B |
Dec. 17, 2020, 9:03 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
78 |
0 |
|
|
101595572 |
alibabaand40haramies |
B |
Dec. 17, 2020, 9:04 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
93 |
0 |
|
|
101594002 |
armand |
B |
Dec. 17, 2020, 8:23 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
93 |
0 |
|
|
101598919 |
tawfekhesham |
B |
Dec. 17, 2020, 11:29 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
108 |
0 |
|
|
101581557 |
henrychenOutlook |
B |
Dec. 17, 2020, 4:54 p.m. |
OK |
Node.js |
TESTS |
4 |
93 |
5222400 |
|
|
101597097 |
ya_ne_xoxol_ya_kiborg |
B |
Dec. 17, 2020, 9:54 p.m. |
OK |
Node.js |
TESTS |
18 |
389 |
12390400 |
|
|
101609649 |
rajbit |
B |
Dec. 18, 2020, 5:31 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
187 |
5017600 |
|
|
101581944 |
nocreative1 |
B |
Dec. 17, 2020, 4:57 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
202 |
5836800 |
|
|
101589052 |
srkvrm |
B |
Dec. 17, 2020, 6:35 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
202 |
7372800 |
|
|
101589473 |
silvertint |
B |
Dec. 17, 2020, 6:43 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
218 |
7270400 |
|
|
101589774 |
alterego_14 |
B |
Dec. 17, 2020, 6:49 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
233 |
5427200 |
|
|
101580253 |
SlRy |
B |
Dec. 17, 2020, 4:44 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
233 |
5632000 |
|
|
101595281 |
Purota |
B |
Dec. 17, 2020, 8:56 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
234 |
3481600 |
|
|
101586667 |
rishabhrathi22 |
B |
Dec. 17, 2020, 5:58 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
234 |
6451200 |
|
|
101583315 |
Anshuman2043 |
B |
Dec. 17, 2020, 5:11 p.m. |
OK |
PyPy 3 |
TESTS |
4 |
249 |
4710400 |
|
|
101611327 |
Coki628 |
B |
Dec. 18, 2020, 5:56 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
249 |
8294400 |
|
|
101587988 |
elistark |
B |
Dec. 17, 2020, 6:17 p.m. |
OK |
Python 2 |
TESTS |
4 |
202 |
102400 |
|
|
101573343 |
resita |
B |
Dec. 17, 2020, 4:23 p.m. |
OK |
Python 2 |
TESTS |
4 |
202 |
102400 |
|
|
101590365 |
rahuldevadiga |
B |
Dec. 17, 2020, 7 p.m. |
OK |
Python 3 |
TESTS |
4 |
124 |
409600 |
|
|
101590399 |
1927shivamsingh |
B |
Dec. 17, 2020, 7:01 p.m. |
OK |
Python 3 |
TESTS |
4 |
124 |
512000 |
|
|
101589051 |
GANESHTMVS |
B |
Dec. 17, 2020, 6:35 p.m. |
OK |
Python 3 |
TESTS |
4 |
139 |
307200 |
|
|
101582074 |
hmantv_83 |
B |
Dec. 17, 2020, 4:59 p.m. |
OK |
Python 3 |
TESTS |
4 |
139 |
307200 |
|
|
101581963 |
Padmasree |
B |
Dec. 17, 2020, 4:58 p.m. |
OK |
Python 3 |
TESTS |
4 |
140 |
307200 |
|
|
101583694 |
eugalt |
B |
Dec. 17, 2020, 5:16 p.m. |
OK |
Python 3 |
TESTS |
4 |
140 |
614400 |
|
|
101582538 |
Rayvivek8810 |
B |
Dec. 17, 2020, 5:03 p.m. |
OK |
Python 3 |
TESTS |
4 |
155 |
0 |
|
|
101582237 |
Ravivek080 |
B |
Dec. 17, 2020, 5 p.m. |
OK |
Python 3 |
TESTS |
4 |
155 |
0 |
|
|
101578029 |
sushmanth.dampur8780 |
B |
Dec. 17, 2020, 4:34 p.m. |
OK |
Python 3 |
TESTS |
4 |
155 |
0 |
|
|
101585878 |
arnav2004 |
B |
Dec. 17, 2020, 5:46 p.m. |
OK |
Python 3 |
TESTS |
4 |
155 |
204800 |
|
|
101582550 |
kona0001 |
B |
Dec. 17, 2020, 5:03 p.m. |
OK |
Ruby |
TESTS |
4 |
514 |
409600 |
|
|
101596885 |
ya_ne_xoxol_ya_kiborg |
B |
Dec. 17, 2020, 9:46 p.m. |
OK |
Ruby |
TESTS |
18 |
530 |
1331200 |
|
|
101584906 |
optozorax |
B |
Dec. 17, 2020, 5:32 p.m. |
OK |
Rust |
TESTS |
4 |
31 |
102400 |
|
|
101603153 |
xc31 |
B |
Dec. 18, 2020, 2:50 a.m. |
OK |
Rust |
TESTS |
18 |
280 |
102400 |
|
|
remove filters
Back to search problems