Codeforces Round 176 (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
286 Codeforces Round 176 (Div. 1) FINISHED False 7200 373672797 March 23, 2013, 8 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1127 ) B Shifting PROGRAMMING implementation 2500

B"John Doe has found the beautiful permutation formula. Let's take permutation p xe2 x80 x89= xe2 x80 x89p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pn. Let's define transformation f of this permutation: where k (k xe2 x80 x89> xe2 x80 x891) is an integer, the transformation parameter, r is such maximum integer that rk xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n. If rk xe2 x80 x89= xe2 x80 x89n, then elements prk xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89prk xe2 x80 x89+ xe2 x80 x892 and so on are omitted. In other words, the described transformation of permutation p cyclically shifts to the left each consecutive block of length k and the last block with the length equal to the remainder after dividing n by k. John Doe thinks that permutation f(f( ... f(p xe2 x80 x89= xe2 x80 x89[1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89n], xe2 x80 x892) ... , xe2 x80 x89n xe2 x80 x89- xe2 x80 x891), xe2 x80 x89n) is beautiful. Unfortunately, he cannot quickly find the beautiful permutation he's interested in. That's why he asked you to help him. Your task is to find a beautiful permutation for the given n. For clarifications, see the notes to the third sample. A single line contains integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). Print n distinct space-separated integers from 1 to n -- a beautiful permutation of size n. A note to the third test sample: "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3406028 Gassa B March 25, 2013, 11:09 p.m. OK D TESTS 51 1062 8089600 2500
3406015 Gassa B March 25, 2013, 11:05 p.m. OK D TESTS 51 1125 8089600 2500
3406002 Gassa B March 25, 2013, 10:55 p.m. OK D TESTS 51 1156 21708800 2500
3397035 Gassa B March 23, 2013, 8:15 p.m. OK D TESTS 51 1203 12185600 2500
3387755 Gassa B March 23, 2013, 8:41 a.m. OK D TESTS 51 1250 12185600 2500
3393599 amirrr B March 23, 2013, 11:03 a.m. OK Delphi TESTS 51 234 12083200 2500
3401425 AHTuTTuTyX B March 24, 2013, 6:30 p.m. OK Delphi TESTS 51 265 11980800 2500
4369905 IgorL B Aug. 30, 2013, 10:12 a.m. OK Delphi TESTS 51 280 40140800 2500
3402744 AleksanderBalobanov B March 25, 2013, 7:56 a.m. OK Delphi TESTS 51 1872 48128000 2500
3387931 vlad107 B March 23, 2013, 8:44 a.m. OK FPC TESTS 51 156 7987200 2500
3418102 IMAN_GH B March 29, 2013, 7:37 a.m. OK FPC TESTS 51 171 7987200 2500
3408252 syx1994 B March 26, 2013, 12:51 p.m. OK FPC TESTS 51 171 7987200 2500
3397645 zscc B March 24, 2013, 1:59 a.m. OK FPC TESTS 51 187 20070400 2500
3403371 Oryshych B March 25, 2013, 10:45 a.m. OK FPC TESTS 51 203 7987200 2500
3404758 tsunayoshi B March 25, 2013, 2:48 p.m. OK FPC TESTS 51 218 8192000 2500
3394621 con_nha_ngheo B March 23, 2013, 1:05 p.m. OK FPC TESTS 51 218 8192000 2500
3847422 Nik_Storm_2010 B June 8, 2013, 2:09 p.m. OK FPC TESTS 51 234 7987200 2500
3412512 Furko B March 27, 2013, 3:15 p.m. OK FPC TESTS 51 296 11980800 2500
3400192 ig_dug B March 24, 2013, 12:55 p.m. OK FPC TESTS 51 390 16076800 2500
3410766 atpec B March 27, 2013, 8:12 a.m. OK GNU C TESTS 51 437 7987200 2500
3408764 uoryon B March 26, 2013, 3:10 p.m. OK GNU C TESTS 51 453 7987200 2500
3394315 E478 B March 23, 2013, 12:24 p.m. OK GNU C TESTS 51 453 8499200 2500
3392872 kawatea B March 23, 2013, 10:20 a.m. OK GNU C TESTS 51 500 7987200 2500
5614829 vis10326 B Jan. 4, 2014, 9:05 a.m. OK GNU C TESTS 51 530 3993600 2500
3388829 ali_fiujnomali B March 23, 2013, 8:59 a.m. OK GNU C TESTS 51 562 16793600 2500
41828389 Scut82 B Aug. 19, 2018, 1:19 p.m. OK GNU C++ TESTS 51 186 7987200 2500
41878461 Scut82 B Aug. 19, 2018, 11:08 p.m. OK GNU C++ TESTS 51 218 8806400 2500
3551930 Simplex B April 16, 2013, 11:02 a.m. OK GNU C++ TESTS 51 234 7987200 2500
3391438 Sisu B March 23, 2013, 9:46 a.m. OK GNU C++ TESTS 51 234 20992000 2500
4365806 I_love_Tanya_Romanova B Aug. 29, 2013, 11:58 a.m. OK GNU C++ TESTS 51 248 11980800 2500
12917815 jiangshibiao B Sept. 10, 2015, 4:36 a.m. OK GNU C++ TESTS 51 248 16076800 2500
12917809 jiangshibiao B Sept. 10, 2015, 4:35 a.m. OK GNU C++ TESTS 51 248 16076800 2500
3415227 Isaacpei B March 28, 2013, 11:50 a.m. OK GNU C++ TESTS 51 250 7987200 2500
3408472 evima B March 26, 2013, 1:47 p.m. OK GNU C++ TESTS 51 250 7987200 2500
4927549 MakingMaker B Oct. 29, 2013, 9:34 a.m. OK GNU C++ TESTS 51 265 7987200 2500
3406349 roosephu B March 26, 2013, 3:20 a.m. OK GNU C++0x TESTS 51 234 8806400 2500
4199162 mruxim B July 29, 2013, 11:23 a.m. OK GNU C++0x TESTS 51 248 7987200 2500
3424014 hex539 B March 30, 2013, 5:59 p.m. OK GNU C++0x TESTS 51 265 7987200 2500
3393574 rob.kh B March 23, 2013, 11 a.m. OK GNU C++0x TESTS 51 312 13209600 2500
3417335 stan B March 28, 2013, 10:09 p.m. OK GNU C++0x TESTS 51 328 7987200 2500
3408315 ishikado B March 26, 2013, 1:08 p.m. OK GNU C++0x TESTS 51 343 7987200 2500
6912441 multisystem B June 19, 2014, 12:37 p.m. OK GNU C++0x TESTS 51 372 7987200 2500
6511615 moh.amr B April 30, 2014, 4:02 p.m. OK GNU C++0x TESTS 51 372 7987200 2500
3394677 edward_mj B March 23, 2013, 1:11 p.m. OK GNU C++0x TESTS 51 406 7987200 2500
3473415 sokian B April 4, 2013, 2:38 p.m. OK GNU C++0x TESTS 51 421 7987200 2500
68480261 cor001 B Jan. 10, 2020, 7:26 a.m. OK GNU C++11 TESTS 51 404 7987200 2500
52773020 iSika B April 15, 2019, 10:18 a.m. OK GNU C++11 TESTS 51 436 7884800 2500
62875344 221 B Oct. 18, 2019, 3:07 p.m. OK GNU C++11 TESTS 51 436 7987200 2500
62754144 EntityIT B Oct. 17, 2019, 3:28 a.m. OK GNU C++11 TESTS 51 436 7987200 2500
62335413 oh_yes B Oct. 11, 2019, 12:32 a.m. OK GNU C++11 TESTS 51 436 7987200 2500
62753339 atoiz B Oct. 17, 2019, 2:57 a.m. OK GNU C++11 TESTS 51 436 8192000 2500
57821325 py_ultron B July 26, 2019, 11:32 p.m. OK GNU C++11 TESTS 51 466 7884800 2500
62261376 an_interesting_name B Oct. 10, 2019, 12:21 p.m. OK GNU C++11 TESTS 51 466 7987200 2500
55714275 vjudge1 B June 18, 2019, 11:53 a.m. OK GNU C++11 TESTS 51 466 7987200 2500
68481526 cor001 B Jan. 10, 2020, 7:57 a.m. OK GNU C++11 TESTS 51 468 3993600 2500
64306088 Sixpathsguy B Nov. 5, 2019, 11:28 a.m. OK GNU C++14 TESTS 51 342 7987200 2500
35533539 loyolman B Feb. 20, 2018, 9:17 p.m. OK GNU C++14 TESTS 51 372 9932800 2500
62875248 phamhoanghiep03092004 B Oct. 18, 2019, 3:05 p.m. OK GNU C++14 TESTS 51 374 7987200 2500
62754928 lmtdora2004 B Oct. 17, 2019, 4 a.m. OK GNU C++14 TESTS 51 374 7987200 2500
62669775 minhtung04042001 B Oct. 16, 2019, 9:18 a.m. OK GNU C++14 TESTS 51 374 7987200 2500
48361830 anjn98 B Jan. 13, 2019, 7 p.m. OK GNU C++14 TESTS 51 374 7987200 2500
64305633 Sixpathsguy B Nov. 5, 2019, 11:22 a.m. OK GNU C++14 TESTS 51 374 8294400 2500
33380772 shyamkb B Dec. 18, 2017, 1:26 p.m. OK GNU C++14 TESTS 51 374 9932800 2500
66423897 pacha2880 B Dec. 6, 2019, 8:14 p.m. OK GNU C++14 TESTS 51 374 12083200 2500
65533845 rfpermen B Nov. 22, 2019, 1:26 p.m. OK GNU C++14 TESTS 51 404 7987200 2500
57505938 mehuld B July 22, 2019, 12:02 p.m. OK GNU C++17 TESTS 51 342 12697600 2500
47082202 UnstoppableChillMachine B Dec. 15, 2018, 8:51 p.m. OK GNU C++17 TESTS 51 372 7987200 2500
55704396 tubone B June 18, 2019, 6:46 a.m. OK GNU C++17 TESTS 51 374 9011200 2500
62751966 manh9203 B Oct. 17, 2019, 2:02 a.m. OK GNU C++17 TESTS 51 374 11980800 2500
47825300 tfg B Jan. 1, 2019, 9:51 p.m. OK GNU C++17 TESTS 51 374 16076800 2500
63089691 rareone0602 B Oct. 21, 2019, 5:55 p.m. OK GNU C++17 TESTS 51 404 4505600 2500
62752768 user202729_ B Oct. 17, 2019, 2:36 a.m. OK GNU C++17 TESTS 51 404 7987200 2500
60185939 vertebruh B Sept. 6, 2019, 6:29 p.m. OK GNU C++17 TESTS 51 404 7987200 2500
44536884 karansiwach360 B Oct. 19, 2018, 9:22 a.m. OK GNU C++17 TESTS 51 404 7987200 2500
48192246 Maycon_708 B Jan. 10, 2019, 6:39 p.m. OK GNU C++17 TESTS 51 404 8294400 2500
3422687 TheScarletDragon B March 30, 2013, 11:37 a.m. OK Java 6 TESTS 51 468 58470400 2500
3387633 uwi B March 23, 2013, 8:39 a.m. OK Java 6 TESTS 51 515 204800 2500
3391426 AlexanderBolshakov B March 23, 2013, 9:46 a.m. OK Java 6 TESTS 51 531 4300800 2500
3393793 todo B March 23, 2013, 11:22 a.m. OK Java 6 TESTS 51 531 58470400 2500
3393749 bsrkaditya B March 23, 2013, 11:17 a.m. OK Java 6 TESTS 51 578 204800 2500
3426513 llaki B March 31, 2013, 9:16 a.m. OK Java 6 TESTS 51 578 18432000 2500
3609431 hama-du B April 23, 2013, 6 a.m. OK Java 6 TESTS 51 578 58572800 2500
3969080 Sammarize B June 27, 2013, 10:21 p.m. OK Java 6 TESTS 51 578 71270400 2500
3391267 tsukuno B March 23, 2013, 9:43 a.m. OK Java 6 TESTS 51 593 58470400 2500
3406336 hiukim B March 26, 2013, 3:16 a.m. OK Java 6 TESTS 51 609 204800 2500
3389472 yaro B March 23, 2013, 9:10 a.m. OK Java 7 TESTS 51 437 0 2500
6481139 HidenoriS B April 26, 2014, 10:38 p.m. OK Java 7 TESTS 51 466 58470400 2500
3702951 hack_tm B May 11, 2013, 3:44 p.m. OK Java 7 TESTS 51 468 0 2500
3385794 Egor B March 23, 2013, 8:15 a.m. OK Java 7 TESTS 51 515 3993600 2500
3387796 niyaznigmatul B March 23, 2013, 8:42 a.m. OK Java 7 TESTS 51 515 58265600 2500
3702339 ftiasch B May 11, 2013, 12:10 p.m. OK Java 7 TESTS 51 531 0 2500
3405040 bearf B March 25, 2013, 3:53 p.m. OK Java 7 TESTS 51 531 102400 2500
3425353 1Shreesh B March 31, 2013, 3:39 a.m. OK Java 7 TESTS 51 562 3993600 2500
3393062 ysyshtc B March 23, 2013, 10:30 a.m. OK Java 7 TESTS 51 578 102400 2500
4358808 DoublePointer B Aug. 27, 2013, 7:57 p.m. OK Java 7 TESTS 51 654 0 2500
38998662 amnesiac_dusk B June 6, 2018, 3:34 p.m. OK Java 8 TESTS 51 590 49868800 2500
63245191 StayAwayFromBitches B Oct. 23, 2019, 2:28 p.m. OK Java 8 TESTS 51 622 7680000 2500
21223134 miguelmaurizio B Oct. 5, 2016, 11:26 p.m. OK Java 8 TESTS 51 684 6144000 2500
11259561 AlexFetisov B May 25, 2015, 1:14 a.m. OK Java 8 TESTS 51 684 16179200 2500
9480514 AStepanov B Jan. 19, 2015, 11:31 p.m. OK Java 8 TESTS 51 748 0 2500
9480508 AStepanov B Jan. 19, 2015, 11:29 p.m. OK Java 8 TESTS 51 748 0 2500
39205888 dipankar12 B June 13, 2018, 4:20 a.m. OK Java 8 TESTS 51 778 12288000 2500
36753323 Ahmad_Elsagheer B March 30, 2018, 4:28 p.m. OK Java 8 TESTS 51 810 30310400 2500
12692915 alibaba B Aug. 25, 2015, 8:11 a.m. OK Java 8 TESTS 51 1558 17817600 2500
3414262 onigiri B March 28, 2013, 6:22 a.m. OK Mono C# TESTS 51 375 59187200 2500
3393746 Sklyack B March 23, 2013, 11:16 a.m. OK MS C++ TESTS 51 421 7987200 2500
3391479 lzsb B March 23, 2013, 9:47 a.m. OK MS C++ TESTS 51 421 7987200 2500
3401359 ADJA B March 24, 2013, 5:57 p.m. OK MS C++ TESTS 51 421 7987200 2500
3397251 Monyura B March 23, 2013, 9:36 p.m. OK MS C++ TESTS 51 437 7987200 2500
3386272 Timur_Sitdikov B March 23, 2013, 8:21 a.m. OK MS C++ TESTS 51 453 11980800 2500
3387120 Endagorion B March 23, 2013, 8:32 a.m. OK MS C++ TESTS 51 468 3993600 2500
3410777 HIR180 B March 27, 2013, 8:15 a.m. OK MS C++ TESTS 51 468 7987200 2500
3396871 shindannin B March 23, 2013, 7:31 p.m. OK MS C++ TESTS 51 468 12083200 2500
3388377 bayleef B March 23, 2013, 8:51 a.m. OK MS C++ TESTS 51 484 7987200 2500
3385942 RAD B March 23, 2013, 8:17 a.m. OK MS C++ TESTS 51 500 12390400 2500

remove filters

Back to search problems