Codeforces Round 136 (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
220 Codeforces Round 136 (Div. 1) FINISHED False 7200 391012187 Aug. 31, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10631 ) B Little Elephant and Array PROGRAMMING constructive algorithms data structures 1900

B"The Little Elephant loves playing with arrays. He has array a, consisting of n positive integers, indexed from 1 to n. Let's denote the number with index i as ai. Additionally the Little Elephant has m queries to the array, each query is characterised by a pair of integers lj and rj (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89lj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89rj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). For each query lj, xe2 x80 x89rj the Little Elephant has to count, how many numbers x exist, such that number x occurs exactly x times among numbers alj, xe2 x80 x89alj xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89..., xe2 x80 x89arj. Help the Little Elephant to count the answers to all queries. The first line contains two space-separated integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the size of array a and the number of queries to it. The next line contains n space-separated positive integers a1, a2, ..., an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Next m lines contain descriptions of queries, one per line. The j-th of these lines contains the description of the j-th query as two space-separated integers lj and rj (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89lj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89rj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). In m lines print m integers -- the answers to the queries. The j-th line should contain the answer to the j-th query."...

Tutorials

Codeforces Round #136 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2108135 Oryshych B Sept. 10, 2012, 7:57 a.m. OK Delphi TESTS 33 190 15052800 1900
2076734 Rubanenko B Aug. 31, 2012, 4:06 p.m. OK Delphi TESTS 33 200 11673600 1900
3233365 turkmen B March 3, 2013, 8:03 a.m. OK Delphi TESTS 33 250 163123200 1900
2075183 Furko B Aug. 31, 2012, 3:51 p.m. OK Delphi TESTS 33 270 20889600 1900
2078859 IgorL B Aug. 31, 2012, 4:32 p.m. OK Delphi TESTS 33 330 210534400 1900
2108931 TarasSavitskyi B Sept. 10, 2012, 1:55 p.m. OK Delphi TESTS 33 330 211046400 1900
2103579 d40a B Sept. 8, 2012, 7:46 a.m. OK Delphi TESTS 33 390 13721600 1900
2353199 KaiZeR B Oct. 12, 2012, 7:22 p.m. OK Delphi TESTS 33 406 181555200 1900
2864025 Misha100896 B Jan. 1, 2013, 3:14 p.m. OK Delphi TESTS 33 437 2457600 1900
2095493 AleksanderBalobanov B Sept. 4, 2012, 3:27 p.m. OK Delphi TESTS 33 515 11366400 1900
2789154 laoriu B Dec. 18, 2012, 1:46 a.m. OK FPC TESTS 33 109 5222400 1900
2789354 cold_desert12 B Dec. 18, 2012, 3:27 a.m. OK FPC TESTS 33 109 7577600 1900
2791029 acerpbc B Dec. 18, 2012, 2:07 p.m. OK FPC TESTS 33 125 4403200 1900
2085840 ptnk304 B Sept. 1, 2012, 5:29 a.m. OK FPC TESTS 33 130 8192000 1900
2095600 giongto35 B Sept. 4, 2012, 4:42 p.m. OK FPC TESTS 33 140 7884800 1900
2095373 giongto35 B Sept. 4, 2012, 2:09 p.m. OK FPC TESTS 33 140 7884800 1900
2095370 giongto35 B Sept. 4, 2012, 2:06 p.m. OK FPC TESTS 33 140 7884800 1900
2095591 giongto35 B Sept. 4, 2012, 4:38 p.m. OK FPC TESTS 33 140 13414400 1900
2095394 giongto35 B Sept. 4, 2012, 2:18 p.m. OK FPC TESTS 33 140 13414400 1900
2095388 giongto35 B Sept. 4, 2012, 2:14 p.m. OK FPC TESTS 33 140 13414400 1900
14268452 forlfs B Nov. 15, 2015, 12:09 p.m. OK GNU C TESTS 33 108 6348800 1900
27011296 reyad B May 11, 2017, 11:44 a.m. OK GNU C TESTS 33 265 3276800 1900
2084221 karan173 B Aug. 31, 2012, 7:56 p.m. OK GNU C TESTS 33 480 3174400 1900
2636281 hariprasath B Nov. 24, 2012, 8:05 a.m. OK GNU C TESTS 33 2437 205414400 1900
2100985 pedja B Sept. 6, 2012, 5:36 p.m. OK GNU C TESTS 33 2718 206131200 1900
2100837 pedja B Sept. 6, 2012, 4:28 p.m. OK GNU C TESTS 33 2843 206131200 1900
2100954 pedja B Sept. 6, 2012, 5:26 p.m. OK GNU C TESTS 33 3031 206131200 1900
2100947 pedja B Sept. 6, 2012, 5:21 p.m. OK GNU C TESTS 33 3062 206131200 1900
2100842 pedja B Sept. 6, 2012, 4:30 p.m. OK GNU C TESTS 33 3140 206131200 1900
2100899 pedja B Sept. 6, 2012, 4:58 p.m. OK GNU C TESTS 33 3171 206131200 1900
14869830 Lightning34 B Dec. 19, 2015, 2:42 a.m. OK GNU C++ TESTS 33 61 4403200 1900
40990805 ReaLNero1 B July 31, 2018, 12:13 a.m. OK GNU C++ TESTS 33 61 8294400 1900
2264469 trunghieu11 B Sept. 28, 2012, 3:14 a.m. OK GNU C++ TESTS 33 62 4812800 1900
8420911 Altria-PenDragon B Oct. 26, 2014, 2:32 p.m. OK GNU C++ TESTS 33 77 5222400 1900
11273550 Amr_Hassan B May 26, 2015, 5:19 a.m. OK GNU C++ TESTS 33 78 4403200 1900
14320083 dhuacm5 B Nov. 18, 2015, 3:02 a.m. OK GNU C++ TESTS 33 78 4710400 1900
14320041 handoku B Nov. 18, 2015, 2:55 a.m. OK GNU C++ TESTS 33 78 4710400 1900
14314470 handoku B Nov. 17, 2015, 2:53 p.m. OK GNU C++ TESTS 33 78 4710400 1900
10601364 vjudge5 B April 5, 2015, 12:17 p.m. OK GNU C++ TESTS 33 78 4710400 1900
2101676 nhap96 B Sept. 7, 2012, 6:14 a.m. OK GNU C++ TESTS 33 78 17203200 1900
9057582 zshi B Dec. 9, 2014, 11:07 a.m. OK GNU C++0x TESTS 33 78 16896000 1900
9918823 I_love_Hoang_Yen B Feb. 18, 2015, 7:16 p.m. OK GNU C++0x TESTS 33 93 4710400 1900
9905075 raihatneloy B Feb. 17, 2015, 7:40 p.m. OK GNU C++0x TESTS 33 93 10752000 1900
4808503 mrTux B Oct. 16, 2013, 3:46 p.m. OK GNU C++0x TESTS 33 124 7065600 1900
9188090 T0RRES B Dec. 18, 2014, 2:21 p.m. OK GNU C++0x TESTS 33 139 8089600 1900
9378779 diego_v1 B Jan. 7, 2015, 12:05 p.m. OK GNU C++0x TESTS 33 156 3584000 1900
9558236 Velter B Jan. 26, 2015, 9:13 a.m. OK GNU C++0x TESTS 33 186 2867200 1900
4808489 mrTux B Oct. 16, 2013, 3:45 p.m. OK GNU C++0x TESTS 33 186 7065600 1900
10258381 VKundas B March 13, 2015, 1:44 p.m. OK GNU C++0x TESTS 33 187 5324800 1900
3728292 mruxim B May 16, 2013, 7:40 p.m. OK GNU C++0x TESTS 33 187 6758400 1900
24876066 xsc B Feb. 21, 2017, 4:36 p.m. OK GNU C++11 TESTS 33 31 10547200 1900
24875903 xsc B Feb. 21, 2017, 4:24 p.m. OK GNU C++11 TESTS 33 46 6553600 1900
25221228 4.0realman B March 4, 2017, 4:39 p.m. OK GNU C++11 TESTS 33 62 168448000 1900
63390621 Steven_Meng B Oct. 25, 2019, 3:06 p.m. OK GNU C++11 TESTS 33 78 2764800 1900
19136096 nizar1 B July 14, 2016, 8:52 p.m. OK GNU C++11 TESTS 33 78 4710400 1900
12957186 vjudge2 B Sept. 11, 2015, 10:56 a.m. OK GNU C++11 TESTS 33 78 4710400 1900
57295372 vjudge3 B July 18, 2019, 6:56 p.m. OK GNU C++11 TESTS 33 78 6451200 1900
18162677 Jhamra B May 31, 2016, 1:50 a.m. OK GNU C++11 TESTS 33 78 10035200 1900
45511981 Big_black_jujube B Nov. 10, 2018, 1:31 p.m. OK GNU C++11 TESTS 33 92 97075200 1900
63519908 lszxj B Oct. 27, 2019, 3:14 a.m. OK GNU C++11 TESTS 33 93 2662400 1900
34282664 Linkus B Jan. 18, 2018, 5:39 p.m. OK GNU C++14 TESTS 33 93 4300800 1900
28974037 Linkus B July 29, 2017, 4:09 p.m. OK GNU C++14 TESTS 33 93 4710400 1900
34265754 Zxyelf B Jan. 18, 2018, 3:45 a.m. OK GNU C++14 TESTS 33 93 7065600 1900
31528932 w8_m8 B Oct. 20, 2017, 9:59 a.m. OK GNU C++14 TESTS 33 93 8396800 1900
33463031 amirhossein.sana B Dec. 20, 2017, 5:52 p.m. OK GNU C++14 TESTS 33 93 8908800 1900
34560887 mjhun B Jan. 26, 2018, 12:45 a.m. OK GNU C++14 TESTS 33 108 9420800 1900
47538339 _Dreamer_ B Dec. 27, 2018, 4:52 a.m. OK GNU C++14 TESTS 33 108 46387200 1900
28961635 Linkus B July 28, 2017, 8:29 p.m. OK GNU C++14 TESTS 33 109 4300800 1900
42436832 BumbleBee B Sept. 3, 2018, 5:52 p.m. OK GNU C++14 TESTS 33 109 5632000 1900
52209768 Romed B April 1, 2019, 7:02 p.m. OK GNU C++14 TESTS 33 109 6451200 1900
58836767 tfg B Aug. 14, 2019, 9:37 p.m. OK GNU C++17 TESTS 33 93 7168000 1900
61343279 vjudge4 B Sept. 27, 2019, 1:35 a.m. OK GNU C++17 TESTS 33 109 4812800 1900
54155055 cxsy B May 15, 2019, 3:33 a.m. OK GNU C++17 TESTS 33 109 4812800 1900
53900958 vjudge4 B May 9, 2019, 10:08 a.m. OK GNU C++17 TESTS 33 109 4812800 1900
54620752 Omar_Elawady B May 25, 2019, 12:10 p.m. OK GNU C++17 TESTS 33 109 6553600 1900
58109998 denis2111 B Aug. 1, 2019, 6:40 a.m. OK GNU C++17 TESTS 33 109 6758400 1900
49525555 ruo B Feb. 6, 2019, 11:08 a.m. OK GNU C++17 TESTS 33 109 7372800 1900
46568504 roll_no_1 B Dec. 4, 2018, 3:10 a.m. OK GNU C++17 TESTS 33 109 7577600 1900
46568536 roll_no_1 B Dec. 4, 2018, 3:12 a.m. OK GNU C++17 TESTS 33 109 7680000 1900
57285310 H4XeO6 B July 18, 2019, 2:22 p.m. OK GNU C++17 TESTS 33 124 3072000 1900
63991116 synapse B Nov. 1, 2019, 1:10 p.m. OK Go TESTS 33 373 4505600 1900
63991517 synapse B Nov. 1, 2019, 1:16 p.m. OK Go TESTS 33 374 4505600 1900
63991351 synapse B Nov. 1, 2019, 1:14 p.m. OK Go TESTS 33 374 4505600 1900
2077090 pashkal B Aug. 31, 2012, 4:09 p.m. OK Java 6 TESTS 33 380 45260800 1900
2077464 ivan.popelyshev B Aug. 31, 2012, 4:13 p.m. OK Java 6 TESTS 33 450 45465600 1900
4001209 Soldat B July 1, 2013, 8:39 p.m. OK Java 6 TESTS 33 500 45260800 1900
2074440 uwi B Aug. 31, 2012, 3:45 p.m. OK Java 6 TESTS 33 560 45158400 1900
4321373 mkirsche B Aug. 21, 2013, 7:29 p.m. OK Java 6 TESTS 33 686 15564800 1900
2073336 winger B Aug. 31, 2012, 3:38 p.m. OK Java 6 TESTS 33 780 45158400 1900
2104464 sayuan B Sept. 8, 2012, 2:56 p.m. OK Java 6 TESTS 33 781 43622400 1900
2523311 Azat_Yusupov B Nov. 8, 2012, 4:41 p.m. OK Java 6 TESTS 33 828 204800 1900
2805572 xiaowuc1 B Dec. 22, 2012, 6:38 a.m. OK Java 6 TESTS 33 828 307200 1900
2077285 Cepera B Aug. 31, 2012, 4:12 p.m. OK Java 6 TESTS 33 830 45363200 1900
2154313 mmaxio B Sept. 12, 2012, 3:21 p.m. OK Java 7 TESTS 33 420 54476800 1900
12111200 marcose18 B July 18, 2015, 11:14 p.m. OK Java 7 TESTS 33 468 0 1900
2086881 OutSide B Sept. 1, 2012, 10:08 a.m. OK Java 7 TESTS 33 480 57241600 1900
10858211 skyrim B April 25, 2015, 11:39 a.m. OK Java 7 TESTS 33 483 47616000 1900
10858252 skyrim B April 25, 2015, 11:42 a.m. OK Java 7 TESTS 33 498 47616000 1900
12111483 marcose18 B July 19, 2015, 12:47 a.m. OK Java 7 TESTS 33 499 0 1900
2086874 OutSide B Sept. 1, 2012, 10:06 a.m. OK Java 7 TESTS 33 500 57241600 1900
11104076 Sumeet.Varma B May 15, 2015, 5:54 a.m. OK Java 7 TESTS 33 514 0 1900
2098182 Fcdkbear B Sept. 5, 2012, 5:09 p.m. OK Java 7 TESTS 33 546 57139200 1900
2097965 yarrr B Sept. 5, 2012, 3:45 p.m. OK Java 7 TESTS 33 578 65024000 1900
55917829 sonusingh.nitaa B June 22, 2019, 6:15 a.m. OK Java 8 TESTS 33 296 0 1900
27149152 Maulik_Patel B May 16, 2017, 3:27 a.m. OK Java 8 TESTS 33 296 0 1900
26351367 aya_cool B April 14, 2017, 6:38 a.m. OK Java 8 TESTS 33 327 28467200 1900
46678444 Azuz B Dec. 6, 2018, 11:01 a.m. OK Java 8 TESTS 33 343 0 1900
30758554 admiral_1995 B Sept. 26, 2017, 5:26 p.m. OK Java 8 TESTS 33 343 0 1900
36860684 Maulik_Patel B April 1, 2018, 6:33 p.m. OK Java 8 TESTS 33 343 20992000 1900
40523732 aman28rwt B July 18, 2018, 6:30 p.m. OK Java 8 TESTS 33 358 0 1900
10193718 AlexFetisov B March 7, 2015, 4:43 p.m. OK Java 8 TESTS 33 358 0 1900
34226981 coderbond007 B Jan. 16, 2018, 4:23 p.m. OK Java 8 TESTS 33 358 20787200 1900
12112086 santa_calus B July 19, 2015, 3:04 a.m. OK Java 8 TESTS 33 373 0 1900
26982572 vishal24anand B May 9, 2017, 6:38 p.m. OK Mono C# TESTS 33 514 20377600 1900
2098388 tsun B Sept. 5, 2012, 7:06 p.m. OK Mono C# TESTS 33 1046 49459200 1900
2098355 tsun B Sept. 5, 2012, 6:50 p.m. OK Mono C# TESTS 33 1109 48947200 1900
15193938 azukun B Jan. 5, 2016, 5:24 p.m. OK MS C# TESTS 33 436 19865600 1900
15194041 azukun B Jan. 5, 2016, 5:34 p.m. OK MS C# TESTS 33 436 20275200 1900
15194142 azukun B Jan. 5, 2016, 5:43 p.m. OK MS C# TESTS 33 530 20275200 1900
15194118 azukun B Jan. 5, 2016, 5:42 p.m. OK MS C# TESTS 33 576 20275200 1900
29435437 semera B Aug. 13, 2017, 1:51 p.m. OK MS C# TESTS 33 748 14438400 1900
15193871 mukel B Jan. 5, 2016, 5:18 p.m. OK MS C# TESTS 33 935 20070400 1900
15578819 og.kostya B Jan. 25, 2016, 5:18 p.m. OK MS C# TESTS 33 1075 9113600 1900
15578676 og.kostya B Jan. 25, 2016, 5:11 p.m. OK MS C# TESTS 33 1497 9113600 1900
16477476 DigitalArtistKz B March 3, 2016, 6:39 a.m. OK MS C# TESTS 33 3073 23347200 1900
49234906 vjudge3 B Jan. 31, 2019, 7:29 a.m. OK MS C++ TESTS 33 93 7782400 1900
9737932 Hasan0540 B Feb. 6, 2015, 3:52 p.m. OK MS C++ TESTS 33 93 8294400 1900
46644714 vjudge2 B Dec. 5, 2018, 11:32 a.m. OK MS C++ TESTS 33 140 3993600 1900
2297756 zqhzx B Oct. 4, 2012, 5:09 a.m. OK MS C++ TESTS 33 140 4812800 1900
62932743 vjudge5 B Oct. 19, 2019, 1:11 p.m. OK MS C++ TESTS 33 155 3174400 1900
58372620 vjudge2 B Aug. 6, 2019, 7:09 a.m. OK MS C++ TESTS 33 155 14438400 1900
55276458 vjudge5 B June 7, 2019, 7:28 p.m. OK MS C++ TESTS 33 156 3174400 1900
62354823 vjudge5 B Oct. 11, 2019, 10:37 a.m. OK MS C++ TESTS 33 156 3993600 1900
2474458 gotoac B Oct. 31, 2012, 1:29 p.m. OK MS C++ TESTS 33 156 5120000 1900
5333601 peaceful B Dec. 2, 2013, 1:51 p.m. OK MS C++ TESTS 33 156 5222400 1900
63016468 vjudge5 B Oct. 20, 2019, 1:03 p.m. OK MS C++ 2017 TESTS 33 156 8396800 1900
63015634 vjudge4 B Oct. 20, 2019, 12:50 p.m. OK MS C++ 2017 TESTS 33 171 11980800 1900
63015031 vjudge4 B Oct. 20, 2019, 12:40 p.m. OK MS C++ 2017 TESTS 33 171 14438400 1900
58362454 vjudge2 B Aug. 6, 2019, 1:42 a.m. OK MS C++ 2017 TESTS 33 186 3584000 1900
58361368 vjudge2 B Aug. 6, 2019, 12:50 a.m. OK MS C++ 2017 TESTS 33 186 3584000 1900
58379560 vjudge5 B Aug. 6, 2019, 9:25 a.m. OK MS C++ 2017 TESTS 33 186 28057600 1900
58341319 vjudge1 B Aug. 5, 2019, 1:19 p.m. OK MS C++ 2017 TESTS 33 186 36044800 1900
58363261 vjudge1 B Aug. 6, 2019, 2:11 a.m. OK MS C++ 2017 TESTS 33 187 3174400 1900
58362578 vjudge2 B Aug. 6, 2019, 1:46 a.m. OK MS C++ 2017 TESTS 33 202 3174400 1900
58362420 vjudge2 B Aug. 6, 2019, 1:40 a.m. OK MS C++ 2017 TESTS 33 202 3584000 1900
2075671 alexey.shchepin B Aug. 31, 2012, 3:55 p.m. OK Ocaml TESTS 33 980 5836800 1900
34409432 tushutripathi B Jan. 21, 2018, 10:22 a.m. OK PyPy 2 TESTS 33 3930 64614400 1900
68393860 Firepaw B Jan. 8, 2020, 10:01 a.m. OK PyPy 3 TESTS 33 1247 30720000 1900
15567502 I_love_Malika B Jan. 25, 2016, 5:53 a.m. OK Scala TESTS 33 1294 819200 1900

remove filters

Back to search problems