Codeforces Round 388 (Div. 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
749 Codeforces Round 388 (Div. 2) FINISHED False 7200 255360323 Dec. 19, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1125 ) E Inversions After Shuffle PROGRAMMING data structures probabilities 2600

B"You are given a permutation of integers from 1 to n. Exactly once you apply the following operation to this permutation: pick a random segment and shuffle its elements. Formally: Inversion if a pair of elements (not necessary neighbouring) with the wrong relative order. In other words, the number of inversion is equal to the number of pairs (i, xe2 x80 x89j) such that i xe2 x80 x89< xe2 x80 x89j and ai xe2 x80 x89> xe2 x80 x89aj. Find the expected number of inversions after we apply exactly one operation mentioned above. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the length of the permutation. The second line contains n distinct integers from 1 to n -- elements of the permutation. Print one real value -- the expected number of inversions. Your answer will be considered correct if its absolute or relative error does not exceed 10 xe2 x80 x89- xe2 x80 x899. Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if . "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
24601862 bzh E Feb. 12, 2017, 5:57 a.m. OK FPC TESTS 69 156 13209600 2600
23236928 rainboy E Dec. 22, 2016, 9:31 p.m. OK GNU C TESTS 69 62 3481600 2600
23219879 Ajatar E Dec. 22, 2016, 8:10 a.m. OK GNU C++ TESTS 69 30 3891200 2600
23672434 xzyxzy E Jan. 10, 2017, 12:19 a.m. OK GNU C++ TESTS 69 30 4915200 2600
41575975 luogu_bot5 E Aug. 14, 2018, 4:48 a.m. OK GNU C++ TESTS 69 31 1433600 2600
41575955 vjudge5 E Aug. 14, 2018, 4:47 a.m. OK GNU C++ TESTS 69 31 1433600 2600
41575945 vjudge5 E Aug. 14, 2018, 4:46 a.m. OK GNU C++ TESTS 69 31 1433600 2600
41578012 vjudge2 E Aug. 14, 2018, 6:22 a.m. OK GNU C++ TESTS 69 31 2252800 2600
41576271 luogu_bot3 E Aug. 14, 2018, 5:05 a.m. OK GNU C++ TESTS 69 31 2252800 2600
23163830 Computerbox_ E Dec. 19, 2016, 7:44 p.m. OK GNU C++ TESTS 69 31 3072000 2600
23795913 vjudge1 E Jan. 14, 2017, 1:50 a.m. OK GNU C++ TESTS 69 31 3481600 2600
23387676 GhostImage E Dec. 28, 2016, 10:04 p.m. OK GNU C++ TESTS 69 31 3481600 2600
23171114 eddy1021 E Dec. 20, 2016, 6:45 a.m. OK GNU C++11 TESTS 69 30 3276800 2600
32782579 wfj_2048 E Nov. 29, 2017, 2:01 p.m. OK GNU C++11 TESTS 69 30 4096000 2600
54746674 luogu_bot5 E May 28, 2019, 10:55 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
54746578 luogu_bot3 E May 28, 2019, 10:53 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
54746533 luogu_bot2 E May 28, 2019, 10:52 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
54718640 Dilute E May 27, 2019, 2:59 p.m. OK GNU C++11 TESTS 69 31 1228800 2600
53896270 wenjing233 E May 9, 2019, 6:11 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
53869551 vjudge1 E May 8, 2019, 7:55 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
53868594 chhokmah E May 8, 2019, 6:32 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
46792568 Durant_Lee E Dec. 9, 2018, 8:45 a.m. OK GNU C++11 TESTS 69 31 1228800 2600
68705328 iotang E Jan. 13, 2020, 11:05 a.m. OK GNU C++14 TESTS 69 31 2867200 2600
23184280 Motarack E Dec. 20, 2016, 7:42 p.m. OK GNU C++14 TESTS 69 31 3481600 2600
40264375 nguyenvu9405 E July 13, 2018, 2:27 p.m. OK GNU C++14 TESTS 69 46 1228800 2600
31254800 joker_in E Oct. 12, 2017, 4:23 p.m. OK GNU C++14 TESTS 69 46 1228800 2600
30626229 Single_Ready_To_Mingle E Sept. 22, 2017, 10:03 p.m. OK GNU C++14 TESTS 69 46 1228800 2600
27716933 Qizy E June 11, 2017, 7:44 a.m. OK GNU C++14 TESTS 69 46 1228800 2600
27716922 Qizy E June 11, 2017, 7:43 a.m. OK GNU C++14 TESTS 69 46 1228800 2600
30051811 step_by_step E Sept. 4, 2017, 11:34 a.m. OK GNU C++14 TESTS 69 46 1638400 2600
27719031 FallingStar E June 11, 2017, 10:14 a.m. OK GNU C++14 TESTS 69 46 1945600 2600
27880485 MasterMind0108 E June 18, 2017, 8:47 a.m. OK GNU C++14 TESTS 69 46 2355200 2600
65272999 vjudge4 E Nov. 17, 2019, 9:11 p.m. OK GNU C++17 TESTS 69 46 1638400 2600
68709458 vjudge1 E Jan. 13, 2020, 12:29 p.m. OK GNU C++17 TESTS 69 46 2048000 2600
57091544 vjudge2 E July 15, 2019, 10:56 a.m. OK GNU C++17 TESTS 69 46 4812800 2600
58682389 karasek E Aug. 12, 2019, 7:44 p.m. OK GNU C++17 TESTS 69 61 1638400 2600
61789695 hjk1030 E Oct. 3, 2019, 3:31 p.m. OK GNU C++17 TESTS 69 61 2048000 2600
55584500 ArshiaDadras E June 15, 2019, 8:42 a.m. OK GNU C++17 TESTS 69 61 2764800 2600
67413604 Ashishgup E Dec. 22, 2019, 9:08 a.m. OK GNU C++17 TESTS 69 62 1638400 2600
53567385 squarepants E April 30, 2019, 1:12 p.m. OK GNU C++17 TESTS 69 62 1638400 2600
57459978 Clement5140 E July 21, 2019, 1:11 p.m. OK GNU C++17 TESTS 69 62 1945600 2600
68709479 KMnO_4 E Jan. 13, 2020, 12:30 p.m. OK GNU C++17 TESTS 69 62 2048000 2600
23240821 hama-du E Dec. 23, 2016, 5:47 a.m. OK Java 8 TESTS 69 155 20992000 2600
24550295 Carson E Feb. 9, 2017, 1:40 p.m. OK Java 8 TESTS 69 170 20377600 2600
23413301 donli E Dec. 30, 2016, 5:50 a.m. OK Java 8 TESTS 69 171 20684800 2600
23352020 JialinOuyang E Dec. 27, 2016, 4:31 a.m. OK Java 8 TESTS 69 171 20992000 2600
32795672 tmwilliamlin168 E Nov. 30, 2017, 5:18 a.m. OK Java 8 TESTS 69 217 21504000 2600
23229501 hvcuong98 E Dec. 22, 2016, 4:17 p.m. OK Java 8 TESTS 69 233 20787200 2600
23233079 Dukkha E Dec. 22, 2016, 7:23 p.m. OK Java 8 TESTS 69 295 21299200 2600
23828519 esbybb E Jan. 14, 2017, 10:41 p.m. OK Java 8 TESTS 69 358 21196800 2600
23206360 DarLam E Dec. 21, 2016, 6:13 p.m. OK Java 8 TESTS 69 374 20889600 2600
23216138 PeterASteele E Dec. 22, 2016, 2:32 a.m. OK Java 8 TESTS 69 467 27648000 2600
23534338 DigitalArtistKz E Jan. 4, 2017, 11:37 a.m. OK MS C# TESTS 69 202 32870400 2600
23207428 AleksanderBalobanov E Dec. 21, 2016, 7:11 p.m. OK MS C++ TESTS 69 46 6860800 2600
24086096 superwatermelon E Jan. 24, 2017, 6:47 a.m. OK MS C++ TESTS 69 62 3686400 2600
23188698 BaturaDima E Dec. 20, 2016, 11:31 p.m. OK MS C++ TESTS 69 124 5632000 2600
23188666 BaturaDima E Dec. 20, 2016, 11:27 p.m. OK MS C++ TESTS 69 124 6451200 2600
23232734 tacocat E Dec. 22, 2016, 7:01 p.m. OK Ocaml TESTS 69 187 8499200 2600

remove filters

Back to search problems