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'Consider the function p(x), where x is an array of m integers, which returns an array y consisting of m xe2 x80 x89+ xe2 x80 x891 integers such that yi is equal to the sum of first i elements of array x (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m). You have an infinite sequence of arrays A0, xe2 x80 x89A1, xe2 x80 x89A2..., where A0 is given in the input, and for each i xe2 x80 x89 xe2 x89 xa5 xe2 x80 x891 Ai xe2 x80 x89= xe2 x80 x89p(Ai xe2 x80 x89- xe2 x80 x891). Also you have a positive integer k. You have to find minimum possible i such that Ai contains a number which is larger or equal than k. The first line contains two integers n and k (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018). n is the size of array A0. The second line contains n integers A00, xe2 x80 x89A01... A0n xe2 x80 x89- xe2 x80 x891 -- the elements of A0 (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89A0i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). At least two elements of A0 are positive. Print the minimum i such that Ai contains a number which is larger or equal than k. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
33920457 |
yasugongshang |
F |
Jan. 5, 2018, 11:17 a.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
3686400 |
|
2500 |
29174109 |
yasugongshang |
F |
Aug. 3, 2017, 5:44 p.m. |
OK |
GNU C++ |
TESTS |
40 |
15 |
5324800 |
|
2500 |
29967036 |
vjudge5 |
F |
Sept. 1, 2017, 8:36 a.m. |
OK |
GNU C++ |
TESTS |
40 |
31 |
1638400 |
|
2500 |
29170115 |
faebdc |
F |
Aug. 3, 2017, 4:45 p.m. |
OK |
GNU C++ |
TESTS |
40 |
31 |
3686400 |
|
2500 |
32343551 |
KrK |
F |
Nov. 16, 2017, midnight |
OK |
GNU C++ |
TESTS |
40 |
46 |
1638400 |
|
2500 |
29310503 |
oipotato |
F |
Aug. 9, 2017, 4:54 p.m. |
OK |
GNU C++ |
TESTS |
40 |
46 |
3481600 |
|
2500 |
34104916 |
lyx_cjz |
F |
Jan. 12, 2018, 11:29 a.m. |
OK |
GNU C++ |
TESTS |
40 |
46 |
3686400 |
|
2500 |
29304233 |
hohomu |
F |
Aug. 9, 2017, 11:17 a.m. |
OK |
GNU C++ |
TESTS |
40 |
46 |
3686400 |
|
2500 |
29232034 |
wings_forever |
F |
Aug. 6, 2017, 3:26 a.m. |
OK |
GNU C++ |
TESTS |
40 |
46 |
3686400 |
|
2500 |
36986059 |
vjudge1 |
F |
April 5, 2018, 2:55 a.m. |
OK |
GNU C++ |
TESTS |
40 |
46 |
5120000 |
|
2500 |
29266743 |
f2lk6wf90d |
F |
Aug. 7, 2017, 2:15 p.m. |
OK |
GNU C11 |
TESTS |
40 |
46 |
3481600 |
|
2500 |
68410138 |
rainboy |
F |
Jan. 8, 2020, 4:40 p.m. |
OK |
GNU C11 |
TESTS |
40 |
78 |
819200 |
|
2500 |
29172249 |
Umi |
F |
Aug. 3, 2017, 5:09 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
15 |
3686400 |
|
2500 |
29967026 |
dwt |
F |
Sept. 1, 2017, 8:35 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
30 |
1638400 |
|
2500 |
40980324 |
ReaLNero1 |
F |
July 30, 2018, 5:28 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
30 |
1638400 |
|
2500 |
62208793 |
Frame233 |
F |
Oct. 9, 2019, 1:54 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
31 |
1638400 |
|
2500 |
32829787 |
Jori |
F |
Dec. 1, 2017, 12:36 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
31 |
3686400 |
|
2500 |
36659510 |
emoairx |
F |
March 27, 2018, 6:24 a.m. |
OK |
GNU C++11 |
TESTS |
40 |
31 |
5427200 |
|
2500 |
29196586 |
scarlyw |
F |
Aug. 4, 2017, 2:31 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
31 |
5939200 |
|
2500 |
30512625 |
Jayzhang |
F |
Sept. 19, 2017, 3:55 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
46 |
1638400 |
|
2500 |
55876984 |
The.Last.Wizard |
F |
June 21, 2019, 5:11 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
46 |
1638400 |
|
2500 |
62169782 |
KMnO4y_Fish |
F |
Oct. 8, 2019, 11:23 p.m. |
OK |
GNU C++11 |
TESTS |
40 |
46 |
1638400 |
|
2500 |
29232053 |
strawberrry |
F |
Aug. 6, 2017, 3:28 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
31 |
5222400 |
|
2500 |
29211180 |
ascchrvalstr |
F |
Aug. 5, 2017, 6:29 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
46 |
5939200 |
|
2500 |
29641433 |
Domonion |
F |
Aug. 21, 2017, 10:42 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
61 |
1638400 |
|
2500 |
29166638 |
MrDindows |
F |
Aug. 3, 2017, 4:09 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
61 |
3584000 |
|
2500 |
29215603 |
kvk1920 |
F |
Aug. 5, 2017, 9:58 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
61 |
5120000 |
|
2500 |
29220742 |
T1duS |
F |
Aug. 5, 2017, 2:25 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
61 |
5120000 |
|
2500 |
44011731 |
Jester |
F |
Oct. 8, 2018, 6:35 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
62 |
1740800 |
|
2500 |
54912480 |
bhargav_0085 |
F |
June 1, 2019, 11:55 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
62 |
2355200 |
|
2500 |
29201454 |
tenshi_kanade |
F |
Aug. 4, 2017, 6:18 p.m. |
OK |
GNU C++14 |
TESTS |
40 |
62 |
2764800 |
|
2500 |
52630679 |
NotNight |
F |
April 12, 2019, 6:52 a.m. |
OK |
GNU C++14 |
TESTS |
40 |
62 |
3174400 |
|
2500 |
65029226 |
aryanc403 |
F |
Nov. 15, 2019, 9:08 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
61 |
1638400 |
|
2500 |
49542553 |
eisen_shinzou |
F |
Feb. 6, 2019, 7:22 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
61 |
1843200 |
|
2500 |
63133193 |
JoJo |
F |
Oct. 22, 2019, 2:39 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
62 |
1638400 |
|
2500 |
66541399 |
rsk0315 |
F |
Dec. 9, 2019, 11:38 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
62 |
1638400 |
|
2500 |
60622083 |
Jostic11 |
F |
Sept. 15, 2019, 11:29 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
62 |
1740800 |
|
2500 |
50763635 |
AliShahali1382 |
F |
March 3, 2019, 9:23 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
62 |
1740800 |
|
2500 |
60398307 |
hentai_lover_ |
F |
Sept. 11, 2019, 3:45 p.m. |
OK |
GNU C++17 |
TESTS |
40 |
62 |
7987200 |
|
2500 |
66615148 |
tung_la_vo_gia |
F |
Dec. 11, 2019, 3:04 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
62 |
7987200 |
|
2500 |
60517095 |
Enkognit |
F |
Sept. 14, 2019, 7:06 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
77 |
1638400 |
|
2500 |
60623240 |
Jostic11 |
F |
Sept. 15, 2019, 11:35 a.m. |
OK |
GNU C++17 |
TESTS |
40 |
77 |
1740800 |
|
2500 |
68410099 |
Dukkha |
F |
Jan. 8, 2020, 4:39 p.m. |
OK |
Java 11 |
TESTS |
40 |
436 |
0 |
|
2500 |
43660650 |
Ahmad |
F |
Oct. 1, 2018, 7:08 p.m. |
OK |
Java 8 |
TESTS |
40 |
140 |
0 |
|
2500 |
30240750 |
dalt |
F |
Sept. 10, 2017, 8:45 a.m. |
OK |
Java 8 |
TESTS |
40 |
155 |
0 |
|
2500 |
29167220 |
uwi |
F |
Aug. 3, 2017, 4:15 p.m. |
OK |
Java 8 |
TESTS |
40 |
156 |
20582400 |
|
2500 |
29216296 |
kessido |
F |
Aug. 5, 2017, 10:38 a.m. |
OK |
Java 8 |
TESTS |
40 |
171 |
26214400 |
|
2500 |
43665408 |
BiIIy |
F |
Oct. 1, 2018, 9:57 p.m. |
OK |
Java 8 |
TESTS |
40 |
186 |
3072000 |
|
2500 |
29172481 |
Derino |
F |
Aug. 3, 2017, 5:11 p.m. |
OK |
Java 8 |
TESTS |
40 |
202 |
37888000 |
|
2500 |
29204434 |
PrakharJain |
F |
Aug. 4, 2017, 9:21 p.m. |
OK |
Java 8 |
TESTS |
40 |
249 |
26009600 |
|
2500 |
29197928 |
dcordb |
F |
Aug. 4, 2017, 3:28 p.m. |
OK |
Java 8 |
TESTS |
40 |
405 |
26112000 |
|
2500 |
29202400 |
Kammola |
F |
Aug. 4, 2017, 7:01 p.m. |
OK |
Java 8 |
TESTS |
40 |
623 |
27136000 |
|
2500 |
29183965 |
ffbh |
F |
Aug. 4, 2017, 5:07 a.m. |
OK |
Java 8 |
TESTS |
40 |
655 |
21196800 |
|
2500 |
29174672 |
leign |
F |
Aug. 3, 2017, 6:01 p.m. |
OK |
Mono C# |
TESTS |
40 |
249 |
29696000 |
|
2500 |
29207737 |
vjudge1 |
F |
Aug. 5, 2017, 2:56 a.m. |
OK |
MS C++ |
TESTS |
40 |
46 |
3686400 |
|
2500 |
36663454 |
Maffka |
F |
March 27, 2018, 9:42 a.m. |
OK |
MS C++ |
TESTS |
40 |
124 |
11776000 |
|
2500 |
33475776 |
AleksanderBalobanov |
F |
Dec. 21, 2017, 10:01 a.m. |
OK |
MS C++ |
TESTS |
40 |
186 |
4710400 |
|
2500 |
29492854 |
achudov89 |
F |
Aug. 15, 2017, 10:31 p.m. |
OK |
MS C++ |
TESTS |
40 |
202 |
3686400 |
|
2500 |
29492428 |
brandonzhang |
F |
Aug. 15, 2017, 9:43 p.m. |
OK |
PyPy 2 |
TESTS |
40 |
202 |
35532800 |
|
2500 |
29417637 |
brandonzhang |
F |
Aug. 12, 2017, 11 p.m. |
OK |
PyPy 2 |
TESTS |
40 |
248 |
33996800 |
|
2500 |
29306887 |
andreamaf |
F |
Aug. 9, 2017, 1:28 p.m. |
OK |
PyPy 2 |
TESTS |
40 |
249 |
63897600 |
|
2500 |
29183512 |
Yash_ |
F |
Aug. 4, 2017, 4:39 a.m. |
OK |
PyPy 2 |
TESTS |
40 |
358 |
48742400 |
|
2500 |
29416643 |
SherlockyHolmes |
F |
Aug. 12, 2017, 9:40 p.m. |
OK |
PyPy 3 |
TESTS |
40 |
374 |
41779200 |
|
2500 |
29173481 |
biGinNer |
F |
Aug. 3, 2017, 5:26 p.m. |
OK |
PyPy 3 |
TESTS |
40 |
498 |
60108800 |
|
2500 |
29204835 |
sergioRG |
F |
Aug. 4, 2017, 10:03 p.m. |
OK |
PyPy 3 |
TESTS |
40 |
498 |
63590400 |
|
2500 |
29204875 |
sergioRG |
F |
Aug. 4, 2017, 10:09 p.m. |
OK |
PyPy 3 |
TESTS |
40 |
499 |
63897600 |
|
2500 |
29169770 |
marcoskwkm |
F |
Aug. 3, 2017, 4:41 p.m. |
OK |
Python 2 |
TESTS |
40 |
358 |
15872000 |
|
2500 |
29174194 |
nwi |
F |
Aug. 3, 2017, 5:46 p.m. |
OK |
Python 2 |
TESTS |
40 |
421 |
15872000 |
|
2500 |
29630304 |
lawrenceli |
F |
Aug. 20, 2017, 8:56 p.m. |
OK |
Python 2 |
TESTS |
40 |
592 |
12390400 |
|
2500 |
29171897 |
jtnydv25 |
F |
Aug. 3, 2017, 5:05 p.m. |
OK |
Python 2 |
TESTS |
40 |
889 |
15667200 |
|
2500 |
29620658 |
eku |
F |
Aug. 20, 2017, 12:17 p.m. |
OK |
Python 3 |
TESTS |
40 |
280 |
15564800 |
|
2500 |
68390617 |
vjudge5 |
F |
Jan. 8, 2020, 8:27 a.m. |
OK |
Python 3 |
TESTS |
40 |
467 |
16691200 |
|
2500 |
29172201 |
0ogway |
F |
Aug. 3, 2017, 5:08 p.m. |
OK |
Python 3 |
TESTS |
40 |
498 |
20070400 |
|
2500 |
29541240 |
Eva |
F |
Aug. 18, 2017, 1:25 a.m. |
OK |
Python 3 |
TESTS |
40 |
732 |
15974400 |
|
2500 |
37231571 |
Ferume |
F |
April 11, 2018, 5:43 p.m. |
OK |
Python 3 |
TESTS |
40 |
748 |
23142400 |
|
2500 |
remove filters
Back to search problems