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'Fibonotci sequence is an integer recursive sequence defined by the recurrence relation Sequence s is an infinite and almost cyclic sequence with a cycle of length N. A sequence s is called almost cyclic with a cycle of length N if , for i xe2 x80 x89 xe2 x89 xa5 xe2 x80 x89N, except for a finite number of values si, for which (i xe2 x80 x89 xe2 x89 xa5 xe2 x80 x89N). Following is an example of an almost cyclic sequence with a cycle of length 4: Notice that the only value of s for which the equality does not hold is s6 (s6 xe2 x80 x89= xe2 x80 x897 and s2 xe2 x80 x89= xe2 x80 x898). You are given s0, xe2 x80 x89s1, xe2 x80 x89...sN xe2 x80 x89- xe2 x80 x891 and all the values of sequence s for which (i xe2 x80 x89 xe2 x89 xa5 xe2 x80 x89N). Find . The first line contains two numbers K and P. The second line contains a single number N. The third line contains N numbers separated by spaces, that represent the first N numbers of the sequence s. The fourth line contains a single number M, the number of values of sequence s for which . Each of the following M lines contains two numbers j and v, indicating that and sj xe2 x80 x89= xe2 x80 x89v. All j-s are distinct. Output should contain a single integer equal to .'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
40986207 |
ReaLNero1 |
A |
July 30, 2018, 8:24 p.m. |
OK |
GNU C++ |
TESTS |
13 |
186 |
6451200 |
|
2800 |
27701054 |
vjudge5 |
A |
June 10, 2017, 6:38 a.m. |
OK |
GNU C++ |
TESTS |
13 |
187 |
6451200 |
|
2800 |
27701052 |
ShinriiTin |
A |
June 10, 2017, 6:37 a.m. |
OK |
GNU C++ |
TESTS |
13 |
187 |
6451200 |
|
2800 |
27724203 |
vjudge5 |
A |
June 11, 2017, 4:31 p.m. |
OK |
GNU C++ |
TESTS |
13 |
202 |
7577600 |
|
2800 |
20562801 |
AkaneSasu |
A |
Sept. 13, 2016, 8:41 a.m. |
OK |
GNU C++ |
TESTS |
13 |
202 |
7577600 |
|
2800 |
12866469 |
Altria-PenDragon wwt15 gtwgtw |
A |
Sept. 6, 2015, 10:06 a.m. |
OK |
GNU C++ |
TESTS |
13 |
234 |
5632000 |
|
2800 |
14913543 |
anewhandle |
A |
Dec. 21, 2015, 1:45 p.m. |
OK |
GNU C++ |
TESTS |
13 |
234 |
17612800 |
|
2800 |
17088505 |
vjudge3 |
A |
April 1, 2016, 10:48 a.m. |
OK |
GNU C++ |
TESTS |
13 |
234 |
18022400 |
|
2800 |
27717044 |
vjudge5 |
A |
June 11, 2017, 7:53 a.m. |
OK |
GNU C++ |
TESTS |
13 |
234 |
84172800 |
|
2800 |
14876804 |
chalishmaonly |
A |
Dec. 19, 2015, 2:20 p.m. |
OK |
GNU C++ |
TESTS |
13 |
249 |
15974400 |
|
2800 |
63367209 |
ilnil |
A |
Oct. 25, 2019, 7:58 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
139 |
4198400 |
|
2800 |
63556613 |
luogu_bot4 |
A |
Oct. 27, 2019, 1:03 p.m. |
OK |
GNU C++11 |
TESTS |
13 |
140 |
4198400 |
|
2800 |
63536289 |
ZhongJQ |
A |
Oct. 27, 2019, 8:11 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
140 |
13824000 |
|
2800 |
65414536 |
XieRujian |
A |
Nov. 20, 2019, 6:15 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
155 |
3993600 |
|
2800 |
63556395 |
Mirach |
A |
Oct. 27, 2019, 1 p.m. |
OK |
GNU C++11 |
TESTS |
13 |
155 |
4198400 |
|
2800 |
63276746 |
cjy2003 |
A |
Oct. 24, 2019, 7:09 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
156 |
9830400 |
|
2800 |
67679464 |
251 |
A |
Dec. 27, 2019, 5:24 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
171 |
6246400 |
|
2800 |
68899917 |
mrsrz |
A |
Jan. 16, 2020, 5:43 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
171 |
14233600 |
|
2800 |
12871600 |
HellKitsune |
A |
Sept. 6, 2015, 12:48 p.m. |
OK |
GNU C++11 |
TESTS |
13 |
171 |
14233600 |
|
2800 |
14425010 |
Meowww |
A |
Nov. 23, 2015, 11:21 a.m. |
OK |
GNU C++11 |
TESTS |
13 |
202 |
11878400 |
|
2800 |
63209042 |
zsyzsy |
A |
Oct. 23, 2019, 2:29 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
156 |
4198400 |
|
2800 |
68295151 |
liuxiao |
A |
Jan. 6, 2020, 1:57 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
202 |
5939200 |
|
2800 |
27701892 |
vjudge2 |
A |
June 10, 2017, 7:44 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
202 |
14643200 |
|
2800 |
25498589 |
daminho |
A |
March 15, 2017, 12:55 p.m. |
OK |
GNU C++14 |
TESTS |
13 |
218 |
5324800 |
|
2800 |
66269128 |
yhx-12243 |
A |
Dec. 4, 2019, 11:39 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
218 |
5427200 |
|
2800 |
64872627 |
rushcheyo |
A |
Nov. 14, 2019, 8:42 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
218 |
6656000 |
|
2800 |
27701891 |
vjudge4 |
A |
June 10, 2017, 7:43 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
218 |
14643200 |
|
2800 |
65425297 |
cz_xuyixuan |
A |
Nov. 20, 2019, 10:29 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
218 |
34099200 |
|
2800 |
27701849 |
chielo |
A |
June 10, 2017, 7:40 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
233 |
14643200 |
|
2800 |
64511507 |
mayaohua2003 |
A |
Nov. 8, 2019, 8:59 a.m. |
OK |
GNU C++14 |
TESTS |
13 |
249 |
13004800 |
|
2800 |
65282600 |
CMXRYNP |
A |
Nov. 18, 2019, 6:42 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
124 |
4198400 |
|
2800 |
67518550 |
Jayce132 |
A |
Dec. 24, 2019, 11:40 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
140 |
11059200 |
|
2800 |
63762055 |
jiangly |
A |
Oct. 30, 2019, 4:27 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
171 |
4710400 |
|
2800 |
63289744 |
wucstdio |
A |
Oct. 24, 2019, 11:26 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
187 |
9216000 |
|
2800 |
60655883 |
Nebuchadnezzar |
A |
Sept. 15, 2019, 11:22 p.m. |
OK |
GNU C++17 |
TESTS |
13 |
187 |
11468800 |
|
2800 |
46058081 |
H2SH2SO4O4O4 |
A |
Nov. 22, 2018, 11:58 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
202 |
7372800 |
|
2800 |
69733583 |
vjudge4 |
A |
Jan. 29, 2020, 2:04 p.m. |
OK |
GNU C++17 |
TESTS |
13 |
265 |
7577600 |
|
2800 |
64345887 |
Elegia |
A |
Nov. 6, 2019, 6:14 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
265 |
9318400 |
|
2800 |
69701260 |
vjudge1 |
A |
Jan. 29, 2020, 12:41 a.m. |
OK |
GNU C++17 |
TESTS |
13 |
280 |
5120000 |
|
2800 |
61739944 |
tfg |
A |
Oct. 2, 2019, 7:45 p.m. |
OK |
GNU C++17 |
TESTS |
13 |
311 |
3379200 |
|
2800 |
12869770 |
tanzaku uwi |
A |
Sept. 6, 2015, 11:53 a.m. |
OK |
Java 8 |
TESTS |
13 |
888 |
0 |
|
2800 |
12874441 |
temich |
A |
Sept. 6, 2015, 3:36 p.m. |
OK |
MS C++ |
TESTS |
13 |
483 |
12902400 |
|
2800 |
69702474 |
vjudge5 |
A |
Jan. 29, 2020, 1:55 a.m. |
OK |
MS C++ |
TESTS |
13 |
763 |
4198400 |
|
2800 |
12997528 |
Roms |
A |
Sept. 14, 2015, 3:40 p.m. |
OK |
MS C++ |
TESTS |
13 |
826 |
13312000 |
|
2800 |
12874214 |
balalaika |
A |
Sept. 6, 2015, 3:15 p.m. |
OK |
MS C++ |
TESTS |
13 |
857 |
9830400 |
|
2800 |
12872385 |
ballon |
A |
Sept. 6, 2015, 1:09 p.m. |
OK |
MS C++ |
TESTS |
13 |
1715 |
103833600 |
|
2800 |
12871746 |
yeti ztk ballon |
A |
Sept. 6, 2015, 12:52 p.m. |
OK |
MS C++ |
TESTS |
13 |
1715 |
103833600 |
|
2800 |
12872713 |
zeliboba |
A |
Sept. 6, 2015, 1:24 p.m. |
OK |
MS C++ |
TESTS |
13 |
1824 |
26726400 |
|
2800 |
remove filters
Back to search problems