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
( 1439 ) E Little Elephant and Inversions PROGRAMMING data structures two pointers 2400

B"The Little Elephant has array a, consisting of n positive integers, indexed from 1 to n. Let's denote the number with index i as ai. The Little Elephant wants to count, how many pairs of integers l and r are there, such that 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89< xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n and sequence b xe2 x80 x89= xe2 x80 x89a1a2... alarar xe2 x80 x89+ xe2 x80 x891... an has no more than k inversions. An inversion in sequence b is a pair of elements of the sequence b, that change their relative order after a stable sorting of the sequence. In other words, an inversion is a pair of integers i and j, such that 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89< xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|b| and bi xe2 x80 x89> xe2 x80 x89bj, where |b| is the length of sequence b, and bj is its j-th element. Help the Little Elephant and count the number of the described pairs. The first line contains two integers n and k (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018) -- the size of array a and the maximum allowed number of inversions respectively. The next line contains n positive integers, separated by single spaces, a1, xe2 x80 x89a2, 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) -- elements of array a. Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use cin, cout streams or the %I64d specifier. In a single line print a single number -- the answer to the problem."...

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
2374697 danpol E Oct. 16, 2012, 3:20 p.m. OK Delphi TESTS 45 78 24166400 2400
2100767 giongto35 E Sept. 6, 2012, 3:53 p.m. OK Delphi TESTS 45 80 10854400 2400
2081566 Sereja E Aug. 31, 2012, 5:17 p.m. OK FPC TESTS 45 130 4608000 2400
2101585 con_nha_ngheo E Sept. 7, 2012, 5:02 a.m. OK FPC TESTS 45 140 2764800 2400
2089554 vlad107 E Sept. 2, 2012, 8:14 a.m. OK FPC TESTS 45 360 16793600 2400
2094828 wxyz1234 E Sept. 4, 2012, 9:29 a.m. OK FPC TESTS 45 440 14233600 2400
18055002 lkmcfj E May 24, 2016, 12:19 p.m. OK FPC TESTS 45 622 6144000 2400
21208518 cqbz163003gzm E Oct. 5, 2016, 12:47 p.m. OK GNU C++ TESTS 45 62 1638400 2400
5389606 PSDEV E Dec. 8, 2013, 12:16 p.m. OK GNU C++ TESTS 45 62 1638400 2400
7609847 vjudge1 E Aug. 28, 2014, 1:50 a.m. OK GNU C++ TESTS 45 62 2048000 2400
3859391 tmt514 E June 12, 2013, 6:30 a.m. OK GNU C++ TESTS 45 78 1536000 2400
3672290 shineFly E May 5, 2013, 11:02 a.m. OK GNU C++ TESTS 45 78 2048000 2400
2225885 sunweijun E Sept. 21, 2012, 8:18 a.m. OK GNU C++ TESTS 45 78 3072000 2400
2856983 DEGwer E Dec. 30, 2012, 12:57 p.m. OK GNU C++ TESTS 45 78 5836800 2400
2081340 zjut_DD E Aug. 31, 2012, 5:13 p.m. OK GNU C++ TESTS 45 80 2560000 2400
2092479 Nomad E Sept. 3, 2012, 10:56 a.m. OK GNU C++ TESTS 45 80 2764800 2400
2086765 LGM E Sept. 1, 2012, 9:39 a.m. OK GNU C++ TESTS 45 80 2764800 2400
2086421 MinakoKojima E Sept. 1, 2012, 7:59 a.m. OK GNU C++0x TESTS 45 50 3993600 2400
2106337 Dr. E Sept. 9, 2012, 12:26 p.m. OK GNU C++0x TESTS 45 80 3481600 2400
2084415 PinkieDashForever E Aug. 31, 2012, 8:24 p.m. OK GNU C++0x TESTS 45 90 2048000 2400
9918894 I_love_Hoang_Yen E Feb. 18, 2015, 7:23 p.m. OK GNU C++0x TESTS 45 92 1638400 2400
6508357 orzxyz111 E April 30, 2014, 2:29 a.m. OK GNU C++0x TESTS 45 92 1638400 2400
5108149 mruxim E Nov. 14, 2013, 5:13 p.m. OK GNU C++0x TESTS 45 92 1638400 2400
10279054 SealView E March 14, 2015, 8:53 p.m. OK GNU C++0x TESTS 45 92 1843200 2400
6019676 yutaka1999 E March 15, 2014, 9:28 a.m. OK GNU C++0x TESTS 45 92 2252800 2400
9918340 sdya E Feb. 18, 2015, 6:29 p.m. OK GNU C++0x TESTS 45 92 2355200 2400
9068661 zshi E Dec. 10, 2014, 6:02 a.m. OK GNU C++0x TESTS 45 92 3276800 2400
41527951 weskerhluffy E Aug. 12, 2018, 12:59 p.m. OK GNU C11 TESTS 45 156 1638400 2400
18975927 kefaa E July 8, 2016, 9:14 p.m. OK GNU C++11 TESTS 45 62 3174400 2400
12904165 RazvanR104 E Sept. 9, 2015, 12:05 a.m. OK GNU C++11 TESTS 45 62 6963200 2400
15456334 Svyat E Jan. 20, 2016, 4:28 p.m. OK GNU C++11 TESTS 45 92 1740800 2400
51984288 S.A.R E March 29, 2019, 5:45 p.m. OK GNU C++11 TESTS 45 92 2048000 2400
11527767 tanphatls987 E June 11, 2015, 4:21 a.m. OK GNU C++11 TESTS 45 92 2048000 2400
22715306 RockyB E Dec. 5, 2016, 4:04 p.m. OK GNU C++11 TESTS 45 92 2764800 2400
22715287 RockyB E Dec. 5, 2016, 4:03 p.m. OK GNU C++11 TESTS 45 92 2764800 2400
33109853 Joker1010123 E Dec. 11, 2017, 3:53 p.m. OK GNU C++11 TESTS 45 92 3686400 2400
23493466 014-23309-07-Zhenis E Jan. 2, 2017, 5:32 a.m. OK GNU C++11 TESTS 45 92 3788800 2400
23228882 JJJKKK E Dec. 22, 2016, 3:48 p.m. OK GNU C++11 TESTS 45 92 3788800 2400
59584365 vickyandvs E Aug. 27, 2019, 5:21 p.m. OK GNU C++14 TESTS 45 92 1638400 2400
34988955 Artemis_Fowl E Feb. 7, 2018, 5:37 a.m. OK GNU C++14 TESTS 45 92 5120000 2400
63634151 ShafinKhadem E Oct. 28, 2019, 7:33 a.m. OK GNU C++14 TESTS 45 122 2457600 2400
27581828 weskerhluffy E June 5, 2017, 11:33 a.m. OK GNU C++14 TESTS 45 122 3174400 2400
25345637 wrinx E March 8, 2017, 4:33 p.m. OK GNU C++14 TESTS 45 122 6758400 2400
58166171 vjudge1 E Aug. 2, 2019, 9:07 a.m. OK GNU C++14 TESTS 45 124 1638400 2400
48584668 compiler_101 E Jan. 19, 2019, 6:46 p.m. OK GNU C++14 TESTS 45 124 2048000 2400
41153156 MAMBA E Aug. 3, 2018, 10:14 a.m. OK GNU C++14 TESTS 45 124 2252800 2400
27280799 Snow_Leopard E May 22, 2017, 9:35 a.m. OK GNU C++14 TESTS 45 124 2252800 2400
47799742 ArshiaDadras E Dec. 31, 2018, 8:52 p.m. OK GNU C++14 TESTS 45 124 2252800 2400
65937125 bknplhp E Nov. 29, 2019, 3:11 a.m. OK GNU C++17 TESTS 45 124 1638400 2400
52156488 lmiskiew E April 1, 2019, 1:37 p.m. OK GNU C++17 TESTS 45 124 1638400 2400
51983744 S.A.R E March 29, 2019, 5:31 p.m. OK GNU C++17 TESTS 45 124 2048000 2400
67458145 neihcr7j23 E Dec. 23, 2019, 7:57 a.m. OK GNU C++17 TESTS 45 124 2252800 2400
69190998 Kafka E Jan. 20, 2020, 1:30 p.m. OK GNU C++17 TESTS 45 124 2252800 2400
67680276 L_I_Erq34 E Dec. 27, 2019, 5:56 a.m. OK GNU C++17 TESTS 45 124 2355200 2400
54176709 SYury E May 15, 2019, 2:08 p.m. OK GNU C++17 TESTS 45 124 3174400 2400
69630833 rares2004 E Jan. 27, 2020, 5:09 p.m. OK GNU C++17 TESTS 45 124 3891200 2400
61471545 vjudge1 E Sept. 29, 2019, 12:32 p.m. OK GNU C++17 TESTS 45 124 3891200 2400
58837869 tfg E Aug. 14, 2019, 10:43 p.m. OK GNU C++17 TESTS 45 154 1638400 2400
3059303 m.radwan E Feb. 1, 2013, 6:32 p.m. OK Java 6 TESTS 45 202 2457600 2400
2086406 FattyPenguin E Sept. 1, 2012, 7:55 a.m. OK Java 6 TESTS 45 230 45363200 2400
2170545 tsun E Sept. 15, 2012, 3:05 a.m. OK Java 6 TESTS 45 250 44032000 2400
2079199 winger E Aug. 31, 2012, 4:38 p.m. OK Java 6 TESTS 45 270 45363200 2400
2086404 FattyPenguin E Sept. 1, 2012, 7:54 a.m. OK Java 6 TESTS 45 280 45363200 2400
2085737 Bugman E Sept. 1, 2012, 4:41 a.m. OK Java 6 TESTS 45 530 51609600 2400
2372080 hama-du E Oct. 16, 2012, 10:11 a.m. OK Java 6 TESTS 45 546 6041600 2400
2151836 SkorKNURE E Sept. 12, 2012, 12:19 a.m. OK Java 6 TESTS 45 690 43417600 2400
2089185 Uncia E Sept. 2, 2012, 4:12 a.m. OK Java 6 TESTS 45 690 45568000 2400
2107528 FunLNU E Sept. 10, 2012, 1:06 a.m. OK Java 6 TESTS 45 720 43417600 2400
2092387 uwi E Sept. 3, 2012, 10:12 a.m. OK Java 7 TESTS 45 160 45465600 2400
2089523 blue.boy E Sept. 2, 2012, 7:58 a.m. OK Java 7 TESTS 45 190 45158400 2400
2154712 mmaxio E Sept. 12, 2012, 5:17 p.m. OK Java 7 TESTS 45 220 45363200 2400
2078649 OgieKako E Aug. 31, 2012, 4:29 p.m. OK Java 7 TESTS 45 270 45158400 2400
2148528 PlayLikeNeverB4 E Sept. 11, 2012, 8:34 p.m. OK Java 7 TESTS 45 410 45363200 2400
2084562 Jokser E Aug. 31, 2012, 8:51 p.m. OK Java 7 TESTS 45 450 45568000 2400
2089186 Uncia E Sept. 2, 2012, 4:13 a.m. OK Java 7 TESTS 45 670 45568000 2400
6263414 KOHCTAHTIH E April 5, 2014, 10:31 a.m. OK Java 7 TESTS 45 808 12492800 2400
10195479 AlexFetisov E March 7, 2015, 6:16 p.m. OK Java 8 TESTS 45 466 0 2400
67762771 SpargelTarzan E Dec. 28, 2019, 12:30 a.m. OK Java 8 TESTS 45 590 13516800 2400
44543167 gazaan E Oct. 19, 2018, 12:24 p.m. OK Java 8 TESTS 45 778 25804800 2400
39033176 rzhan11 E June 8, 2018, 12:01 a.m. OK Java 8 TESTS 45 1028 3993600 2400
2081553 XilinX E Aug. 31, 2012, 5:16 p.m. OK MS C++ TESTS 45 90 2355200 2400
7044826 ainta E July 8, 2014, 5:08 a.m. OK MS C++ TESTS 45 92 2048000 2400
10614551 AleksanderBalobanov E April 6, 2015, 4:27 p.m. OK MS C++ TESTS 45 92 20070400 2400
2421044 vjudge1 E Oct. 24, 2012, 11:14 a.m. OK MS C++ TESTS 45 109 3481600 2400
2082830 arosusti E Aug. 31, 2012, 6:18 p.m. OK MS C++ TESTS 45 110 2764800 2400
2081411 RAD E Aug. 31, 2012, 5:14 p.m. OK MS C++ TESTS 45 110 5120000 2400
2304537 fura2 E Oct. 6, 2012, 5:22 a.m. OK MS C++ TESTS 45 125 2048000 2400
2168279 wccy E Sept. 14, 2012, 9:55 a.m. OK MS C++ TESTS 45 125 5939200 2400
2084493 -DMYTRO- E Aug. 31, 2012, 8:39 p.m. OK MS C++ TESTS 45 130 3686400 2400
2084490 -DMYTRO- E Aug. 31, 2012, 8:38 p.m. OK MS C++ TESTS 45 130 4812800 2400
59860235 tik-tok E Sept. 1, 2019, 3:02 p.m. OK MS C++ 2017 TESTS 45 528 6860800 2400
68463179 mitribunskiy E Jan. 9, 2020, 6:58 p.m. OK PyPy 3 TESTS 45 748 18739200 2400
41429016 weskerhluffy E Aug. 10, 2018, 11:20 a.m. OK PyPy 3 TESTS 45 1838 13721600 2400

remove filters

Back to search problems