Codeforces Round 175 (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
285 Codeforces Round 175 (Div. 2) FINISHED False 7200 367943399 March 21, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1000 ) E Positions in Permutations PROGRAMMING combinatorics dp math 2600

B"Permutation p is an ordered set of integers p1, xe2 x80 x89 xe2 x80 x89p2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element of permutation p as pi. We'll call number n the size or the length of permutation p1, xe2 x80 x89 xe2 x80 x89p2, xe2 x80 x89 xe2 x80 x89..., xe2 x80 x89 xe2 x80 x89pn. We'll call position i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) in permutation p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pn good, if |p[i] xe2 x80 x89- xe2 x80 x89i| xe2 x80 x89= xe2 x80 x891. Count the number of permutations of size n with exactly k good positions. Print the answer modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The single line contains two space-separated integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000, xe2 x80 x890 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Print the number of permutations of length n with exactly k good positions modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The only permutation of size 1 has 0 good positions. Permutation (1, xe2 x80 x892) has 0 good positions, and permutation (2, xe2 x80 x891) has 2 positions. Permutations of size 3:"...

Tutorials

Codeforces Round #175 (Div. 2) Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5491408 zhzq123 E Dec. 22, 2013, 9:22 a.m. OK FPC TESTS 49 186 40243200 2600
10246438 vjudge5 E March 12, 2015, 11:25 a.m. OK FPC TESTS 49 218 24268800 2600
10482609 403369233 E March 27, 2015, 6:33 a.m. OK FPC TESTS 49 248 40140800 2600
3404937 zscc E March 25, 2013, 3:26 p.m. OK FPC TESTS 49 562 87449600 2600
25593633 xumingkuan E March 18, 2017, 8:02 a.m. OK GNU C++ TESTS 49 30 2150400 2600
23692520 ShinFeb E Jan. 11, 2017, 6:39 a.m. OK GNU C++ TESTS 49 60 2150400 2600
3412607 daidailanlan E March 27, 2013, 3:46 p.m. OK GNU C++ TESTS 49 62 0 2600
5321847 PSDEV E Dec. 1, 2013, 1:07 p.m. OK GNU C++ TESTS 49 62 12288000 2600
3729005 dhh1995 E May 17, 2013, 5:14 a.m. OK GNU C++ TESTS 49 62 12288000 2600
39210782 chentong E June 13, 2018, 8:52 a.m. OK GNU C++ TESTS 49 62 16179200 2600
12810643 KFDong E Sept. 2, 2015, 4:57 a.m. OK GNU C++ TESTS 49 62 16384000 2600
3667922 aa2985759 E May 4, 2013, 10:44 a.m. OK GNU C++ TESTS 49 62 16384000 2600
28256586 dsyhy E July 3, 2017, 1:21 p.m. OK GNU C++ TESTS 49 62 18227200 2600
42152288 _DYT E Aug. 27, 2018, 12:48 p.m. OK GNU C++ TESTS 49 62 20070400 2600
3381658 anton E March 22, 2013, 4:10 p.m. OK GNU C++0x TESTS 49 109 16076800 2600
3378217 Scalar E March 22, 2013, 5:06 a.m. OK GNU C++0x TESTS 49 109 39628800 2600
9272079 equation314 E Dec. 26, 2014, 12:39 a.m. OK GNU C++0x TESTS 49 122 20275200 2600
9799611 vjudge1 E Feb. 11, 2015, 2:57 p.m. OK GNU C++0x TESTS 49 124 20172800 2600
8493548 zshi E Oct. 31, 2014, 4:47 a.m. OK GNU C++0x TESTS 49 124 28876800 2600
3375985 MinakoKojima E March 21, 2013, 6:01 p.m. OK GNU C++0x TESTS 49 125 36761600 2600
10296144 Duc E March 16, 2015, 3:42 a.m. OK GNU C++0x TESTS 49 374 6451200 2600
10279517 Duc E March 14, 2015, 9:37 p.m. OK GNU C++0x TESTS 49 530 8704000 2600
10279071 Duc E March 14, 2015, 8:55 p.m. OK GNU C++0x TESTS 49 530 8704000 2600
10296104 Duc E March 16, 2015, 3:35 a.m. OK GNU C++0x TESTS 49 748 6451200 2600
57827203 ZhouShang2003 E July 27, 2019, 3:58 a.m. OK GNU C++11 TESTS 49 62 0 2600
54752417 tyler178 E May 28, 2019, 1:28 p.m. OK GNU C++11 TESTS 49 62 102400 2600
41121795 Anson529 E Aug. 2, 2018, 12:20 p.m. OK GNU C++11 TESTS 49 62 4096000 2600
62097909 cyf32768 E Oct. 8, 2019, 8:09 a.m. OK GNU C++11 TESTS 49 62 16179200 2600
44600778 CaptainSlow E Oct. 20, 2018, 2:18 p.m. OK GNU C++11 TESTS 49 62 16179200 2600
42196366 Rebirth_A E Aug. 28, 2018, 6:36 a.m. OK GNU C++11 TESTS 49 62 16179200 2600
68575696 Ziyi_Wang1 E Jan. 11, 2020, 9:58 a.m. OK GNU C++11 TESTS 49 62 16384000 2600
55925439 Owen_codeisking E June 22, 2019, 9:07 a.m. OK GNU C++11 TESTS 49 62 16384000 2600
37550640 rushcheyo E April 23, 2018, 12:31 p.m. OK GNU C++11 TESTS 49 62 19763200 2600
45200619 Xingcy E Nov. 2, 2018, 9:42 a.m. OK GNU C++11 TESTS 49 62 20275200 2600
22131740 SakurakoujiRuna E Nov. 9, 2016, 2:11 p.m. OK GNU C++14 TESTS 49 60 16384000 2600
54861510 mobu233 E May 31, 2019, 2:30 a.m. OK GNU C++14 TESTS 49 62 4096000 2600
42888946 Narh E Sept. 15, 2018, 11:41 a.m. OK GNU C++14 TESTS 49 62 16179200 2600
53865367 NotNight E May 8, 2019, 3:02 a.m. OK GNU C++14 TESTS 49 62 16486400 2600
23219664 jasonvictoryan E Dec. 22, 2016, 7:57 a.m. OK GNU C++14 TESTS 49 62 18124800 2600
54654929 yybyyb E May 26, 2019, 7:44 a.m. OK GNU C++14 TESTS 49 62 20480000 2600
32785150 Flash-boy E Nov. 29, 2017, 3:53 p.m. OK GNU C++14 TESTS 49 62 22118400 2600
23642474 Ali.Pi E Jan. 8, 2017, 8:08 a.m. OK GNU C++14 TESTS 49 92 14028800 2600
40990088 ReaLNero1 E July 30, 2018, 11:34 p.m. OK GNU C++14 TESTS 49 92 16384000 2600
69729239 yan-zp E Jan. 29, 2020, 1:07 p.m. OK GNU C++14 TESTS 49 92 17100800 2600
65773103 Bohun E Nov. 26, 2019, 7:48 p.m. OK GNU C++17 TESTS 49 92 16076800 2600
62438754 saketh E Oct. 12, 2019, 6:30 p.m. OK GNU C++17 TESTS 49 92 16179200 2600
66362676 AliShahali1382 E Dec. 5, 2019, 6:23 p.m. OK GNU C++17 TESTS 49 92 16384000 2600
47290726 nimphy E Dec. 20, 2018, 9:02 a.m. OK GNU C++17 TESTS 49 92 16384000 2600
63653893 Roundgod E Oct. 28, 2019, 12:09 p.m. OK GNU C++17 TESTS 49 92 20275200 2600
63653696 Roundgod E Oct. 28, 2019, 12:06 p.m. OK GNU C++17 TESTS 49 92 20275200 2600
61110338 kefaa2 E Sept. 23, 2019, 11 a.m. OK GNU C++17 TESTS 49 92 20275200 2600
51937602 ivan100sic E March 28, 2019, 1:06 p.m. OK GNU C++17 TESTS 49 92 20275200 2600
60268886 hjk1030 E Sept. 8, 2019, 2:34 p.m. OK GNU C++17 TESTS 49 92 20480000 2600
40017533 zbtrs E July 6, 2018, 3:50 a.m. OK GNU C++17 TESTS 49 92 20480000 2600
3493663 uwi E April 8, 2013, 2:41 p.m. OK Java 6 TESTS 49 140 2252800 2600
4821075 mkirsche E Oct. 18, 2013, 5:13 p.m. OK Java 6 TESTS 49 530 53862400 2600
3493651 uwi E April 8, 2013, 2:35 p.m. OK Java 6 TESTS 49 984 168345600 2600
3401672 emo E March 24, 2013, 8:30 p.m. OK Java 6 TESTS 49 1000 165990400 2600
3401675 emo E March 24, 2013, 8:33 p.m. OK Java 6 TESTS 49 1015 166092800 2600
5599952 Phicar E Jan. 1, 2014, 6:49 p.m. OK Java 6 TESTS 49 1622 149913600 2600
3719433 ftiasch E May 14, 2013, 8:45 a.m. OK Java 7 TESTS 49 218 102400 2600
3397996 mmaxio E March 24, 2013, 4:57 a.m. OK Java 7 TESTS 49 250 102400 2600
15143209 HappyNewYearMike E Dec. 31, 2015, 11:06 p.m. OK Java 7 TESTS 49 404 0 2600
3380116 ysyshtc E March 22, 2013, 11:46 a.m. OK Java 7 TESTS 49 406 58265600 2600
3405880 islam-al-aarag E March 25, 2013, 9:36 p.m. OK Java 7 TESTS 49 546 57856000 2600
10423538 vjudge1 E March 24, 2015, 1:55 p.m. OK Java 7 TESTS 49 840 57651200 2600
3413385 khanhptnk E March 27, 2013, 8:02 p.m. OK Java 7 TESTS 49 890 163942400 2600
3426715 1Shreesh E March 31, 2013, 10:19 a.m. OK Java 7 TESTS 49 906 163942400 2600
10423532 meijun E March 24, 2015, 1:54 p.m. OK Java 8 TESTS 49 872 48025600 2600
3378575 hgame E March 22, 2013, 6:51 a.m. OK MS C++ TESTS 49 62 8089600 2600
3377197 Monyura E March 21, 2013, 9:27 p.m. OK MS C++ TESTS 49 62 20070400 2600
3820344 hikerboy E June 4, 2013, 3:02 a.m. OK MS C++ TESTS 49 78 20275200 2600
14845159 dwp E Dec. 17, 2015, 11:46 a.m. OK MS C++ TESTS 49 124 24576000 2600
3560686 xin5739 E April 18, 2013, 1:50 p.m. OK MS C++ TESTS 49 140 40243200 2600
5613463 RiKang E Jan. 4, 2014, 2:18 a.m. OK MS C++ TESTS 49 156 102400 2600
24446465 Bubble_age E Feb. 5, 2017, 7:13 a.m. OK MS C++ TESTS 49 186 42598400 2600
3407472 deep E March 26, 2013, 10:08 a.m. OK MS C++ TESTS 49 187 16281600 2600
3375513 witua E March 21, 2013, 5:24 p.m. OK MS C++ TESTS 49 218 42086400 2600
3378584 Amir.bh E March 22, 2013, 6:54 a.m. OK MS C++ TESTS 49 1937 73420800 2600
40476141 Ali_Pi E July 17, 2018, 11:57 a.m. OK Python 2 TESTS 49 1934 102400 2600
24010422 vjudge5 E Jan. 21, 2017, noon OK Python 3 TESTS 49 1838 4915200 2600
24010407 metowolf E Jan. 21, 2017, 11:58 a.m. OK Python 3 TESTS 49 1934 4915200 2600
35857494 ______u______ E March 2, 2018, 8:40 p.m. OK Python 3 TESTS 49 1996 5632000 2600
35857432 ______n______ E March 2, 2018, 8:40 p.m. OK Python 3 TESTS 49 1996 5632000 2600
35856988 _____i_____ E March 2, 2018, 8:32 p.m. OK Python 3 TESTS 49 1996 5632000 2600
35856857 _____k_____ E March 2, 2018, 8:28 p.m. OK Python 3 TESTS 49 1996 5632000 2600
35848257 ______h______ E March 2, 2018, 4:56 p.m. OK Python 3 TESTS 49 1996 5632000 2600
35848253 ______k______ E March 2, 2018, 4:56 p.m. OK Python 3 TESTS 49 1996 5632000 2600
35847839 ______i______ E March 2, 2018, 4:50 p.m. OK Python 3 TESTS 49 1996 5632000 2600

remove filters

Back to search problems