Codeforces Round 232 (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
396 Codeforces Round 232 (Div. 1) FINISHED False 7200 338394599 Feb. 26, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 437 ) D On Sum of Number of Inversions in Permutations PROGRAMMING combinatorics math

B'You are given a permutation p. Calculate the total number of inversions in all permutations that lexicographically do not exceed the given one. As this number can be very large, print it modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). 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 x89106) -- the length of the permutation. The second line contains n distinct integers p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Print a single number -- the answer to the problem modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). Permutation p of length n is the sequence that consists of n distinct integers, each of them is from 1 to n. An inversion of permutation p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pn is a pair of indexes (i, xe2 x80 x89j), such that i xe2 x80 x89< xe2 x80 x89j and pi xe2 x80 x89> xe2 x80 x89pj. Permutation a do not exceed permutation b lexicographically, if either a xe2 x80 x89= xe2 x80 x89b or there exists such number i, for which the following logical condition fulfills: AND (ai xe2 x80 x89< xe2 x80 x89bi).'...

Tutorials

Codeforces Round #232 Editorial (restored)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5953218 babameme D March 6, 2014, 7:14 p.m. OK FPC TESTS 73 374 20172800
6001781 SanSiroWaltz D March 12, 2014, 9:18 a.m. OK FPC TESTS 73 483 40038400
5927824 zhzq123 D March 5, 2014, 2:34 a.m. OK FPC TESTS 73 514 24064000
10148246 403369233 D March 4, 2015, 1:14 p.m. OK FPC TESTS 73 1013 24064000
42076993 Scut82 D Aug. 25, 2018, 6:17 a.m. OK GNU C++ TESTS 73 202 12083200
42011136 Scut82 D Aug. 24, 2018, 12:59 a.m. OK GNU C++ TESTS 73 202 12083200
10524874 Memory120 D March 30, 2015, 1:20 p.m. OK GNU C++ TESTS 73 202 16076800
40989003 ReaLNero1 D July 30, 2018, 10:32 p.m. OK GNU C++ TESTS 73 218 12185600
29152645 Scut82 D Aug. 3, 2017, 10:17 a.m. OK GNU C++ TESTS 73 218 14233600
6063735 Victoralin10 D March 18, 2014, 10:22 p.m. OK GNU C++ TESTS 73 280 40038400
9434233 mrsam D Jan. 15, 2015, 7:34 a.m. OK GNU C++ TESTS 73 280 72089600
9295318 kmjp D Dec. 29, 2014, 4:46 a.m. OK GNU C++ TESTS 73 295 37068800
9434231 GreatDice D Jan. 15, 2015, 7:33 a.m. OK GNU C++ TESTS 73 296 72089600
7667451 wwt15 D Sept. 2, 2014, 12:32 p.m. OK GNU C++ TESTS 73 311 15974400
7770828 aid D Sept. 12, 2014, 5:22 p.m. OK GNU C++0x TESTS 73 233 28057600
5925616 Fdg D March 4, 2014, 5:25 p.m. OK GNU C++0x TESTS 73 311 20070400
5925722 BIT_silence D March 4, 2014, 5:45 p.m. OK GNU C++0x TESTS 73 312 44134400
9875311 stefanzzz D Feb. 16, 2015, 7:36 p.m. OK GNU C++0x TESTS 73 327 35840000
5925256 ikatanic D March 4, 2014, 4:32 p.m. OK GNU C++0x TESTS 73 358 20070400
7039841 Amor727 D July 7, 2014, 10:11 a.m. OK GNU C++0x TESTS 73 373 24064000
5950618 yutaka1999 D March 6, 2014, 12:15 p.m. OK GNU C++0x TESTS 73 373 24064000
5953335 DBradac D March 6, 2014, 7:40 p.m. OK GNU C++0x TESTS 73 373 32051200
9287816 saketh D Dec. 28, 2014, 12:01 a.m. OK GNU C++0x TESTS 73 389 32051200
5930404 2011330300713 D March 5, 2014, 10:24 a.m. OK GNU C++0x TESTS 73 420 16076800
55238710 AAWisong D June 7, 2019, 9:44 a.m. OK GNU C++11 TESTS 73 156 16076800
55227691 SoiMae D June 7, 2019, 3:11 a.m. OK GNU C++11 TESTS 73 171 16076800
70775660 froggyzhang D Feb. 11, 2020, 8:47 a.m. OK GNU C++11 TESTS 73 218 16076800
58524678 wbs501 D Aug. 10, 2019, 6:35 a.m. OK GNU C++11 TESTS 73 295 11980800
57819954 py_ultron D July 26, 2019, 10:17 p.m. OK GNU C++11 TESTS 73 311 19865600
15278970 tanphatls987 D Jan. 10, 2016, 10:44 a.m. OK GNU C++11 TESTS 73 312 24064000
70782167 yuzhechuan D Feb. 11, 2020, 11:06 a.m. OK GNU C++11 TESTS 73 327 24064000
70761679 Zeus_Third D Feb. 11, 2020, 2:01 a.m. OK GNU C++11 TESTS 73 327 32051200
14773529 Kmcode D Dec. 12, 2015, 2:55 p.m. OK GNU C++11 TESTS 73 327 52633600
58496005 xielinhan D Aug. 9, 2019, 12:10 p.m. OK GNU C++11 TESTS 73 342 12083200
56536025 Scut82 D July 5, 2019, 12:49 a.m. OK GNU C++14 TESTS 73 343 16076800
70612686 Origenes D Feb. 9, 2020, 8:58 a.m. OK GNU C++14 TESTS 73 389 30515200
27626676 LiChenKoh D June 7, 2017, 6:39 a.m. OK GNU C++14 TESTS 73 390 80179200
27901512 Yousef_Salama D June 19, 2017, 9:52 a.m. OK GNU C++14 TESTS 73 405 24064000
32922150 Flash-boy D Dec. 4, 2017, 1:36 p.m. OK GNU C++14 TESTS 73 436 13926400
61575073 stefdasca D Sept. 30, 2019, 8:21 p.m. OK GNU C++14 TESTS 73 436 32051200
34394497 kefaa2 D Jan. 20, 2018, 11:04 p.m. OK GNU C++14 TESTS 73 452 17920000
23543413 Ali.Pi D Jan. 4, 2017, 8:20 p.m. OK GNU C++14 TESTS 73 483 17920000
25128841 Not_A_SingleDogQrz D March 1, 2017, 4:30 p.m. OK GNU C++14 TESTS 73 483 21913600
47878993 vjudge3 D Jan. 3, 2019, 5:10 p.m. OK GNU C++14 TESTS 73 499 32051200
54863946 ArshiaDadras D May 31, 2019, 4:48 a.m. OK GNU C++17 TESTS 73 374 12083200
56046301 tombrady D June 25, 2019, 4:46 p.m. OK GNU C++17 TESTS 73 389 40038400
50586929 vjudge5 D Feb. 28, 2019, 4:36 a.m. OK GNU C++17 TESTS 73 436 28057600
61572118 Umi D Sept. 30, 2019, 7:04 p.m. OK GNU C++17 TESTS 73 451 40038400
57140019 ruo D July 16, 2019, 10:36 a.m. OK GNU C++17 TESTS 73 452 12083200
47850821 vjudge4 D Jan. 2, 2019, 5:40 p.m. OK GNU C++17 TESTS 73 499 32051200
47850796 _MGH_ D Jan. 2, 2019, 5:39 p.m. OK GNU C++17 TESTS 73 514 32051200
61571321 Kuroni D Sept. 30, 2019, 6:47 p.m. OK GNU C++17 TESTS 73 545 24064000
42318939 vjudge5 D Aug. 31, 2018, 7:26 p.m. OK GNU C++17 TESTS 73 576 16281600
58890131 89264270823 D Aug. 16, 2019, 5:09 a.m. OK GNU C++17 TESTS 73 623 132915200
5945146 m.radwan D March 5, 2014, 6:39 p.m. OK Java 7 TESTS 73 607 68812800
15949966 mkirsche D Feb. 11, 2016, 3:58 a.m. OK Java 7 TESTS 73 701 56524800
11187420 hama-du D May 21, 2015, 10:32 a.m. OK Java 8 TESTS 73 842 40755200
12126480 Ringod D July 20, 2015, 7:34 a.m. OK Java 8 TESTS 73 1684 63897600
5930312 _TMB_ D March 5, 2014, 10:07 a.m. OK MS C++ TESTS 73 327 19865600
6101409 a654889339 D March 22, 2014, 12:56 a.m. OK MS C++ TESTS 73 390 67379200
8837317 Alex7 D Nov. 24, 2014, 3:02 p.m. OK MS C++ TESTS 73 452 24064000
11904242 maxusivanov D July 3, 2015, 12:49 a.m. OK MS C++ TESTS 73 467 44134400
19155146 DEGwer D July 15, 2016, 2:05 p.m. OK MS C++ TESTS 73 546 36454400
7574616 mjy0503 D Aug. 25, 2014, 5:38 p.m. OK MS C++ TESTS 73 623 52121600

remove filters

Back to search problems