Yandex.Algorithm 2011: Round 2

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
86 Yandex.Algorithm 2011: Round 2 FINISHED False 7200 431362187 May 22, 2011, 3:10 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14193 ) D Powerful array PROGRAMMING data structures implementation math two pointers 2700

B'An array of positive integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an is given. Let us consider its arbitrary subarray al, xe2 x80 x89al xe2 x80 x89+ xe2 x80 x891..., xe2 x80 x89ar, where 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. For every positive integer s denote by Ks the number of occurrences of s into the subarray. We call the power of the subarray the sum of products Ks xc2 xb7Ks xc2 xb7s for every positive integer s. The sum contains only finite number of nonzero summands as the number of different values in the array is indeed finite. You should calculate the power of t given subarrays. First line contains two integers n and t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200000) -- the array length and the number of queries correspondingly. Second line contains n positive integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- the elements of the array. Next t lines contain two positive integers l, r (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) each -- the indices of the left and the right ends of the corresponding subarray. Output t lines, the i-th line of the output should contain single positive integer -- the power of the i-th query subarray. Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preferred to use cout stream (also you may use %I64d). Consider the following array (see the second sample) and its [2, 7] subarray (elements of the subarray are colored): '...

Tutorials

Problemset analysis (Yandex, Round 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
1386393 Furko D March 22, 2012, 8:34 a.m. OK Delphi TESTS 69 2640 12492800 2700
469042 MrJigan1488 D May 24, 2011, 9:14 a.m. OK Delphi TESTS 69 2640 17715200 2700
466535 tourist D May 22, 2011, 3:38 p.m. OK Delphi TESTS 69 2700 17715200 2700
1386399 Furko D March 22, 2012, 8:36 a.m. OK Delphi TESTS 69 3090 12492800 2700
1386248 M0sTik D March 22, 2012, 7:10 a.m. OK Delphi TESTS 69 3390 54988800 2700
18046687 gustavosm D May 23, 2016, 5:35 p.m. OK Delphi TESTS 69 3430 19558400 2700
32451676 thchuan2001 D Nov. 19, 2017, 8:50 a.m. OK Delphi TESTS 69 3432 19353600 2700
931949 Rubanenko D Dec. 5, 2011, 7:31 p.m. OK Delphi TESTS 69 4280 19353600 2700
469751 coolinging D May 25, 2011, 9:14 a.m. OK Delphi TESTS 69 4310 27340800 2700
468424 laiguokun D May 23, 2011, 1:17 p.m. OK Delphi TESTS 69 4310 27340800 2700
4393918 dimad D Sept. 1, 2013, 3:54 p.m. OK FPC TESTS 69 1340 12390400 2700
4393943 dimad D Sept. 1, 2013, 3:57 p.m. OK FPC TESTS 69 1434 12390400 2700
4393926 dimad D Sept. 1, 2013, 3:55 p.m. OK FPC TESTS 69 1434 12390400 2700
4393922 dimad D Sept. 1, 2013, 3:54 p.m. OK FPC TESTS 69 1434 12390400 2700
4393931 dimad D Sept. 1, 2013, 3:56 p.m. OK FPC TESTS 69 1528 12390400 2700
543330 vlad107 D July 12, 2011, 2:32 p.m. OK FPC TESTS 69 1640 11468800 2700
12440990 nielswiles D Aug. 10, 2015, 3:57 p.m. OK FPC TESTS 69 1778 8806400 2700
4393905 dimad D Sept. 1, 2013, 3:51 p.m. OK FPC TESTS 69 1778 12390400 2700
1030319 suanrong D Jan. 12, 2012, 2:18 a.m. OK FPC TESTS 69 1940 13824000 2700
11271677 Amr_Hassan D May 25, 2015, 11:21 p.m. OK FPC TESTS 69 2026 12390400 2700
6096326 sdlzx D March 21, 2014, 4:57 a.m. OK GNU C TESTS 69 904 9625600 2700
6096375 sdlzx D March 21, 2014, 5:10 a.m. OK GNU C TESTS 69 936 9625600 2700
22199307 orailly D Nov. 13, 2016, 8:13 p.m. OK GNU C TESTS 69 966 9625600 2700
6096377 sdlzx D March 21, 2014, 5:10 a.m. OK GNU C TESTS 69 966 9625600 2700
22199545 orailly D Nov. 13, 2016, 8:38 p.m. OK GNU C TESTS 69 998 9625600 2700
6096319 sdlzx D March 21, 2014, 4:55 a.m. OK GNU C TESTS 69 998 9625600 2700
21699346 orailly D Oct. 23, 2016, 6:29 a.m. OK GNU C TESTS 69 1028 9625600 2700
6096381 sdlzx D March 21, 2014, 5:11 a.m. OK GNU C TESTS 69 1028 9625600 2700
6096311 sdlzx D March 21, 2014, 4:52 a.m. OK GNU C TESTS 69 1060 9625600 2700
6096374 sdlzx D March 21, 2014, 5:09 a.m. OK GNU C TESTS 69 1092 9625600 2700
35662597 csegura D Feb. 24, 2018, 10:04 p.m. OK GNU C++ TESTS 69 778 32153600 2700
35662570 csegura D Feb. 24, 2018, 10:02 p.m. OK GNU C++ TESTS 69 778 32153600 2700
35662550 csegura D Feb. 24, 2018, 10:01 p.m. OK GNU C++ TESTS 69 778 32153600 2700
611264 Shik D Aug. 14, 2011, 6:13 p.m. OK GNU C++ TESTS 69 860 10137600 2700
611249 Shik D Aug. 14, 2011, 6 p.m. OK GNU C++ TESTS 69 880 10137600 2700
4919531 mickeyandkaka D Oct. 28, 2013, 1 p.m. OK GNU C++ TESTS 69 904 9625600 2700
6097951 poursoul D March 21, 2014, 11:12 a.m. OK GNU C++ TESTS 69 904 9625600 2700
6097925 poursoul D March 21, 2014, 11:09 a.m. OK GNU C++ TESTS 69 934 9625600 2700
6097763 poursoul D March 21, 2014, 10:44 a.m. OK GNU C++ TESTS 69 936 9625600 2700
1970247 darknsux D Aug. 2, 2012, 7:58 a.m. OK GNU C++ TESTS 69 950 7884800 2700
5959572 mruxim D March 7, 2014, 10:07 p.m. OK GNU C++0x TESTS 69 998 8806400 2700
5959554 mruxim D March 7, 2014, 10:01 p.m. OK GNU C++0x TESTS 69 998 8806400 2700
5959566 mruxim D March 7, 2014, 10:05 p.m. OK GNU C++0x TESTS 69 1028 8806400 2700
5959564 mruxim D March 7, 2014, 10:04 p.m. OK GNU C++0x TESTS 69 1092 8806400 2700
9729374 ko_osaga D Feb. 5, 2015, 4:02 p.m. OK GNU C++0x TESTS 69 1310 8601600 2700
904095 ztk D Nov. 25, 2011, 10:15 p.m. OK GNU C++0x TESTS 69 1310 11059200 2700
904091 ztk D Nov. 25, 2011, 10:14 p.m. OK GNU C++0x TESTS 69 1330 11059200 2700
904093 ztk D Nov. 25, 2011, 10:14 p.m. OK GNU C++0x TESTS 69 1390 11059200 2700
9559904 olage D Jan. 26, 2015, 12:27 p.m. OK GNU C++0x TESTS 69 1402 9625600 2700
9560772 olage D Jan. 26, 2015, 1:41 p.m. OK GNU C++0x TESTS 69 1464 9625600 2700
21699427 orailly D Oct. 23, 2016, 6:34 a.m. OK GNU C11 TESTS 69 780 9625600 2700
22197213 orailly D Nov. 13, 2016, 5:27 p.m. OK GNU C11 TESTS 69 934 9625600 2700
22197518 orailly D Nov. 13, 2016, 5:48 p.m. OK GNU C11 TESTS 69 966 9625600 2700
22197428 orailly D Nov. 13, 2016, 5:41 p.m. OK GNU C11 TESTS 69 966 9625600 2700
22197540 orailly D Nov. 13, 2016, 5:49 p.m. OK GNU C11 TESTS 69 998 9625600 2700
22197863 orailly D Nov. 13, 2016, 6:13 p.m. OK GNU C11 TESTS 69 1028 9625600 2700
22197810 orailly D Nov. 13, 2016, 6:10 p.m. OK GNU C11 TESTS 69 1028 9625600 2700
22197239 orailly D Nov. 13, 2016, 5:29 p.m. OK GNU C11 TESTS 69 1058 9625600 2700
21699321 orailly D Oct. 23, 2016, 6:28 a.m. OK GNU C11 TESTS 69 1090 9625600 2700
22197405 orailly D Nov. 13, 2016, 5:39 p.m. OK GNU C11 TESTS 69 1122 9625600 2700
40992676 ReaLNero1 D July 31, 2018, 1:29 a.m. OK GNU C++11 TESTS 69 530 33075200 2700
66170697 yan-zp D Dec. 2, 2019, 10:13 a.m. OK GNU C++11 TESTS 69 592 9625600 2700
49657608 LudwigVanBeethoven D Feb. 9, 2019, 10:46 a.m. OK GNU C++11 TESTS 69 622 11264000 2700
57790205 swust_SpongeBob_Y D July 26, 2019, 9:10 a.m. OK GNU C++11 TESTS 69 622 13619200 2700
48517784 hovny D Jan. 18, 2019, 5:25 a.m. OK GNU C++11 TESTS 69 622 43212800 2700
48520010 hovny D Jan. 18, 2019, 6:17 a.m. OK GNU C++11 TESTS 69 622 43212800 2700
48517989 hovny D Jan. 18, 2019, 5:31 a.m. OK GNU C++11 TESTS 69 622 43212800 2700
54439904 luogu_bot3 D May 21, 2019, 8:03 a.m. OK GNU C++11 TESTS 69 624 8601600 2700
66169961 yan-zp D Dec. 2, 2019, 9:48 a.m. OK GNU C++11 TESTS 69 624 9625600 2700
46585253 sprinkles_ D Dec. 4, 2018, 12:58 p.m. OK GNU C++11 TESTS 69 624 9625600 2700
65715555 dsim D Nov. 25, 2019, 4:24 p.m. OK GNU C++14 TESTS 69 434 15155200 2700
65715480 dsim D Nov. 25, 2019, 4:22 p.m. OK GNU C++14 TESTS 69 436 15155200 2700
59398932 vjudge1 D Aug. 24, 2019, 11:23 a.m. OK GNU C++14 TESTS 69 436 18329600 2700
46354337 neal D Nov. 29, 2018, 7:19 a.m. OK GNU C++14 TESTS 69 436 18329600 2700
46180414 neal D Nov. 24, 2018, 5:34 p.m. OK GNU C++14 TESTS 69 466 18329600 2700
46181646 neal D Nov. 24, 2018, 6:19 p.m. OK GNU C++14 TESTS 69 496 18329600 2700
46180144 neal D Nov. 24, 2018, 5:24 p.m. OK GNU C++14 TESTS 69 654 18329600 2700
29616256 ovis96 D Aug. 20, 2017, 8:34 a.m. OK GNU C++14 TESTS 69 748 13414400 2700
66168945 yan-zp D Dec. 2, 2019, 9:15 a.m. OK GNU C++14 TESTS 69 748 43212800 2700
29602701 vjudge2 D Aug. 19, 2017, 3:47 p.m. OK GNU C++14 TESTS 69 778 13414400 2700
59399030 vjudge4 D Aug. 24, 2019, 11:25 a.m. OK GNU C++17 TESTS 69 466 18329600 2700
58186991 neal D Aug. 2, 2019, 5:35 p.m. OK GNU C++17 TESTS 69 468 18329600 2700
38866961 OO_I_LOVE_YZQ__OO D June 1, 2018, 9:01 p.m. OK GNU C++17 TESTS 69 778 19251200 2700
41603419 Artmat D Aug. 14, 2018, 10:43 p.m. OK GNU C++17 TESTS 69 778 25497600 2700
57352076 vjudge2 D July 20, 2019, 4:20 a.m. OK GNU C++17 TESTS 69 810 9932800 2700
41603462 Artmat D Aug. 14, 2018, 10:46 p.m. OK GNU C++17 TESTS 69 810 25497600 2700
41603347 Artmat D Aug. 14, 2018, 10:36 p.m. OK GNU C++17 TESTS 69 842 27955200 2700
58326384 m8.pie D Aug. 5, 2019, 7:55 a.m. OK GNU C++17 TESTS 69 872 8806400 2700
66469092 TiK4_Descent D Dec. 7, 2019, 5:39 p.m. OK GNU C++17 TESTS 69 872 9830400 2700
51317990 xsot D March 15, 2019, 2:53 a.m. OK GNU C++17 TESTS 69 872 10444800 2700
50793256 cojna D March 4, 2019, 4:53 p.m. OK Haskell TESTS 69 3150 20070400 2700
50792087 cojna D March 4, 2019, 4:15 p.m. OK Haskell TESTS 69 3336 31436800 2700
37493210 cojna D April 20, 2018, 4:39 p.m. OK Haskell TESTS 69 4460 92160000 2700
37570769 cojna D April 24, 2018, 11:35 a.m. OK Haskell TESTS 69 4584 71168000 2700
37564177 cojna D April 24, 2018, 5:41 a.m. OK Haskell TESTS 69 4648 72294400 2700
37588231 cojna D April 25, 2018, 5:32 a.m. OK Haskell TESTS 69 4834 72806400 2700
37535672 cojna D April 22, 2018, 2:48 p.m. OK Haskell TESTS 69 4898 83353600 2700
467268 Petr D May 22, 2011, 4:58 p.m. OK Java 6 TESTS 69 2140 39321600 2700
3080818 m.radwan D Feb. 7, 2013, 12:14 p.m. OK Java 6 TESTS 69 2718 18636800 2700
468466 goo.gl_SsAhv D May 23, 2011, 2:35 p.m. OK Java 6 TESTS 69 2950 55091200 2700
474100 uwi D June 1, 2011, 4:55 p.m. OK Java 6 TESTS 69 2970 43622400 2700
2413145 Slamur D Oct. 22, 2012, 7:34 p.m. OK Java 6 TESTS 69 3562 9523200 2700
2413155 Slamur D Oct. 22, 2012, 7:37 p.m. OK Java 6 TESTS 69 3593 9420800 2700
2415720 Slamur D Oct. 23, 2012, 4:55 a.m. OK Java 6 TESTS 69 3734 9523200 2700
2415711 Slamur D Oct. 23, 2012, 4:52 a.m. OK Java 6 TESTS 69 4187 9523200 2700
1991384 wackloner D Aug. 7, 2012, 6:48 p.m. OK Java 6 TESTS 69 4330 51916800 2700
8216722 karan173 D Oct. 13, 2014, 10:04 a.m. OK Java 6 TESTS 69 4336 12595200 2700
1974306 mmaxio D Aug. 3, 2012, 5:23 p.m. OK Java 7 TESTS 69 1980 48332800 2700
6101286 PlayLikeNeverB4 D March 22, 2014, 12:02 a.m. OK Java 7 TESTS 69 2338 14336000 2700
10668700 Sumeet.Varma D April 12, 2015, 3:09 p.m. OK Java 7 TESTS 69 2682 12083200 2700
6101294 PlayLikeNeverB4 D March 22, 2014, 12:04 a.m. OK Java 7 TESTS 69 2868 14336000 2700
11118012 peter31415 D May 16, 2015, 2:34 p.m. OK Java 7 TESTS 69 2900 18841600 2700
9744010 Klein D Feb. 7, 2015, 10:42 a.m. OK Java 7 TESTS 69 2962 0 2700
11900706 HitmanBBa D July 2, 2015, 5:40 p.m. OK Java 7 TESTS 69 3182 17510400 2700
10306780 maitony D March 17, 2015, 4:01 a.m. OK Java 7 TESTS 69 3242 11468800 2700
12706562 anandpatel9998 D Aug. 26, 2015, 10:53 a.m. OK Java 7 TESTS 69 3992 1228800 2700
12320599 alibaba D Aug. 3, 2015, 3:52 a.m. OK Java 7 TESTS 69 4054 409600 2700
46854784 aman28rwt D Dec. 10, 2018, 2:11 p.m. OK Java 8 TESTS 69 1370 14028800 2700
58524636 derrick20 D Aug. 10, 2019, 6:34 a.m. OK Java 8 TESTS 69 1838 7782400 2700
50598502 niteshgowda D Feb. 28, 2019, 11:36 a.m. OK Java 8 TESTS 69 1902 12288000 2700
46854940 aman28rwt D Dec. 10, 2018, 2:16 p.m. OK Java 8 TESTS 69 1932 5120000 2700
46654560 Azuz D Dec. 5, 2018, 3:38 p.m. OK Java 8 TESTS 69 1964 5529600 2700
46362776 aminul D Nov. 29, 2018, 11:55 a.m. OK Java 8 TESTS 69 1964 9830400 2700
68032360 StayAwayFromBitches D Jan. 1, 2020, 10:02 a.m. OK Java 8 TESTS 69 1996 20172800 2700
27629470 uwi D June 7, 2017, 9:31 a.m. OK Java 8 TESTS 69 2026 9625600 2700
58524614 derrick20 D Aug. 10, 2019, 6:34 a.m. OK Java 8 TESTS 69 2152 7782400 2700
58524728 derrick20 D Aug. 10, 2019, 6:36 a.m. OK Java 8 TESTS 69 2182 7782400 2700
37258113 nixmulta D April 12, 2018, 6:07 p.m. OK Mono C# TESTS 69 3212 46899200 2700
20997318 eitaho D Sept. 29, 2016, 4:01 p.m. OK Mono C# TESTS 69 3368 33075200 2700
37258060 nixmulta D April 12, 2018, 6:03 p.m. OK Mono C# TESTS 69 3398 46899200 2700
45131504 tattosha_aptan D Oct. 31, 2018, 10:34 a.m. OK Mono C# TESTS 69 3400 30310400 2700
64549632 m1_k3 D Nov. 8, 2019, 9:58 p.m. OK Mono C# TESTS 69 3680 34406400 2700
20997169 eitaho D Sept. 29, 2016, 3:54 p.m. OK Mono C# TESTS 69 3742 29491200 2700
51891107 nemars D March 27, 2019, 9:10 a.m. OK Mono C# TESTS 69 4616 37683200 2700
59964683 androfont D Sept. 3, 2019, 7:46 p.m. OK Mono C# TESTS 69 4648 40550400 2700
15579698 og.kostya D Jan. 25, 2016, 6:06 p.m. OK MS C# TESTS 69 4024 19148800 2700
15682593 Beresta D Jan. 30, 2016, 5:01 p.m. OK MS C# TESTS 69 4366 23040000 2700
15682479 Beresta D Jan. 30, 2016, 4:54 p.m. OK MS C# TESTS 69 4646 24166400 2700
11259831 sammyMaX D May 25, 2015, 2:04 a.m. OK MS C# TESTS 69 4990 30003200 2700
11259697 sammyMaX D May 25, 2015, 1:40 a.m. OK MS C# TESTS 69 4992 30720000 2700
1202548 NuM D Feb. 18, 2012, 10:09 p.m. OK MS C++ TESTS 69 840 15052800 2700
1202543 NuM D Feb. 18, 2012, 10:06 p.m. OK MS C++ TESTS 69 840 15052800 2700
1202544 NuM D Feb. 18, 2012, 10:07 p.m. OK MS C++ TESTS 69 860 15052800 2700
1202542 NuM D Feb. 18, 2012, 10:05 p.m. OK MS C++ TESTS 69 860 15052800 2700
1202540 NuM D Feb. 18, 2012, 10:02 p.m. OK MS C++ TESTS 69 860 15052800 2700
1202546 NuM D Feb. 18, 2012, 10:09 p.m. OK MS C++ TESTS 69 880 15052800 2700
1202541 NuM D Feb. 18, 2012, 10:04 p.m. OK MS C++ TESTS 69 910 15052800 2700
1202545 NuM D Feb. 18, 2012, 10:08 p.m. OK MS C++ TESTS 69 920 15052800 2700
1202513 NuM D Feb. 18, 2012, 9:36 p.m. OK MS C++ TESTS 69 940 11059200 2700
466904 Vedensky D May 22, 2011, 4:17 p.m. OK MS C++ TESTS 69 1060 12595200 2700
58516827 vjudge2 D Aug. 10, 2019, 12:52 a.m. OK MS C++ 2017 TESTS 69 1372 32051200 2700
58340729 vjudge2 D Aug. 5, 2019, 1:07 p.m. OK MS C++ 2017 TESTS 69 1496 32051200 2700
58336014 vjudge2 D Aug. 5, 2019, 11:30 a.m. OK MS C++ 2017 TESTS 69 2028 13619200 2700
68699027 vjudge5 D Jan. 13, 2020, 8:51 a.m. OK MS C++ 2017 TESTS 69 2088 52940800 2700
58331877 vjudge3 D Aug. 5, 2019, 9:43 a.m. OK MS C++ 2017 TESTS 69 2090 15257600 2700
58331148 vjudge3 D Aug. 5, 2019, 9:26 a.m. OK MS C++ 2017 TESTS 69 2152 13619200 2700
58337211 vjudge5 D Aug. 5, 2019, 11:55 a.m. OK MS C++ 2017 TESTS 69 2182 13619200 2700
62237019 Sanqer D Oct. 9, 2019, 11:24 p.m. OK MS C++ 2017 TESTS 69 2214 11059200 2700
54981631 goshantir D June 2, 2019, 1:27 p.m. OK MS C++ 2017 TESTS 69 2246 8806400 2700
58332501 vjudge1 D Aug. 5, 2019, 10 a.m. OK MS C++ 2017 TESTS 69 2276 15257600 2700
37598479 cojna D April 25, 2018, 1:25 p.m. OK Rust TESTS 69 1902 16896000 2700
65439753 tuna_salad D Nov. 20, 2019, 1:58 p.m. OK Rust TESTS 69 3930 22835200 2700
35895229 vjudge4 D March 3, 2018, 4:38 p.m. OK Rust TESTS 69 4398 16588800 2700
35895268 suibaka D March 3, 2018, 4:40 p.m. OK Rust TESTS 69 4960 16588800 2700

remove filters

Back to search problems