Tinkoff Internship Warmup Round 2018 and Codeforces Round 475 (Div. 1)

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.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
963 Tinkoff Internship Warmup Round 2018 and Codeforces Round 475 (Div. 1) FINISHED False 7200 207849299 April 17, 2018, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3333 ) A Alternating Sum PROGRAMMING math number theory 1800

B"You are given two integers a and b . Moreover, you are given a sequence s_0, s_1, ... , s_{n} . All values in s are integers 1 or -1 . It's known that sequence is k -periodic and k divides n+1 . In other words, for each k <= q i <= q n it's satisfied that s_{i} = s_{i - k} . Find out the non-negative remainder of division of sum limits_{i=0}^{n} s_{i} a^{n - i} b^{i} by 10^{9} + 9 . Note that the modulo is unusual! The first line contains four integers n, a, b and k (1 <= q n <= q 10^{9}, 1 <= q a, b <= q 10^{9}, 1 <= q k <= q 10^{5}) . The second line contains a sequence of length k consisting of characters '+' and '-'. If the i -th character (0-indexed) is '+', then s_{i} = 1 , otherwise s_{i} = -1 . Note that only the first k members of the sequence are given, the rest can be obtained using the periodicity property. Output a single integer -- value of given expression modulo 10^{9} + 9 . In the first example: ( sum limits_{i=0}^{n} s_{i} a^{n - i} b^{i}) = 2^{2} 3^{0} - 2^{1} 3^{1} + 2^{0} 3^{2} = 7 In the second example: ( sum limits_{i=0}^{n} s_{i} a^{n - i} b^{i}) = -1^{4} 5^{0} - 1^{3} 5^{1} - 1^{2} 5^{2} - 1^{1} 5^{3} - 1^{0} 5^{4} = -781 equiv 999999228 pmod{10^{9} + 9} . "...

Tutorials

Editorial Tinkoff Internship Warmup Round 2018 and Codeforces Round #475 (Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
58115244 vjudge5 A Aug. 1, 2019, 8:39 a.m. OK Clang++17 Diagnostics TESTS 71 61 0 1800
69878739 hos.lyric A Jan. 31, 2020, 5:26 a.m. OK D TESTS 71 31 4198400 1800
39756641 wubingxian A June 29, 2018, 2:56 a.m. OK FPC TESTS 71 311 0 1800
37404315 Dmaxiya A April 17, 2018, 2:50 p.m. OK GNU C++ TESTS 71 30 3584000 1800
38325189 loi_dqs A May 16, 2018, 2:26 p.m. OK GNU C++ TESTS 71 30 3686400 1800
38325200 DQS A May 16, 2018, 2:27 p.m. OK GNU C++ TESTS 71 30 3686400 1800
37590961 Forget_ever A April 25, 2018, 8:20 a.m. OK GNU C++ TESTS 71 30 3891200 1800
37435578 Dream-Reality A April 18, 2018, 12:23 p.m. OK GNU C++ TESTS 71 30 3891200 1800
41573128 weng_233 A Aug. 14, 2018, 1:26 a.m. OK GNU C++ TESTS 71 31 0 1800
39401335 Jiangkangping A June 19, 2018, 7:08 a.m. OK GNU C++ TESTS 71 31 0 1800
39185433 cjjst123 A June 12, 2018, 8:45 a.m. OK GNU C++ TESTS 71 31 0 1800
40699567 liu_zhan A July 24, 2018, 9:54 a.m. OK GNU C++ TESTS 71 31 102400 1800
39401729 hychyc A June 19, 2018, 7:23 a.m. OK GNU C++ TESTS 71 31 102400 1800
43515564 dalek_cos A Sept. 28, 2018, 4:23 a.m. OK GNU C11 TESTS 71 78 102400 1800
37417111 calabash_boy A April 17, 2018, 6:37 p.m. OK GNU C++11 TESTS 71 15 3584000 1800
37425864 cen A April 18, 2018, 5:52 a.m. OK GNU C++11 TESTS 71 30 3584000 1800
37405141 jklepec A April 17, 2018, 2:57 p.m. OK GNU C++11 TESTS 71 30 3788800 1800
37400355 vlecomte A April 17, 2018, 2:21 p.m. OK GNU C++11 TESTS 71 30 3788800 1800
37400073 logicmachine A April 17, 2018, 2:19 p.m. OK GNU C++11 TESTS 71 30 3788800 1800
37414766 linkret A April 17, 2018, 5:19 p.m. OK GNU C++11 TESTS 71 30 3788800 1800
37435716 orzcyc A April 18, 2018, 12:26 p.m. OK GNU C++11 TESTS 71 30 4096000 1800
37435757 zsnuo A April 18, 2018, 12:27 p.m. OK GNU C++11 TESTS 71 30 4096000 1800
58111698 vjudge5 A Aug. 1, 2019, 7:26 a.m. OK GNU C++11 TESTS 71 31 0 1800
58114287 vjudge3 A Aug. 1, 2019, 8:21 a.m. OK GNU C++11 TESTS 71 31 0 1800
37423571 NewSession A April 18, 2018, 2:37 a.m. OK GNU C++14 TESTS 71 15 3481600 1800
37475895 cuiaoxiang A April 20, 2018, 2:23 a.m. OK GNU C++14 TESTS 71 15 3481600 1800
37530454 asusp4s333 A April 22, 2018, 10:13 a.m. OK GNU C++14 TESTS 71 15 4198400 1800
38599262 LaJiGames A May 25, 2018, 2:14 a.m. OK GNU C++14 TESTS 71 15 10035200 1800
48897486 himansh242 A Jan. 24, 2019, 4:31 p.m. OK GNU C++14 TESTS 71 30 102400 1800
43384246 EliasMera A Sept. 24, 2018, 7:21 p.m. OK GNU C++14 TESTS 71 30 307200 1800
37448478 MZuenni A April 18, 2018, 10:11 p.m. OK GNU C++14 TESTS 71 30 3379200 1800
37402279 OMRailgun A April 17, 2018, 2:34 p.m. OK GNU C++14 TESTS 71 30 3481600 1800
37404268 Faithful A April 17, 2018, 2:50 p.m. OK GNU C++14 TESTS 71 30 3481600 1800
37581628 Infoshoc A April 24, 2018, 6:49 p.m. OK GNU C++14 TESTS 71 30 3584000 1800
37834585 vjudge1 A May 2, 2018, 8:44 a.m. OK GNU C++17 TESTS 71 30 3481600 1800
37423747 im0qianqian A April 18, 2018, 2:50 a.m. OK GNU C++17 TESTS 71 30 3481600 1800
68717454 user202729_ A Jan. 13, 2020, 2:59 p.m. OK GNU C++17 TESTS 71 31 0 1800
59917492 wwdd A Sept. 2, 2019, 8 p.m. OK GNU C++17 TESTS 71 31 0 1800
43392610 Giwan A Sept. 25, 2018, 2:37 a.m. OK GNU C++17 TESTS 71 31 102400 1800
49459402 xyw5vplus1 A Feb. 4, 2019, 12:11 p.m. OK GNU C++17 TESTS 71 31 102400 1800
43394772 XKev A Sept. 25, 2018, 4:26 a.m. OK GNU C++17 TESTS 71 31 102400 1800
43393858 Kawax A Sept. 25, 2018, 3:41 a.m. OK GNU C++17 TESTS 71 31 102400 1800
43393720 Giwan A Sept. 25, 2018, 3:35 a.m. OK GNU C++17 TESTS 71 31 102400 1800
43391095 Elseen A Sept. 25, 2018, 1:12 a.m. OK GNU C++17 TESTS 71 31 102400 1800
48375799 hctep A Jan. 14, 2019, 7:29 a.m. OK Java 8 TESTS 71 124 0 1800
40812039 Noureldin A July 26, 2018, 5:14 p.m. OK Java 8 TESTS 71 140 0 1800
37413013 dalt A April 17, 2018, 4:01 p.m. OK Java 8 TESTS 71 140 20684800 1800
37400382 VArtem A April 17, 2018, 2:21 p.m. OK Java 8 TESTS 71 140 20684800 1800
37399150 Lewin A April 17, 2018, 2:15 p.m. OK Java 8 TESTS 71 140 20787200 1800
43394721 ricurb A Sept. 25, 2018, 4:24 a.m. OK Java 8 TESTS 71 155 0 1800
37402336 tri A April 17, 2018, 2:34 p.m. OK Java 8 TESTS 71 155 20787200 1800
37401180 uwi A April 17, 2018, 2:26 p.m. OK Java 8 TESTS 71 155 20787200 1800
37402668 fetetriste A April 17, 2018, 2:37 p.m. OK Java 8 TESTS 71 156 20684800 1800
43395078 Vatorino A Sept. 25, 2018, 4:41 a.m. OK Java 8 TESTS 71 171 0 1800
37445047 nixmulta A April 18, 2018, 6:03 p.m. OK Mono C# TESTS 71 46 9830400 1800
37400655 waltz7l9 A April 17, 2018, 2:23 p.m. OK MS C++ TESTS 71 30 3584000 1800
43393991 AlisterEstrada A Sept. 25, 2018, 3:47 a.m. OK MS C++ TESTS 71 31 102400 1800
43386476 A01338527 A Sept. 24, 2018, 8:33 p.m. OK MS C++ TESTS 71 31 102400 1800
43386458 A01338527 A Sept. 24, 2018, 8:32 p.m. OK MS C++ TESTS 71 31 102400 1800
58140097 vjudge1 A Aug. 1, 2019, 5:45 p.m. OK MS C++ TESTS 71 31 102400 1800
43386247 A01410597 A Sept. 24, 2018, 8:24 p.m. OK MS C++ TESTS 71 31 102400 1800
43386427 A.LM A Sept. 24, 2018, 8:31 p.m. OK MS C++ TESTS 71 31 102400 1800
37507349 Miris A April 21, 2018, 7:57 a.m. OK MS C++ TESTS 71 31 3788800 1800
44973446 vjudge5 A Oct. 28, 2018, 3:11 a.m. OK MS C++ TESTS 71 93 307200 1800
44954989 vjudge1 A Oct. 27, 2018, 1:47 p.m. OK MS C++ TESTS 71 93 1024000 1800
58133101 vjudge1 A Aug. 1, 2019, 3:02 p.m. OK MS C++ 2017 TESTS 71 155 102400 1800
43393495 joaquinrios A Sept. 25, 2018, 3:25 a.m. OK PyPy 2 TESTS 71 140 2764800 1800
43392345 duncanista A Sept. 25, 2018, 2:24 a.m. OK PyPy 2 TESTS 71 171 2764800 1800
43389893 TRS A Sept. 24, 2018, 11:51 p.m. OK PyPy 3 TESTS 71 171 1024000 1800
37400137 nwi A April 17, 2018, 2:20 p.m. OK Python 2 TESTS 71 171 6144000 1800
43396882 Daniel64 A Sept. 25, 2018, 5:59 a.m. OK Python 2 TESTS 71 202 1740800 1800
43392556 r7perezyera A Sept. 25, 2018, 2:34 a.m. OK Python 2 TESTS 71 249 2150400 1800
43392245 luisalcantara A Sept. 25, 2018, 2:18 a.m. OK Python 2 TESTS 71 295 2150400 1800
52290981 emamex98 A April 4, 2019, 1:37 a.m. OK Python 3 TESTS 71 124 204800 1800
38210658 Taxman A May 14, 2018, 9:48 a.m. OK Python 3 TESTS 71 139 7270400 1800
43394120 luis_palomino A Sept. 25, 2018, 3:53 a.m. OK Python 3 TESTS 71 156 102400 1800
43390828 emamex98 A Sept. 25, 2018, 12:54 a.m. OK Python 3 TESTS 71 156 204800 1800
43395441 luislucatero21 A Sept. 25, 2018, 4:57 a.m. OK Python 3 TESTS 71 170 204800 1800
37414930 MegaOwIer A April 17, 2018, 5:22 p.m. OK Python 3 TESTS 71 170 7168000 1800
43395525 OscarSierra A Sept. 25, 2018, 5 a.m. OK Python 3 TESTS 71 171 102400 1800
37424593 Yee_172 A April 18, 2018, 4:09 a.m. OK Python 3 TESTS 71 171 7270400 1800
37414945 Kaildls A April 17, 2018, 5:22 p.m. OK Python 3 TESTS 71 171 7270400 1800
43390191 3t4n A Sept. 25, 2018, 12:14 a.m. OK Python 3 TESTS 71 217 204800 1800

remove filters

Back to search problems