Bayan 2015 Contest Warm Up

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
475 Bayan 2015 Contest Warm Up FINISHED False 10800 319309199 Oct. 5, 2014, 1 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4967 ) D CGCDSSQ PROGRAMMING brute force data structures math 2000

B'Given a sequence of integers a1, xe2 x80 x89..., xe2 x80 x89an and q queries x1, xe2 x80 x89..., xe2 x80 x89xq on it. For each query xi you have to count the number of pairs (l, xe2 x80 x89r) such that 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n and gcd(al, xe2 x80 x89al xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89..., xe2 x80 x89ar) xe2 x80 x89= xe2 x80 x89xi. is a greatest common divisor of v1, xe2 x80 x89v2, xe2 x80 x89..., xe2 x80 x89vn, that is equal to a largest positive integer that divides all vi. The first line of the input contains integer n, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), denoting the length of the sequence. The next line contains n space separated integers a1, xe2 x80 x89..., xe2 x80 x89an, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). The third line of the input contains integer q, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xe2 x80 x89 xc3 x97 xe2 x80 x89105), denoting the number of queries. Then follows q lines, each contain an integer xi, (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). For each query print the result in a separate line.'...

Tutorials

Bayan 2015 Contest Warm Up Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
17034503 jiangyx D March 30, 2016, 1:17 p.m. OK FPC TESTS 73 576 16998400 2000
8095679 superfish D Oct. 5, 2014, 3:40 p.m. OK FPC TESTS 73 576 18944000 2000
8753033 gyz_gyz D Nov. 19, 2014, 7:26 a.m. OK FPC TESTS 73 592 161177600 2000
8088868 Alex_2oo8 D Oct. 5, 2014, 1:33 p.m. OK FPC TESTS 73 1075 169164800 2000
8543564 qqspeed D Nov. 4, 2014, 7:29 a.m. OK GNU C++ TESTS 73 62 6041600 2000
8092914 dzy97 D Oct. 5, 2014, 2:37 p.m. OK GNU C++ TESTS 73 93 11468800 2000
37546558 hhhjhy D April 23, 2018, 8:42 a.m. OK GNU C++ TESTS 73 93 87961600 2000
8091892 layor D Oct. 5, 2014, 2:17 p.m. OK GNU C++ TESTS 73 108 10854400 2000
37435901 vjudge5 D April 18, 2018, 12:32 p.m. OK GNU C++ TESTS 73 108 88268800 2000
8148406 excelsior D Oct. 8, 2014, 9:27 p.m. OK GNU C++ TESTS 73 109 4710400 2000
8101189 dtalamas24 D Oct. 6, 2014, 3:28 a.m. OK GNU C++ TESTS 73 124 4710400 2000
8101059 dtalamas24 D Oct. 6, 2014, 3:04 a.m. OK GNU C++ TESTS 73 124 4710400 2000
10700897 silver_linings D April 14, 2015, 6:27 a.m. OK GNU C++ TESTS 73 124 5324800 2000
10700720 silver_linings D April 14, 2015, 5:58 a.m. OK GNU C++ TESTS 73 124 5324800 2000
8143581 MinakoKojima D Oct. 8, 2014, 5:44 p.m. OK GNU C++0x TESTS 73 108 9011200 2000
8099143 sunacm D Oct. 5, 2014, 7:42 p.m. OK GNU C++0x TESTS 73 109 11468800 2000
8089445 Nero D Oct. 5, 2014, 1:39 p.m. OK GNU C++0x TESTS 73 124 5427200 2000
8141754 marat.snowbear D Oct. 8, 2014, 3:13 p.m. OK GNU C++0x TESTS 73 124 8601600 2000
8091654 problem-solved D Oct. 5, 2014, 2:12 p.m. OK GNU C++0x TESTS 73 124 10240000 2000
8469340 EarlOfDitches D Oct. 29, 2014, 12:56 p.m. OK GNU C++0x TESTS 73 139 8192000 2000
8090588 PavelKunyavskiy D Oct. 5, 2014, 1:54 p.m. OK GNU C++0x TESTS 73 140 7577600 2000
8105712 LHiC D Oct. 6, 2014, 12:21 p.m. OK GNU C++0x TESTS 73 140 7987200 2000
8095257 marat.snowbear D Oct. 5, 2014, 3:30 p.m. OK GNU C++0x TESTS 73 140 8601600 2000
8094338 persianpars D Oct. 5, 2014, 3:08 p.m. OK GNU C++0x TESTS 73 140 11264000 2000
57864867 rainboy D July 27, 2019, 8:15 p.m. OK GNU C11 TESTS 73 936 48128000 2000
52932483 vjudge2 D April 18, 2019, 3:40 a.m. OK GNU C++11 TESTS 73 46 25395200 2000
40987818 ReaLNero1 D July 30, 2018, 9:31 p.m. OK GNU C++11 TESTS 73 62 84480000 2000
37435746 hhhjhy D April 18, 2018, 12:27 p.m. OK GNU C++11 TESTS 73 62 88268800 2000
13873860 IzumiKonata D Oct. 26, 2015, 2:12 p.m. OK GNU C++11 TESTS 73 77 9011200 2000
58498305 luogu_bot3 D Aug. 9, 2019, 1:07 p.m. OK GNU C++11 TESTS 73 93 20070400 2000
67595962 luogu_bot3 D Dec. 25, 2019, 10:39 a.m. OK GNU C++11 TESTS 73 93 105881600 2000
28626378 Saramanda D July 17, 2017, 4:43 a.m. OK GNU C++11 TESTS 73 108 7372800 2000
43693558 vjudge4 D Oct. 2, 2018, 3:26 p.m. OK GNU C++11 TESTS 73 124 8089600 2000
56642589 Darkmastergat D July 7, 2019, 3:21 a.m. OK GNU C++11 TESTS 73 124 8499200 2000
56706753 luogu_bot4 D July 8, 2019, 11:20 a.m. OK GNU C++11 TESTS 73 124 8499200 2000
60213539 rohan_vora D Sept. 7, 2019, 11 a.m. OK GNU C++14 TESTS 73 62 25497600 2000
61397563 deepwork D Sept. 28, 2019, 3:18 a.m. OK GNU C++14 TESTS 73 124 8294400 2000
50428174 danya.smelskiy D Feb. 24, 2019, 12:38 p.m. OK GNU C++14 TESTS 73 139 8294400 2000
58402485 Anachor D Aug. 6, 2019, 6:30 p.m. OK GNU C++14 TESTS 73 139 8294400 2000
56952962 xuzhifang D July 13, 2019, 3:03 a.m. OK GNU C++14 TESTS 73 140 4198400 2000
40854340 vjudge2 D July 27, 2018, 4:23 p.m. OK GNU C++14 TESTS 73 156 9011200 2000
40172512 vjudge2 D July 10, 2018, 1:12 p.m. OK GNU C++14 TESTS 73 156 9011200 2000
40172475 vjudge5 D July 10, 2018, 1:11 p.m. OK GNU C++14 TESTS 73 156 9011200 2000
53308652 vjudge4 D April 26, 2019, 4:51 a.m. OK GNU C++14 TESTS 73 156 9011200 2000
36418076 Fischer D March 19, 2018, 6:12 p.m. OK GNU C++14 TESTS 73 156 11980800 2000
43410930 DZYO D Sept. 25, 2018, 1:26 p.m. OK GNU C++17 TESTS 73 93 8601600 2000
63750058 Gajowy D Oct. 29, 2019, 7:54 p.m. OK GNU C++17 TESTS 73 140 7577600 2000
50204321 vjudge4 D Feb. 19, 2019, 6:31 p.m. OK GNU C++17 TESTS 73 140 8806400 2000
58334541 vjudge1 D Aug. 5, 2019, 10:56 a.m. OK GNU C++17 TESTS 73 155 4608000 2000
40174180 vjudge3 D July 10, 2018, 2:04 p.m. OK GNU C++17 TESTS 73 155 9011200 2000
60198238 ST_C D Sept. 7, 2019, 3:26 a.m. OK GNU C++17 TESTS 73 155 10547200 2000
61298214 vjudge4 D Sept. 26, 2019, 3:07 a.m. OK GNU C++17 TESTS 73 171 8704000 2000
66036547 vjudge5 D Nov. 30, 2019, 11:59 a.m. OK GNU C++17 TESTS 73 171 9011200 2000
56881665 vjudge4 D July 12, 2019, 10:43 a.m. OK GNU C++17 TESTS 73 171 9420800 2000
56961365 vjudge3 D July 13, 2019, 6:44 a.m. OK GNU C++17 TESTS 73 171 9420800 2000
8133509 cojna D Oct. 7, 2014, 5:36 p.m. OK Haskell TESTS 73 280 10342400 2000
68669447 TheSawan D Jan. 12, 2020, 4:20 p.m. OK Java 11 TESTS 73 405 921600 2000
67859322 ZeyadKhattab D Dec. 29, 2019, 7:27 a.m. OK Java 11 TESTS 73 639 11776000 2000
68668519 TheSawan D Jan. 12, 2020, 4 p.m. OK Java 11 TESTS 73 701 16793600 2000
69897603 DATVN D Jan. 31, 2020, 12:11 p.m. OK Java 11 TESTS 73 1045 16691200 2000
8125816 meijun D Oct. 7, 2014, 4:57 a.m. OK Java 6 TESTS 73 405 102400 2000
8125840 meijun D Oct. 7, 2014, 4:59 a.m. OK Java 6 TESTS 73 421 102400 2000
8125795 meijun D Oct. 7, 2014, 4:54 a.m. OK Java 6 TESTS 73 436 102400 2000
8706687 suigingin D Nov. 15, 2014, 8:06 p.m. OK Java 6 TESTS 73 467 102400 2000
8706792 suigingin D Nov. 15, 2014, 8:21 p.m. OK Java 6 TESTS 73 483 102400 2000
9336276 xiaowuc1 D Jan. 1, 2015, 1:41 a.m. OK Java 6 TESTS 73 499 0 2000
8274997 van_Kalsing D Oct. 17, 2014, 1:55 a.m. OK Java 6 TESTS 73 592 102400 2000
8125825 meijun D Oct. 7, 2014, 4:58 a.m. OK Java 6 TESTS 73 608 102400 2000
8091193 lgsmitty D Oct. 5, 2014, 2:04 p.m. OK Java 6 TESTS 73 608 33587200 2000
8125834 meijun D Oct. 7, 2014, 4:59 a.m. OK Java 6 TESTS 73 655 102400 2000
8101664 wistful23 D Oct. 6, 2014, 5:26 a.m. OK Java 7 TESTS 73 218 0 2000
8095057 stolis D Oct. 5, 2014, 3:25 p.m. OK Java 7 TESTS 73 358 0 2000
8086918 tanzaku D Oct. 5, 2014, 1:17 p.m. OK Java 7 TESTS 73 389 12697600 2000
8098217 dusty.and.rusty D Oct. 5, 2014, 5:55 p.m. OK Java 7 TESTS 73 421 921600 2000
11380144 suigingin D June 1, 2015, 2:40 p.m. OK Java 7 TESTS 73 451 0 2000
12008254 nguyenmanhphuc D July 11, 2015, 12:32 p.m. OK Java 7 TESTS 73 452 0 2000
8867168 alibaba D Nov. 27, 2014, 8:07 a.m. OK Java 7 TESTS 73 452 102400 2000
8092165 qwerty787788 D Oct. 5, 2014, 2:23 p.m. OK Java 7 TESTS 73 467 21196800 2000
8091780 NaoMeir D Oct. 5, 2014, 2:15 p.m. OK Java 7 TESTS 73 468 8192000 2000
8093003 mukku D Oct. 5, 2014, 2:39 p.m. OK Java 7 TESTS 73 499 12902400 2000
43424619 hongquanntct D Sept. 25, 2018, 7:18 p.m. OK Java 8 TESTS 73 436 6246400 2000
43424450 hongquanntct D Sept. 25, 2018, 7:11 p.m. OK Java 8 TESTS 73 436 6246400 2000
29369661 nishank.suresh nishanthta bhishma D Aug. 12, 2017, 6:02 a.m. OK Java 8 TESTS 73 436 27750400 2000
12741223 upsolving D Aug. 29, 2015, 9:28 a.m. OK Java 8 TESTS 73 483 23040000 2000
12741193 upsolving D Aug. 29, 2015, 9:26 a.m. OK Java 8 TESTS 73 483 23040000 2000
34574167 prabhat236218 D Jan. 26, 2018, 11:45 a.m. OK Java 8 TESTS 73 483 109670400 2000
53908251 mennafadali D May 9, 2019, 1:58 p.m. OK Java 8 TESTS 73 514 84172800 2000
16542676 ATailouloute D March 5, 2016, 11:14 p.m. OK Java 8 TESTS 73 529 0 2000
35757266 KT_13 D Feb. 27, 2018, 9:43 a.m. OK Java 8 TESTS 73 545 32972800 2000
27227069 Maulik_Patel D May 20, 2017, 3:04 a.m. OK Java 8 TESTS 73 561 0 2000
14243964 lpm D Nov. 13, 2015, 8:14 p.m. OK MS C# TESTS 73 280 22323200 2000
25426249 og.kostya D March 12, 2017, 7:16 a.m. OK MS C# TESTS 73 327 20889600 2000
8093269 camypaper D Oct. 5, 2014, 2:44 p.m. OK MS C# TESTS 73 811 31334400 2000
9400772 Cherish D Jan. 11, 2015, 3:24 a.m. OK MS C# TESTS 73 857 31232000 2000
8090540 Xiaodongdong D Oct. 5, 2014, 1:53 p.m. OK MS C++ TESTS 73 124 5734400 2000
53017444 vjudge3 D April 19, 2019, 2:49 p.m. OK MS C++ TESTS 73 140 24166400 2000
10553225 AleksanderBalobanov D April 2, 2015, 4:59 p.m. OK MS C++ TESTS 73 155 6041600 2000
8093021 Timur_Sitdikov D Oct. 5, 2014, 2:40 p.m. OK MS C++ TESTS 73 156 7270400 2000
52462118 vjudge1 D April 7, 2019, 1:53 p.m. OK MS C++ TESTS 73 156 24166400 2000
8093374 yokozuna57 D Oct. 5, 2014, 2:47 p.m. OK MS C++ TESTS 73 171 5324800 2000
53053480 vjudge5 D April 20, 2019, 3:55 p.m. OK MS C++ TESTS 73 171 9728000 2000
8091771 Kmcode D Oct. 5, 2014, 2:15 p.m. OK MS C++ TESTS 73 171 32153600 2000
8097377 messyidea D Oct. 5, 2014, 5:04 p.m. OK MS C++ TESTS 73 171 97382400 2000
52732897 vjudge3 D April 14, 2019, 4:58 a.m. OK MS C++ TESTS 73 186 9728000 2000
62523005 pyduper D Oct. 13, 2019, 4:20 p.m. OK PyPy 3 TESTS 73 702 14745600 2000
8102348 limed D Oct. 6, 2014, 7:16 a.m. OK Scala TESTS 73 1996 163328000 2000

remove filters

Back to search problems