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 n-1 integers a_1, a_2, ... , a_{n-1} . Your task is to construct an array b_1, b_2, ... , b_n such that: The first line contains one integer n ( 2 <= n <= 2 cdot 10^5 ). The second line contains n-1 integers a_1, a_2, ... , a_{n-1} ( 0 <= a_i <= 2n ). Additional constraint on the input: it's always possible to construct at least one valid array b from the given sequence a . Print n integers b_1, b_2, ... , b_n . If there are multiple such arrays, you may 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 |
231210194 |
Unk1ndled |
D |
Nov. 3, 2023, 4:57 p.m. |
OK |
GNU C11 |
TESTS |
42 |
873 |
819200 |
|
|
231249131 |
Sparkle_Twilight |
D |
Nov. 3, 2023, 9:15 p.m. |
OK |
GNU C11 |
TESTS |
42 |
873 |
819200 |
|
|
231208679 |
rainboy |
D |
Nov. 3, 2023, 4:48 p.m. |
OK |
GNU C11 |
TESTS |
42 |
904 |
819200 |
|
|
231278696 |
soham_c04 |
D |
Nov. 4, 2023, 5:16 a.m. |
OK |
GNU C11 |
TESTS |
43 |
920 |
9011200 |
|
|
231258114 |
Aria_Math |
D |
Nov. 4, 2023, 12:17 a.m. |
OK |
GNU C++14 |
TESTS |
43 |
62 |
2662400 |
|
|
231208484 |
tamminaina_y |
D |
Nov. 3, 2023, 4:47 p.m. |
OK |
GNU C++14 |
TESTS |
42 |
77 |
1638400 |
|
|
231209871 |
AtomFirst |
D |
Nov. 3, 2023, 4:55 p.m. |
OK |
GNU C++14 |
TESTS |
42 |
93 |
819200 |
|
|
231208049 |
Comentropy |
D |
Nov. 3, 2023, 4:45 p.m. |
OK |
GNU C++14 |
TESTS |
42 |
93 |
819200 |
|
|
231264061 |
SunnyYuan2009 |
D |
Nov. 4, 2023, 1:57 a.m. |
OK |
GNU C++14 |
TESTS |
43 |
93 |
819200 |
|
|
231228220 |
lwsq |
D |
Nov. 3, 2023, 6:40 p.m. |
OK |
GNU C++14 |
TESTS |
42 |
93 |
819200 |
|
|
231216706 |
MasouMelon |
D |
Nov. 3, 2023, 5:38 p.m. |
OK |
GNU C++14 |
TESTS |
42 |
93 |
819200 |
|
|
231272758 |
luck_lgd |
D |
Nov. 4, 2023, 3:53 a.m. |
OK |
GNU C++14 |
TESTS |
43 |
93 |
819200 |
|
|
231273394 |
PennyJade |
D |
Nov. 4, 2023, 4:02 a.m. |
OK |
GNU C++14 |
TESTS |
43 |
93 |
1638400 |
|
|
231268494 |
halehu |
D |
Nov. 4, 2023, 2:57 a.m. |
OK |
GNU C++14 |
TESTS |
43 |
93 |
1638400 |
|
|
231207882 |
Rhyme3 |
D |
Nov. 3, 2023, 4:44 p.m. |
OK |
GNU C++17 |
TESTS |
42 |
92 |
1638400 |
|
|
231268764 |
QWERTY_123456 |
D |
Nov. 4, 2023, 3:01 a.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231259803 |
Chris_Brown |
D |
Nov. 4, 2023, 12:53 a.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231254135 |
m4h |
D |
Nov. 3, 2023, 10:42 p.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231251020 |
Zero0 |
D |
Nov. 3, 2023, 9:44 p.m. |
OK |
GNU C++17 |
TESTS |
42 |
93 |
819200 |
|
|
231236014 |
-VIBE |
D |
Nov. 3, 2023, 7:22 p.m. |
OK |
GNU C++17 |
TESTS |
42 |
93 |
819200 |
|
|
231271356 |
Chrisedyong |
D |
Nov. 4, 2023, 3:33 a.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231271048 |
FanXuwei |
D |
Nov. 4, 2023, 3:29 a.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231270942 |
FanXuwei |
D |
Nov. 4, 2023, 3:28 a.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231273087 |
FanXuwei |
D |
Nov. 4, 2023, 3:58 a.m. |
OK |
GNU C++17 |
TESTS |
43 |
93 |
819200 |
|
|
231210882 |
FuDiWeiu |
D |
Nov. 3, 2023, 5 p.m. |
OK |
GNU C++17 (64) |
TESTS |
42 |
31 |
3276800 |
|
|
231253985 |
enslaved |
D |
Nov. 3, 2023, 10:39 p.m. |
OK |
GNU C++17 (64) |
TESTS |
43 |
61 |
2457600 |
|
|
231211610 |
FloatingOcean |
D |
Nov. 3, 2023, 5:05 p.m. |
OK |
GNU C++17 (64) |
TESTS |
42 |
61 |
3174400 |
|
|
231263075 |
fs20091003 |
D |
Nov. 4, 2023, 1:43 a.m. |
OK |
GNU C++17 (64) |
TESTS |
43 |
62 |
819200 |
|
|
231258290 |
LXH-cat |
D |
Nov. 4, 2023, 12:21 a.m. |
OK |
GNU C++17 (64) |
TESTS |
43 |
62 |
819200 |
|
|
231280272 |
lnkkerst |
D |
Nov. 4, 2023, 5:35 a.m. |
OK |
GNU C++17 (64) |
TESTS |
43 |
62 |
819200 |
|
|
231237835 |
chappy1 |
D |
Nov. 3, 2023, 7:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
42 |
62 |
1024000 |
|
|
231209603 |
XH_v |
D |
Nov. 3, 2023, 4:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
42 |
62 |
2457600 |
|
|
231256855 |
syf2008 |
D |
Nov. 3, 2023, 11:44 p.m. |
OK |
GNU C++17 (64) |
TESTS |
43 |
62 |
2457600 |
|
|
231205404 |
hata_saa |
D |
Nov. 3, 2023, 4:34 p.m. |
OK |
GNU C++17 (64) |
TESTS |
42 |
62 |
3174400 |
|
|
231266681 |
aryan.kadyrov |
D |
Nov. 4, 2023, 2:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
30 |
1024000 |
|
|
231215683 |
magnus.hegdahl |
D |
Nov. 3, 2023, 5:32 p.m. |
OK |
GNU C++20 (64) |
TESTS |
42 |
30 |
1024000 |
|
|
231277555 |
65_67_77 |
D |
Nov. 4, 2023, 5:02 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231273192 |
star_road_xyz |
D |
Nov. 4, 2023, 3:59 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231260825 |
SunnyYuan2009 |
D |
Nov. 4, 2023, 1:10 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231222128 |
Vlaned |
D |
Nov. 3, 2023, 6:12 p.m. |
OK |
GNU C++20 (64) |
TESTS |
42 |
46 |
819200 |
|
|
231278441 |
mcuadros |
D |
Nov. 4, 2023, 5:13 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231278816 |
Lycoris |
D |
Nov. 4, 2023, 5:17 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231278844 |
Lycoris |
D |
Nov. 4, 2023, 5:18 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231279472 |
Xapak |
D |
Nov. 4, 2023, 5:25 a.m. |
OK |
GNU C++20 (64) |
TESTS |
43 |
46 |
819200 |
|
|
231213591 |
ritvik369 |
D |
Nov. 3, 2023, 5:18 p.m. |
OK |
Java 11 |
TESTS |
42 |
280 |
307200 |
|
|
231198758 |
profchi |
D |
Nov. 3, 2023, 4:22 p.m. |
OK |
Java 11 |
TESTS |
42 |
326 |
716800 |
|
|
231199177 |
KlayThompson11 |
D |
Nov. 3, 2023, 4:23 p.m. |
OK |
Java 11 |
TESTS |
42 |
389 |
7884800 |
|
|
231202325 |
frey4 |
D |
Nov. 3, 2023, 4:29 p.m. |
OK |
Java 17 |
TESTS |
42 |
311 |
1638400 |
|
|
231211876 |
TopCloser |
D |
Nov. 3, 2023, 5:07 p.m. |
OK |
Java 17 |
TESTS |
42 |
374 |
15564800 |
|
|
231200715 |
wintersoldier2004 |
D |
Nov. 3, 2023, 4:26 p.m. |
OK |
Java 17 |
TESTS |
42 |
904 |
1228800 |
|
|
231197137 |
Ligh0x74 |
D |
Nov. 3, 2023, 4:19 p.m. |
OK |
Java 21 |
TESTS |
42 |
420 |
921600 |
|
|
231213199 |
ToToTroll |
D |
Nov. 3, 2023, 5:15 p.m. |
OK |
Java 21 |
TESTS |
42 |
733 |
16793600 |
|
|
231206623 |
yimingl |
D |
Nov. 3, 2023, 4:38 p.m. |
OK |
Java 21 |
TESTS |
42 |
1200 |
1843200 |
|
|
231214766 |
priyaroy3370 |
D |
Nov. 3, 2023, 5:25 p.m. |
OK |
Java 8 |
TESTS |
42 |
171 |
4505600 |
|
|
231281134 |
coderman2004 |
D |
Nov. 4, 2023, 5:43 a.m. |
OK |
Java 8 |
TESTS |
43 |
186 |
3379200 |
|
|
231252524 |
NerfThis |
D |
Nov. 3, 2023, 10:09 p.m. |
OK |
Java 8 |
TESTS |
42 |
187 |
3379200 |
|
|
231263018 |
xobe19 |
D |
Nov. 4, 2023, 1:42 a.m. |
OK |
Java 8 |
TESTS |
43 |
249 |
9011200 |
|
|
231209458 |
golions |
D |
Nov. 3, 2023, 4:52 p.m. |
OK |
Java 8 |
TESTS |
42 |
467 |
23244800 |
|
|
231212545 |
agcom |
D |
Nov. 3, 2023, 5:11 p.m. |
OK |
Kotlin 1.7 |
TESTS |
42 |
764 |
126054400 |
|
|
231212397 |
agcom |
D |
Nov. 3, 2023, 5:10 p.m. |
OK |
Kotlin 1.7 |
TESTS |
42 |
779 |
143872000 |
|
|
231269851 |
monui |
D |
Nov. 4, 2023, 3:13 a.m. |
OK |
MS C++ 2017 |
TESTS |
43 |
265 |
1638400 |
|
|
231197439 |
LMeyling |
D |
Nov. 3, 2023, 4:19 p.m. |
OK |
PyPy 3 |
TESTS |
42 |
483 |
19660800 |
|
|
231203483 |
67mnjhgfqwer |
D |
Nov. 3, 2023, 4:31 p.m. |
OK |
PyPy 3 |
TESTS |
42 |
982 |
61235200 |
|
|
231218864 |
shade34 |
D |
Nov. 3, 2023, 5:55 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
140 |
24678400 |
|
|
231215494 |
shade34 |
D |
Nov. 3, 2023, 5:30 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
140 |
24678400 |
|
|
231246965 |
SoleProprietor |
D |
Nov. 3, 2023, 8:48 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
170 |
23859200 |
|
|
231208374 |
groundtruth |
D |
Nov. 3, 2023, 4:46 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
170 |
26624000 |
|
|
231248638 |
gardengnome |
D |
Nov. 3, 2023, 9:07 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
171 |
25907200 |
|
|
231269189 |
pajenegod |
D |
Nov. 4, 2023, 3:06 a.m. |
OK |
PyPy 3-64 |
TESTS |
43 |
171 |
27033600 |
|
|
231277329 |
mikeac |
D |
Nov. 4, 2023, 4:59 a.m. |
OK |
PyPy 3-64 |
TESTS |
43 |
186 |
28364800 |
|
|
231261830 |
alexwice |
D |
Nov. 4, 2023, 1:25 a.m. |
OK |
PyPy 3-64 |
TESTS |
43 |
186 |
30924800 |
|
|
231201940 |
pedrosorio |
D |
Nov. 3, 2023, 4:29 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
187 |
23040000 |
|
|
231250599 |
Quick-One |
D |
Nov. 3, 2023, 9:37 p.m. |
OK |
PyPy 3-64 |
TESTS |
42 |
187 |
32972800 |
|
|
231198421 |
yupooh |
D |
Nov. 3, 2023, 4:21 p.m. |
OK |
Python 3 |
TESTS |
42 |
624 |
44646400 |
|
|
231199962 |
byurak |
D |
Nov. 3, 2023, 4:25 p.m. |
OK |
Python 3 |
TESTS |
42 |
811 |
28057600 |
|
|
231277898 |
k_kashyap |
D |
Nov. 4, 2023, 5:06 a.m. |
OK |
Python 3 |
TESTS |
43 |
1684 |
26521600 |
|
|
231205145 |
zozoto |
D |
Nov. 3, 2023, 4:34 p.m. |
OK |
Python 3 |
TESTS |
42 |
1731 |
26521600 |
|
|
231204769 |
cmaspi_ |
D |
Nov. 3, 2023, 4:33 p.m. |
OK |
Python 3 |
TESTS |
42 |
1903 |
36249600 |
|
|
231255605 |
0npata |
D |
Nov. 3, 2023, 11:18 p.m. |
OK |
Rust 2021 |
TESTS |
43 |
61 |
6451200 |
|
|
231251689 |
viniciusth |
D |
Nov. 3, 2023, 9:55 p.m. |
OK |
Rust 2021 |
TESTS |
42 |
124 |
23040000 |
|
|
remove filters
Back to search problems