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 373818597 March 21, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1566 ) D Permutation Sum PROGRAMMING bitmasks combinatorics dp implementation meet-in-the-middle 1900

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. Petya decided to introduce the sum operation on the set of permutations of length n. Let's assume that we are given two permutations of length n: a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an and b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bn. Petya calls the sum of permutations a and b such permutation c of length n, where ci xe2 x80 x89= xe2 x80 x89((ai xe2 x80 x89- xe2 x80 x891 xe2 x80 x89+ xe2 x80 x89bi xe2 x80 x89- xe2 x80 x891) mod n) xe2 x80 x89+ xe2 x80 x891 (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Operation means taking the remainder after dividing number x by number y. Obviously, not for all permutations a and b exists permutation c that is sum of a and b. That's why Petya got sad and asked you to do the following: given n, count the number of such pairs of permutations a and b of length n, that exists permutation c that is sum of a and b. The pair of permutations x, xe2 x80 x89y (x xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89y) and the pair of permutations y, xe2 x80 x89x are considered distinct pairs. As the answer can be rather large, print the remainder after dividing it by 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The single line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8916). In the single line print a single non-negative integer -- the number of such pairs of permutations a and b, that exists permutation c that is sum of a and b, modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897)."...

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
3376198 vesnik D March 21, 2013, 6:14 p.m. OK Delphi TESTS 16 15 0 1900
3379457 ruban D March 22, 2013, 10:06 a.m. OK Delphi TESTS 16 15 0 1900
3376161 gohard D March 21, 2013, 6:11 p.m. OK Delphi TESTS 16 15 102400 1900
3375445 Timur_Keks D March 21, 2013, 5:23 p.m. OK Delphi TESTS 16 15 102400 1900
3374600 AleksanderBalobanov D March 21, 2013, 5:03 p.m. OK Delphi TESTS 16 46 921600 1900
3376913 Misha100896 D March 21, 2013, 8:07 p.m. OK Delphi TESTS 16 78 0 1900
3373068 amirrr D March 21, 2013, 4:34 p.m. OK Delphi TESTS 16 187 102400 1900
3376638 scorpion D March 21, 2013, 7:08 p.m. OK FPC TESTS 16 0 0 1900
3373553 BrightDays D March 21, 2013, 4:42 p.m. OK FPC TESTS 16 0 102400 1900
3855224 vilcheuski D June 10, 2013, 7:48 p.m. OK FPC TESTS 16 15 0 1900
3847356 Nik_Storm_2010 D June 8, 2013, 1:52 p.m. OK FPC TESTS 16 15 0 1900
3617442 gamezovladislav D April 24, 2013, 4:19 p.m. OK FPC TESTS 16 15 0 1900
3422866 Rubanenko D March 30, 2013, 12:39 p.m. OK FPC TESTS 16 15 0 1900
3405019 thaison1496 D March 25, 2013, 3:45 p.m. OK FPC TESTS 16 15 0 1900
3404075 zscc D March 25, 2013, 12:35 p.m. OK FPC TESTS 16 15 0 1900
3401748 Omelianenko D March 24, 2013, 9:19 p.m. OK FPC TESTS 16 15 0 1900
3396205 vlad107 D March 23, 2013, 5:07 p.m. OK FPC TESTS 16 15 0 1900
3416756 atpec D March 28, 2013, 6:06 p.m. OK GNU C TESTS 16 15 0 1900
3409359 code_on D March 26, 2013, 6:14 p.m. OK GNU C TESTS 16 15 0 1900
3377078 gaurav708 D March 21, 2013, 8:42 p.m. OK GNU C TESTS 16 15 0 1900
3375533 Pyx1997 D March 21, 2013, 5:24 p.m. OK GNU C TESTS 16 15 0 1900
3375204 kawatea D March 21, 2013, 5:17 p.m. OK GNU C TESTS 16 15 0 1900
3373457 pedja D March 21, 2013, 4:40 p.m. OK GNU C TESTS 16 15 0 1900
30485984 MarceloUFG D Sept. 19, 2017, 12:24 a.m. OK GNU C TESTS 16 30 0 1900
20877588 rainboy D Sept. 24, 2016, 12:21 a.m. OK GNU C TESTS 16 30 0 1900
19283416 vjudge3 D July 20, 2016, 3:09 p.m. OK GNU C TESTS 16 310 125542400 1900
19280576 sgtlaugh D July 20, 2016, 12:46 p.m. OK GNU C TESTS 16 312 125542400 1900
4618147 jslijin D Oct. 1, 2013, 8:02 a.m. OK GNU C++ TESTS 16 0 0 1900
4505108 Drak D Sept. 19, 2013, 4:58 p.m. OK GNU C++ TESTS 16 0 0 1900
3691989 vjudge4 D May 8, 2013, 4:03 a.m. OK GNU C++ TESTS 16 0 0 1900
3655650 Eric_Valdivia D April 30, 2013, 6:45 p.m. OK GNU C++ TESTS 16 0 0 1900
3430101 jingg.cxy D April 1, 2013, 8:56 a.m. OK GNU C++ TESTS 16 0 0 1900
3405255 fatsheep_LF D March 25, 2013, 5:21 p.m. OK GNU C++ TESTS 16 0 0 1900
3379848 ChuckLin2014 D March 22, 2013, 11:09 a.m. OK GNU C++ TESTS 16 0 0 1900
3377926 JohnDeVostok D March 22, 2013, 3:19 a.m. OK GNU C++ TESTS 16 0 0 1900
3377369 HighFlow D March 21, 2013, 10:55 p.m. OK GNU C++ TESTS 16 0 0 1900
3376433 visila D March 21, 2013, 6:37 p.m. OK GNU C++ TESTS 16 0 0 1900
3585326 teru D April 21, 2013, 1:53 p.m. OK GNU C++0x TESTS 16 15 0 1900
3399325 ishikado D March 24, 2013, 9:36 a.m. OK GNU C++0x TESTS 16 15 0 1900
3381188 __am D March 22, 2013, 2:30 p.m. OK GNU C++0x TESTS 16 15 0 1900
3378070 LocknKey D March 22, 2013, 4:23 a.m. OK GNU C++0x TESTS 16 15 0 1900
3376504 2011330300713 D March 21, 2013, 6:46 p.m. OK GNU C++0x TESTS 16 15 0 1900
3375896 Doxer D March 21, 2013, 5:56 p.m. OK GNU C++0x TESTS 16 15 0 1900
3374369 wodesuck D March 21, 2013, 4:58 p.m. OK GNU C++0x TESTS 16 15 0 1900
3373918 nomearod D March 21, 2013, 4:49 p.m. OK GNU C++0x TESTS 16 15 0 1900
3373885 htc550605125 D March 21, 2013, 4:48 p.m. OK GNU C++0x TESTS 16 15 0 1900
3373547 ahmad_mamdouh D March 21, 2013, 4:42 p.m. OK GNU C++0x TESTS 16 15 0 1900
69701803 Leonardo16 D Jan. 29, 2020, 1:16 a.m. OK GNU C++11 TESTS 16 30 0 1900
66506275 Magi D Dec. 8, 2019, 2:32 p.m. OK GNU C++11 TESTS 16 30 0 1900
56832484 BlakeGriffin D July 11, 2019, 7:37 a.m. OK GNU C++11 TESTS 16 30 0 1900
45378495 vjudge2 D Nov. 6, 2018, 1:32 p.m. OK GNU C++11 TESTS 16 30 0 1900
27470420 Fishsticks D May 31, 2017, 3:47 p.m. OK GNU C++11 TESTS 16 30 0 1900
22059328 tundra D Nov. 5, 2016, 3:23 p.m. OK GNU C++11 TESTS 16 30 0 1900
21179152 LSY_is_retired D Oct. 4, 2016, 5:30 a.m. OK GNU C++11 TESTS 16 30 0 1900
20793064 vntshh D Sept. 21, 2016, 11:24 a.m. OK GNU C++11 TESTS 16 30 0 1900
18982739 2020.01.09_Restart D July 9, 2016, 9:22 a.m. OK GNU C++11 TESTS 16 30 0 1900
17317942 Roka D April 14, 2016, 5:24 p.m. OK GNU C++11 TESTS 16 30 0 1900
61796016 mh755628 D Oct. 3, 2019, 5:16 p.m. OK GNU C++14 TESTS 16 30 0 1900
57290809 vjudge1 D July 18, 2019, 4:39 p.m. OK GNU C++14 TESTS 16 30 0 1900
56236312 LODB---D D June 28, 2019, 4:23 p.m. OK GNU C++14 TESTS 16 30 0 1900
54389009 tusg25 D May 19, 2019, 3:03 p.m. OK GNU C++14 TESTS 16 30 0 1900
45358347 vjudge3 D Nov. 6, 2018, 8:44 a.m. OK GNU C++14 TESTS 16 30 0 1900
41263367 vjudge1 D Aug. 6, 2018, 5:08 a.m. OK GNU C++14 TESTS 16 30 0 1900
41262926 Eden_CY D Aug. 6, 2018, 4:40 a.m. OK GNU C++14 TESTS 16 30 0 1900
39058650 _QWOiNYUIVMPFSBKLiGSMAP_ D June 9, 2018, 3:11 a.m. OK GNU C++14 TESTS 16 30 0 1900
32154267 vjudge2 D Nov. 9, 2017, 9:38 a.m. OK GNU C++14 TESTS 16 30 0 1900
30309941 Sahashoo D Sept. 13, 2017, 2:57 p.m. OK GNU C++14 TESTS 16 30 0 1900
66289585 cyg_serban D Dec. 4, 2019, 9:22 p.m. OK GNU C++17 TESTS 16 30 0 1900
54645509 quake0 D May 25, 2019, 11:45 p.m. OK GNU C++17 TESTS 16 30 0 1900
40045440 Rtn_e D July 6, 2018, 9:57 p.m. OK GNU C++17 TESTS 16 30 0 1900
41267010 vjudge1 D Aug. 6, 2018, 7:45 a.m. OK GNU C++17 TESTS 16 30 307200 1900
41267105 Shima_KZ D Aug. 6, 2018, 7:49 a.m. OK GNU C++17 TESTS 16 30 307200 1900
41266472 Zerokei D Aug. 6, 2018, 7:29 a.m. OK GNU C++17 TESTS 16 30 307200 1900
39981446 NullByte D July 5, 2018, 10:58 a.m. OK GNU C++17 TESTS 16 30 307200 1900
35816441 WooDeND D March 1, 2018, 5:56 p.m. OK GNU C++17 TESTS 16 30 1945600 1900
38817601 nishank.suresh D June 1, 2018, 4:01 a.m. OK GNU C++17 TESTS 16 30 3379200 1900
38822329 nishank.suresh D June 1, 2018, 8:28 a.m. OK GNU C++17 TESTS 16 30 3379200 1900
3375139 cojna D March 21, 2013, 5:16 p.m. OK Haskell TESTS 16 15 0 1900
3719525 ftiasch D May 14, 2013, 9:14 a.m. OK Haskell TESTS 16 15 0 1900
15977590 -g0d- g1zm0 D Feb. 12, 2016, 7:53 p.m. OK Haskell TESTS 16 30 0 1900
3421634 BananaTree D March 30, 2013, 7:04 a.m. OK Java 6 TESTS 16 78 0 1900
4076478 mkirsche D July 15, 2013, 3:46 p.m. OK Java 6 TESTS 16 78 2252800 1900
3380106 llaki D March 22, 2013, 11:44 a.m. OK Java 6 TESTS 16 78 2252800 1900
3375971 PeterGriffin D March 21, 2013, 6:01 p.m. OK Java 6 TESTS 16 78 2252800 1900
3374070 emo D March 21, 2013, 4:52 p.m. OK Java 6 TESTS 16 78 2252800 1900
3373966 I_love_Malika D March 21, 2013, 4:50 p.m. OK Java 6 TESTS 16 78 2252800 1900
3373582 hs484 D March 21, 2013, 4:42 p.m. OK Java 6 TESTS 16 78 2252800 1900
3373211 lightning D March 21, 2013, 4:36 p.m. OK Java 6 TESTS 16 78 2252800 1900
3371713 wackloner D March 21, 2013, 4:13 p.m. OK Java 6 TESTS 16 78 2252800 1900
3694839 gilesg D May 9, 2013, 12:46 a.m. OK Java 6 TESTS 16 93 0 1900
3413165 khanhptnk D March 27, 2013, 6:34 p.m. OK Java 7 TESTS 16 62 0 1900
3370506 mmaxio D March 21, 2013, 4 p.m. OK Java 7 TESTS 16 62 0 1900
3416547 mashinist D March 28, 2013, 4:57 p.m. OK Java 7 TESTS 16 78 0 1900
3382321 gh_ost D March 22, 2013, 7:06 p.m. OK Java 7 TESTS 16 78 0 1900
3378968 boleyn.su D March 22, 2013, 8:28 a.m. OK Java 7 TESTS 16 78 0 1900
3377561 diego.link D March 22, 2013, 12:12 a.m. OK Java 7 TESTS 16 78 0 1900
3376175 yasser_adel D March 21, 2013, 6:12 p.m. OK Java 7 TESTS 16 78 0 1900
3375215 elunichkin D March 21, 2013, 5:17 p.m. OK Java 7 TESTS 16 78 0 1900
3372944 dusty.and.rusty D March 21, 2013, 4:32 p.m. OK Java 7 TESTS 16 78 0 1900
3372109 Venia D March 21, 2013, 4:19 p.m. OK Java 7 TESTS 16 78 0 1900
68775214 an09mous D Jan. 14, 2020, 1:12 p.m. OK Java 8 TESTS 16 218 0 1900
30174006 mualanhlung017 D Sept. 7, 2017, 6:55 a.m. OK Java 8 TESTS 16 218 0 1900
20481057 FinnTheHuman D Sept. 9, 2016, 3:16 p.m. OK Java 8 TESTS 16 218 0 1900
24639530 Ahmad_Elsagheer D Feb. 13, 2017, 11:54 p.m. OK Java 8 TESTS 16 248 20582400 1900
20827023 Dukkha D Sept. 22, 2016, 9:35 p.m. OK Java 8 TESTS 16 278 0 1900
12393428 alibaba D Aug. 6, 2015, 7:25 p.m. OK Java 8 TESTS 16 1652 0 1900
3378030 dwoolley3 D March 22, 2013, 4:07 a.m. OK Mono C# TESTS 16 31 0 1900
3375038 MShalabod D March 21, 2013, 5:13 p.m. OK MS C++ TESTS 16 0 0 1900
3377987 1106100011 D March 22, 2013, 3:45 a.m. OK MS C++ TESTS 16 0 0 1900
3375818 Amir.bh D March 21, 2013, 5:29 p.m. OK MS C++ TESTS 16 0 0 1900
3374670 serejkee D March 21, 2013, 5:04 p.m. OK MS C++ TESTS 16 0 0 1900
3373992 Timur_Sitdikov D March 21, 2013, 4:50 p.m. OK MS C++ TESTS 16 0 0 1900
3560214 xin5739 D April 18, 2013, 12:09 p.m. OK MS C++ TESTS 16 15 0 1900
3453203 sn23581 D April 2, 2013, 2:54 p.m. OK MS C++ TESTS 16 15 0 1900
3424449 harhrayr D March 30, 2013, 8:13 p.m. OK MS C++ TESTS 16 15 0 1900
3730790 eater D May 17, 2013, 5:31 p.m. OK MS C++ TESTS 16 15 0 1900
3635817 izban D April 26, 2013, 12:50 p.m. OK MS C++ TESTS 16 15 0 1900
61461783 Ry009002 D Sept. 29, 2019, 8:49 a.m. OK MS C++ 2017 TESTS 16 62 0 1900
61461037 Ry009002 D Sept. 29, 2019, 8:33 a.m. OK MS C++ 2017 TESTS 16 62 0 1900
3373157 MinakoKojima D March 21, 2013, 4:35 p.m. OK Ocaml TESTS 16 15 0 1900
35843166 ______M______ D March 2, 2018, 3:06 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35857490 ______u______ D March 2, 2018, 8:40 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35857427 ______n______ D March 2, 2018, 8:40 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35856987 _____i_____ D March 2, 2018, 8:32 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35856612 _____k_____ D March 2, 2018, 8:23 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35848013 ______h______ D March 2, 2018, 4:51 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35848006 ______k______ D March 2, 2018, 4:51 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
35847835 ______i______ D March 2, 2018, 4:50 p.m. OK PyPy 2 TESTS 16 124 21299200 1900
22948968 Noureldin D Dec. 14, 2016, 1:01 p.m. OK PyPy 2 TESTS 16 154 0 1900
23548029 Yash_ D Jan. 5, 2017, 5:28 a.m. OK PyPy 2 TESTS 16 154 22016000 1900
54454173 LeiviniaBirdway D May 21, 2019, 2:57 p.m. OK PyPy 3 TESTS 16 248 0 1900
4038198 justforlaugh D July 8, 2013, 9:56 a.m. OK Python 2 TESTS 16 46 0 1900
4031454 nab D July 6, 2013, 3:06 p.m. OK Python 2 TESTS 16 46 0 1900
3771100 HARSH94 D May 26, 2013, 10:01 a.m. OK Python 2 TESTS 16 46 0 1900
3732447 tryPython D May 18, 2013, 7:39 a.m. OK Python 2 TESTS 16 46 0 1900
3695749 Feu D May 9, 2013, 10:36 a.m. OK Python 2 TESTS 16 46 0 1900
3472137 havaliza D April 4, 2013, 8:55 a.m. OK Python 2 TESTS 16 46 0 1900
3411424 alpczy D March 27, 2013, 11:09 a.m. OK Python 2 TESTS 16 46 0 1900
3382812 sixujie D March 22, 2013, 10:27 p.m. OK Python 2 TESTS 16 46 0 1900
3379648 ko3a4ok D March 22, 2013, 10:37 a.m. OK Python 2 TESTS 16 46 0 1900
3378731 yejinru D March 22, 2013, 7:26 a.m. OK Python 2 TESTS 16 46 0 1900
3375993 master_alish D March 21, 2013, 6:02 p.m. OK Ruby TESTS 16 46 0 1900

remove filters

Back to search problems