Codeforces Round 183 (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
303 Codeforces Round 183 (Div. 1) FINISHED False 7200 363459599 May 12, 2013, 1 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7970 ) A Lucky Permutation Triple PROGRAMMING constructive algorithms implementation math 1400

B'Bike is interested in permutations. A permutation of length n is an integer sequence such that each integer from 0 to (n xe2 x80 x89- xe2 x80 x891) appears exactly once in it. For example, [0, xe2 x80 x892, xe2 x80 x891] is a permutation of length 3 while both [0, xe2 x80 x892, xe2 x80 x892] and [1, xe2 x80 x892, xe2 x80 x893] is not. A permutation triple of permutations of length n (a, xe2 x80 x89b, xe2 x80 x89c) is called a Lucky Permutation Triple if and only if . The sign ai denotes the i-th element of permutation a. The modular equality described above denotes that the remainders after dividing ai xe2 x80 x89+ xe2 x80 x89bi by n and dividing ci by n are equal. Now, he has an integer n and wants to find a Lucky Permutation Triple. Could you please help him? 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 x89105). If no Lucky Permutation Triple of length n exists print -1. Otherwise, you need to print three lines. Each line contains n space-seperated integers. The first line must contain permutation a, the second line -- permutation b, the third -- permutation c. If there are multiple solutions, print any of them. In Sample 1, the permutation triple ([1, xe2 x80 x894, xe2 x80 x893, xe2 x80 x892, xe2 x80 x890], xe2 x80 x89[1, xe2 x80 x890, xe2 x80 x892, xe2 x80 x894, xe2 x80 x893], xe2 x80 x89[2, xe2 x80 x894, xe2 x80 x890, xe2 x80 x891, xe2 x80 x893]) is Lucky Permutation Triple, as following holds: In Sample 2, you can easily notice that no lucky permutation triple exists.'...

Tutorials

Codeforces Round #183 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3706297 Gassa A May 12, 2013, 1:07 p.m. OK D TESTS 54 234 921600 1400
3706461 Timur_Keks A May 12, 2013, 1:09 p.m. OK Delphi TESTS 54 46 102400 1400
3712732 ruban A May 12, 2013, 3:48 p.m. OK Delphi TESTS 54 62 0 1400
3708862 Golovanov399 A May 12, 2013, 1:54 p.m. OK Delphi TESTS 54 62 0 1400
4030327 AleksanderBalobanov A July 6, 2013, 9:34 a.m. OK Delphi TESTS 54 62 102400 1400
3707516 IgorL A May 12, 2013, 1:25 p.m. OK Delphi TESTS 54 62 102400 1400
3706606 equi A May 12, 2013, 1:11 p.m. OK Delphi TESTS 54 62 102400 1400
3712300 Flyrise A May 12, 2013, 3:25 p.m. OK Delphi TESTS 54 62 1228800 1400
3706919 valeriy.stromov A May 12, 2013, 1:15 p.m. OK Delphi TESTS 54 62 32256000 1400
3706354 TheHedgehog A May 12, 2013, 1:08 p.m. OK Delphi TESTS 54 78 0 1400
3706309 Misha100896 A May 12, 2013, 1:07 p.m. OK Delphi TESTS 54 78 0 1400
4133779 KTS A July 22, 2013, 8:19 a.m. OK FPC TESTS 54 31 0 1400
3713157 LazyMist A May 12, 2013, 4:18 p.m. OK FPC TESTS 54 31 0 1400
3712423 Nik_Storm_2010 A May 12, 2013, 3:36 p.m. OK FPC TESTS 54 31 0 1400
3707151 temich A May 12, 2013, 1:19 p.m. OK FPC TESTS 54 31 0 1400
3706936 i14 A May 12, 2013, 1:15 p.m. OK FPC TESTS 54 31 0 1400
3965785 TiChuot97 A June 27, 2013, 3:04 a.m. OK FPC TESTS 54 31 409600 1400
4006184 metalopocalipsis A July 3, 2013, 9:59 a.m. OK FPC TESTS 54 46 0 1400
3755585 hxywtc A May 22, 2013, 5:50 a.m. OK FPC TESTS 54 46 0 1400
3729237 jtc172 A May 17, 2013, 9:17 a.m. OK FPC TESTS 54 46 0 1400
3727844 mbrc A May 16, 2013, 5 p.m. OK FPC TESTS 54 46 0 1400
3713314 liouzhou_101 A May 12, 2013, 4:42 p.m. OK GNU C TESTS 54 93 0 1400
3740434 popuvy A May 19, 2013, 1:46 p.m. OK GNU C TESTS 54 109 0 1400
3733820 Eurce A May 18, 2013, 1:56 p.m. OK GNU C TESTS 54 109 0 1400
3728770 dwise A May 17, 2013, 1:21 a.m. OK GNU C TESTS 54 109 0 1400
3706712 ali_fiujnomali A May 12, 2013, 1:12 p.m. OK GNU C TESTS 54 109 0 1400
3706328 kawatea A May 12, 2013, 1:07 p.m. OK GNU C TESTS 54 109 0 1400
3733091 neelshahr92 A May 18, 2013, 10:18 a.m. OK GNU C TESTS 54 109 819200 1400
3712409 HARSH94 A May 12, 2013, 3:34 p.m. OK GNU C TESTS 54 109 11980800 1400
42134725 MQstafa A Aug. 26, 2018, 10:09 p.m. OK GNU C TESTS 54 124 0 1400
29491700 tanus_era A Aug. 15, 2017, 8:39 p.m. OK GNU C TESTS 54 124 1945600 1400
3715085 ACMonster A May 13, 2013, 4:53 a.m. OK GNU C++ TESTS 54 31 0 1400
3713408 al35n A May 12, 2013, 4:57 p.m. OK GNU C++ TESTS 54 46 0 1400
41927746 Scut82 A Aug. 21, 2018, 8:22 a.m. OK GNU C++ TESTS 54 62 0 1400
4932199 I_love_tigersugar A Oct. 30, 2013, 6:35 a.m. OK GNU C++ TESTS 54 62 0 1400
4916996 AloneWolf A Oct. 27, 2013, 8:17 p.m. OK GNU C++ TESTS 54 62 0 1400
3782319 keivan A May 27, 2013, 5:34 a.m. OK GNU C++ TESTS 54 62 0 1400
3721376 LGM A May 14, 2013, 6:01 p.m. OK GNU C++ TESTS 54 62 0 1400
3707686 robert_rosolek A May 12, 2013, 1:29 p.m. OK GNU C++ TESTS 54 62 0 1400
3707278 marina_h A May 12, 2013, 1:21 p.m. OK GNU C++ TESTS 54 62 0 1400
3706458 maciejk A May 12, 2013, 1:09 p.m. OK GNU C++ TESTS 54 62 0 1400
3723135 Isaacpei A May 15, 2013, 10:17 a.m. OK GNU C++0x TESTS 54 62 0 1400
3706426 kraskevich A May 12, 2013, 1:09 p.m. OK GNU C++0x TESTS 54 62 0 1400
3706572 mruxim A May 12, 2013, 1:10 p.m. OK GNU C++0x TESTS 54 78 409600 1400
3707120 acedpedped A May 12, 2013, 1:18 p.m. OK GNU C++0x TESTS 54 78 819200 1400
3707200 srnth A May 12, 2013, 1:19 p.m. OK GNU C++0x TESTS 54 78 1228800 1400
3724342 hex539 A May 15, 2013, 4:45 p.m. OK GNU C++0x TESTS 54 78 1331200 1400
9198772 JohStraat A Dec. 19, 2014, 4:07 p.m. OK GNU C++0x TESTS 54 92 0 1400
6100080 nic11 A March 21, 2014, 5:53 p.m. OK GNU C++0x TESTS 54 92 0 1400
5866441 NimaV A Feb. 2, 2014, 3:28 a.m. OK GNU C++0x TESTS 54 92 0 1400
4170729 Kostroma A July 26, 2013, 3:16 p.m. OK GNU C++0x TESTS 54 92 0 1400
57821132 py_ultron A July 26, 2019, 11:20 p.m. OK GNU C++11 TESTS 54 122 0 1400
26291317 Reiketsu A April 11, 2017, 6:25 a.m. OK GNU C++11 TESTS 54 122 2150400 1400
25500069 shenzui A March 15, 2017, 1:57 p.m. OK GNU C++11 TESTS 54 122 3276800 1400
68486309 Hazyknight A Jan. 10, 2020, 9:52 a.m. OK GNU C++11 TESTS 54 124 0 1400
59959682 vjudge3 A Sept. 3, 2019, 5:30 p.m. OK GNU C++11 TESTS 54 124 0 1400
59894485 luogu_bot3 A Sept. 2, 2019, 11:38 a.m. OK GNU C++11 TESTS 54 124 0 1400
52995772 Ufowoqqqo A April 19, 2019, 3:37 a.m. OK GNU C++11 TESTS 54 124 0 1400
51616202 Rainbow_sjy A March 21, 2019, 12:32 p.m. OK GNU C++11 TESTS 54 124 0 1400
51615997 liuyifan A March 21, 2019, 12:28 p.m. OK GNU C++11 TESTS 54 124 0 1400
49131327 ZqlwMatt A Jan. 29, 2019, 4:27 a.m. OK GNU C++11 TESTS 54 124 0 1400
51270484 IsaacMoris A March 13, 2019, 5:45 p.m. OK GNU C++14 TESTS 54 92 0 1400
48452385 Oddity A Jan. 16, 2019, 11:13 a.m. OK GNU C++14 TESTS 54 92 0 1400
41899570 caido A Aug. 20, 2018, 11:27 a.m. OK GNU C++14 TESTS 54 92 0 1400
30201288 Big_black_jujube A Sept. 8, 2017, 11:47 a.m. OK GNU C++14 TESTS 54 92 0 1400
27750821 Klift A June 13, 2017, 7:23 a.m. OK GNU C++14 TESTS 54 92 0 1400
27663088 Ikkzatly A June 8, 2017, 4:43 a.m. OK GNU C++14 TESTS 54 92 0 1400
27278775 duongoku A May 22, 2017, 7:23 a.m. OK GNU C++14 TESTS 54 92 0 1400
27278402 dkvinh10a2 A May 22, 2017, 6:54 a.m. OK GNU C++14 TESTS 54 92 0 1400
27278247 daminho A May 22, 2017, 6:40 a.m. OK GNU C++14 TESTS 54 92 0 1400
27278072 dkvinh10a2 A May 22, 2017, 6:27 a.m. OK GNU C++14 TESTS 54 92 0 1400
67475244 Rezaul_Karim A Dec. 23, 2019, 2:08 p.m. OK GNU C++17 TESTS 54 92 0 1400
53905871 trungvthe130284 A May 9, 2019, 12:42 p.m. OK GNU C++17 TESTS 54 92 0 1400
66777144 vjudge2 A Dec. 13, 2019, 10:32 a.m. OK GNU C++17 TESTS 54 92 1228800 1400
39229400 vjudge2 A June 14, 2018, 1:42 a.m. OK GNU C++17 TESTS 54 92 1740800 1400
52942742 kazak A April 18, 2019, 10:03 a.m. OK GNU C++17 TESTS 54 92 2150400 1400
69527357 vjudge5 A Jan. 25, 2020, 3:38 p.m. OK GNU C++17 TESTS 54 122 0 1400
68726548 rspr A Jan. 13, 2020, 6:08 p.m. OK GNU C++17 TESTS 54 122 0 1400
61722985 mblazev A Oct. 2, 2019, 2:19 p.m. OK GNU C++17 TESTS 54 122 0 1400
61722244 aryanc403 A Oct. 2, 2019, 2:05 p.m. OK GNU C++17 TESTS 54 122 0 1400
61721814 dorijanlendvaj A Oct. 2, 2019, 1:59 p.m. OK GNU C++17 TESTS 54 122 0 1400
8083931 7rx A Oct. 5, 2014, 9:37 a.m. OK Go TESTS 54 92 0 1400
8075416 Michael542 A Oct. 4, 2014, 7:58 a.m. OK Go TESTS 54 124 0 1400
8078857 arnoldjulians A Oct. 4, 2014, 3:05 p.m. OK Go TESTS 54 1496 0 1400
8074101 EricSum A Oct. 4, 2014, 4:12 a.m. OK Go TESTS 54 1620 0 1400
3706745 cojna A May 12, 2013, 1:12 p.m. OK Haskell TESTS 54 62 0 1400
3721334 jmazon A May 14, 2013, 5:51 p.m. OK Haskell TESTS 54 109 1126400 1400
10305472 mjf A March 16, 2015, 9:34 p.m. OK Haskell TESTS 54 154 6553600 1400
3706499 sayuan A May 12, 2013, 1:09 p.m. OK Java 6 TESTS 54 140 204800 1400
3707384 emo A May 12, 2013, 1:23 p.m. OK Java 6 TESTS 54 171 204800 1400
3706716 Slamur A May 12, 2013, 1:12 p.m. OK Java 6 TESTS 54 171 512000 1400
3857338 xiaowuc1 A June 11, 2013, 12:20 p.m. OK Java 6 TESTS 54 187 204800 1400
3706369 uwi A May 12, 2013, 1:08 p.m. OK Java 6 TESTS 54 187 204800 1400
3933688 Sammarize A June 21, 2013, 7:48 p.m. OK Java 6 TESTS 54 187 2560000 1400
3718468 Mostafa.Ali A May 13, 2013, 10:44 p.m. OK Java 6 TESTS 54 187 2560000 1400
4056071 mkirsche A July 12, 2013, 6:43 p.m. OK Java 6 TESTS 54 203 204800 1400
3713416 slycelote A May 12, 2013, 4:58 p.m. OK Java 6 TESTS 54 203 204800 1400
3707054 PeterGriffin A May 12, 2013, 1:17 p.m. OK Java 6 TESTS 54 203 204800 1400
3713132 derxyz A May 12, 2013, 4:16 p.m. OK Java 7 TESTS 54 109 102400 1400
3966061 Soldat A June 27, 2013, 5:40 a.m. OK Java 7 TESTS 54 140 0 1400
3718796 rpk74m A May 14, 2013, 3:55 a.m. OK Java 7 TESTS 54 140 0 1400
3706156 I-juice A May 12, 2013, 1:05 p.m. OK Java 7 TESTS 54 140 0 1400
3706647 ixxa A May 12, 2013, 1:11 p.m. OK Java 7 TESTS 54 140 102400 1400
7335741 upsolving A Aug. 3, 2014, 7:40 a.m. OK Java 7 TESTS 54 156 0 1400
3706594 qwerty787788 A May 12, 2013, 1:11 p.m. OK Java 7 TESTS 54 156 0 1400
3706505 SergeyLazarev A May 12, 2013, 1:09 p.m. OK Java 7 TESTS 54 156 0 1400
3706496 niyaznigmatul A May 12, 2013, 1:09 p.m. OK Java 7 TESTS 54 156 0 1400
3706439 alexey.enkov A May 12, 2013, 1:09 p.m. OK Java 7 TESTS 54 156 0 1400
58938797 Sleep A Aug. 17, 2019, 5:57 a.m. OK Java 8 TESTS 54 248 0 1400
28642164 tomdmitriev A July 17, 2017, 2:15 p.m. OK Java 8 TESTS 54 248 26214400 1400
27656966 unequitedscript A June 7, 2017, 6:43 p.m. OK Java 8 TESTS 54 278 0 1400
56861735 Xylenox A July 11, 2019, 11:14 p.m. OK Java 8 TESTS 54 280 0 1400
30940971 Kammola A Oct. 2, 2017, 11:29 a.m. OK Java 8 TESTS 54 280 0 1400
30914772 Ahmad_Elsagheer A Oct. 1, 2017, 5:09 p.m. OK Java 8 TESTS 54 280 0 1400
30914688 Ahmad_Elsagheer A Oct. 1, 2017, 5:05 p.m. OK Java 8 TESTS 54 280 0 1400
30914751 Omar_Morsi A Oct. 1, 2017, 5:09 p.m. OK Java 8 TESTS 54 280 0 1400
58974982 BitShot A Aug. 17, 2019, 11:36 p.m. OK Java 8 TESTS 54 280 0 1400
58971339 progDer A Aug. 17, 2019, 8:37 p.m. OK Java 8 TESTS 54 280 0 1400
3784577 dwoolley3 A May 27, 2013, 2:08 p.m. OK Mono C# TESTS 54 93 10854400 1400
67475619 Rezaul_Karim A Dec. 23, 2019, 2:15 p.m. OK Mono C# TESTS 54 1840 3072000 1400
3715745 NickSerg A May 13, 2013, 8:30 a.m. OK MS C# TESTS 54 140 12902400 1400
3706478 it4.kp A May 12, 2013, 1:09 p.m. OK MS C# TESTS 54 156 14848000 1400
12237053 hhsaffar A July 27, 2015, 7:28 a.m. OK MS C# TESTS 54 184 10035200 1400
13479316 og.kostya A Oct. 7, 2015, 3:44 p.m. OK MS C# TESTS 54 186 3276800 1400
4285996 Dragonborn A Aug. 16, 2013, 9:44 a.m. OK MS C# TESTS 54 468 2969600 1400
10812815 sicon54 A April 21, 2015, 4:37 p.m. OK MS C# TESTS 54 590 21401600 1400
3706258 Ripatti A May 12, 2013, 1:07 p.m. OK MS C++ TESTS 54 93 0 1400
3931549 C.O.W. A June 21, 2013, 9:50 a.m. OK MS C++ TESTS 54 93 0 1400
3930693 Love_U_JERRY A June 21, 2013, 4:44 a.m. OK MS C++ TESTS 54 93 0 1400
3707118 abistrigova A May 12, 2013, 1:18 p.m. OK MS C++ TESTS 54 93 409600 1400
3706653 AnnKats93 A May 12, 2013, 1:11 p.m. OK MS C++ TESTS 54 93 409600 1400
3707353 Taube A May 12, 2013, 1:22 p.m. OK MS C++ TESTS 54 93 1228800 1400
3712449 ermolmak A May 12, 2013, 3:37 p.m. OK MS C++ TESTS 54 109 0 1400
3724507 proVIDec A May 15, 2013, 5:40 p.m. OK MS C++ TESTS 54 109 0 1400
4094808 how_to_become_purple A July 17, 2013, 9:08 p.m. OK MS C++ TESTS 54 109 0 1400
3956295 MrBear A June 24, 2013, 3:52 p.m. OK MS C++ TESTS 54 109 0 1400
61739551 darthVader1010 A Oct. 2, 2019, 7:34 p.m. OK MS C++ 2017 TESTS 54 342 0 1400
65950877 HishamDroubi A Nov. 29, 2019, 10:49 a.m. OK MS C++ 2017 TESTS 54 374 819200 1400
57621982 tchr A July 24, 2019, 5:17 a.m. OK PyPy 3 TESTS 54 654 11161600 1400
67193869 hjq000 A Dec. 19, 2019, 8:14 a.m. OK PyPy 3 TESTS 54 778 10035200 1400
5293993 yugle7 A Nov. 29, 2013, 1:37 p.m. OK Python 2 TESTS 54 124 6144000 1400
3706390 h4tguy A May 12, 2013, 1:08 p.m. OK Python 2 TESTS 54 125 6246400 1400
4746551 vadym_doroshenko A Oct. 11, 2013, 4:27 p.m. OK Python 2 TESTS 54 156 7372800 1400
4737212 mypd67 A Oct. 10, 2013, 5:50 p.m. OK Python 2 TESTS 54 156 7577600 1400
4142089 Spartar A July 23, 2013, 4:21 p.m. OK Python 2 TESTS 54 156 11059200 1400
3735181 stareven A May 19, 2013, 2:44 a.m. OK Python 2 TESTS 54 171 7065600 1400
3713617 nealzane A May 12, 2013, 5:33 p.m. OK Python 2 TESTS 54 171 11059200 1400
3706233 kevinsogo A May 12, 2013, 1:06 p.m. OK Python 2 TESTS 54 187 5529600 1400
4073670 tigupine A July 15, 2013, 7:25 a.m. OK Python 2 TESTS 54 203 6963200 1400
4988977 Unlenin A Nov. 4, 2013, 8:52 p.m. OK Python 2 TESTS 54 218 8089600 1400
5293872 yugle7 A Nov. 29, 2013, 1:25 p.m. OK Python 3 TESTS 54 218 6656000 1400
11404793 merolish A June 3, 2015, 5:28 p.m. OK Python 3 TESTS 54 248 5120000 1400
5655627 serglag A Jan. 10, 2014, 2:51 p.m. OK Python 3 TESTS 54 312 6553600 1400
3830116 ItsLastDay A June 7, 2013, 6:28 a.m. OK Python 3 TESTS 54 328 5120000 1400
60463492 robert.chinem A Sept. 12, 2019, 10:38 p.m. OK Python 3 TESTS 54 436 9523200 1400
6177184 tsfn A March 30, 2014, 2:50 a.m. OK Python 3 TESTS 54 466 9932800 1400
30217258 EliaquinYp A Sept. 9, 2017, 4:38 a.m. OK Python 3 TESTS 54 468 3276800 1400
55396619 Mohamed_Ayman A June 10, 2019, 12:04 p.m. OK Python 3 TESTS 54 1090 2969600 1400
53806729 vjudge4 A May 6, 2019, 1:53 a.m. OK Python 3 TESTS 54 1122 9932800 1400
47719293 ashok123 A Dec. 30, 2018, 10:08 a.m. OK Python 3 TESTS 54 1154 7475200 1400
3716447 infinity_blue A May 13, 2013, 11:53 a.m. OK Ruby TESTS 54 265 4300800 1400
3718341 dlrowolleh A May 13, 2013, 9:09 p.m. OK Scala TESTS 54 500 716800 1400
3707537 mukel A May 12, 2013, 1:26 p.m. OK Scala TESTS 54 500 1228800 1400

remove filters

Back to search problems