Codeforces Round 177 (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
288 Codeforces Round 177 (Div. 1) FINISHED False 7200 366906599 April 2, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2939 ) B Polo the Penguin and Houses PROGRAMMING combinatorics 1700

B"Little penguin Polo loves his home village. The village has n houses, indexed by integers from 1 to n. Each house has a plaque containing an integer, the i-th house has a plaque containing integer pi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Little penguin Polo loves walking around this village. The walk looks like that. First he stands by a house number x. Then he goes to the house whose number is written on the plaque of house x (that is, to house px), then he goes to the house whose number is written on the plaque of house px (that is, to house ppx), and so on. We know that: You need to find the number of ways you may write the numbers on the houses' plaques so as to fulfill the three above described conditions. Print the remainder after dividing this number by 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 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89min(8, xe2 x80 x89n)) -- the number of the houses and the number k from the statement. In a single line print a single integer -- the answer to the problem modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897)."...

Tutorials

Codeforces Round #177, editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3459143 Gassa B April 2, 2013, 4:23 p.m. OK D TESTS 30 859 0 1700
3457832 TheHedgehog B April 2, 2013, 4:10 p.m. OK Delphi TESTS 30 15 0 1700
3460664 ruban B April 2, 2013, 4:40 p.m. OK Delphi TESTS 30 15 0 1700
3457576 Timur_Keks B April 2, 2013, 4:08 p.m. OK Delphi TESTS 30 62 0 1700
3472881 Misha100896 B April 4, 2013, 12:25 p.m. OK Delphi TESTS 30 109 0 1700
3457817 IgorL B April 2, 2013, 4:10 p.m. OK Delphi TESTS 30 375 102400 1700
3459661 MrJigan1488 B April 2, 2013, 4:28 p.m. OK Delphi TESTS 30 1234 31027200 1700
3467991 AleksanderBalobanov B April 3, 2013, 9:20 a.m. OK Delphi TESTS 30 1578 204800 1700
3457794 vilcheuski B April 2, 2013, 4:10 p.m. OK FPC TESTS 30 15 0 1700
3455052 Alex_2oo8 B April 2, 2013, 3:45 p.m. OK FPC TESTS 30 15 0 1700
3456989 hiepsieunhan B April 2, 2013, 4:03 p.m. OK FPC TESTS 30 15 0 1700
3464543 JustN B April 2, 2013, 5:57 p.m. OK FPC TESTS 30 15 0 1700
3464121 tovValentin B April 2, 2013, 5:28 p.m. OK FPC TESTS 30 15 0 1700
3463651 conan_96 B April 2, 2013, 5:22 p.m. OK FPC TESTS 30 15 0 1700
3460194 vietdoan B April 2, 2013, 4:34 p.m. OK FPC TESTS 30 15 0 1700
3458585 Oryshych B April 2, 2013, 4:17 p.m. OK FPC TESTS 30 15 0 1700
3458123 Um_nik B April 2, 2013, 4:13 p.m. OK FPC TESTS 30 15 0 1700
3458100 ig_dug B April 2, 2013, 4:13 p.m. OK FPC TESTS 30 15 0 1700
10664082 vjudge2 B April 12, 2015, 8:09 a.m. OK GNU C TESTS 30 15 0 1700
3456563 ali_fiujnomali B April 2, 2013, 3:59 p.m. OK GNU C TESTS 30 15 0 1700
3456060 kawatea B April 2, 2013, 3:55 p.m. OK GNU C TESTS 30 15 0 1700
5068148 vis10326 B Nov. 11, 2013, 1:25 p.m. OK GNU C TESTS 30 30 0 1700
3583687 cpy B April 21, 2013, 6:39 a.m. OK GNU C TESTS 30 592 0 1700
3458155 Vergissmeinnicht B April 2, 2013, 4:13 p.m. OK GNU C++ TESTS 30 0 0 1700
32197908 wittyskull B Nov. 10, 2017, 2:39 p.m. OK GNU C++ TESTS 30 15 0 1700
27878565 scli B June 18, 2017, 7:03 a.m. OK GNU C++ TESTS 30 15 0 1700
21711619 hugeh0ge B Oct. 23, 2016, 12:22 p.m. OK GNU C++ TESTS 30 15 0 1700
20984018 -Sali- B Sept. 29, 2016, 5:38 a.m. OK GNU C++ TESTS 30 15 0 1700
19425854 vjudge3 B July 26, 2016, 3:56 p.m. OK GNU C++ TESTS 30 15 0 1700
19413725 vjudge4 B July 26, 2016, 3:09 a.m. OK GNU C++ TESTS 30 15 0 1700
19412758 vjudge1 B July 26, 2016, 1:55 a.m. OK GNU C++ TESTS 30 15 0 1700
19405067 vjudge5 B July 25, 2016, 2 p.m. OK GNU C++ TESTS 30 15 0 1700
19405015 vjudge4 B July 25, 2016, 1:58 p.m. OK GNU C++ TESTS 30 15 0 1700
3464445 Doxer B April 2, 2013, 5:54 p.m. OK GNU C++0x TESTS 30 15 0 1700
3737132 A_Le_K B May 19, 2013, 1:11 p.m. OK GNU C++0x TESTS 30 15 0 1700
3493722 pawelwa111 B April 8, 2013, 3:02 p.m. OK GNU C++0x TESTS 30 15 0 1700
3469534 nbarshay B April 3, 2013, 3:03 p.m. OK GNU C++0x TESTS 30 15 0 1700
3467471 ankit1991.aug B April 3, 2013, 6:56 a.m. OK GNU C++0x TESTS 30 15 0 1700
3460197 isti757 B April 2, 2013, 4:34 p.m. OK GNU C++0x TESTS 30 15 0 1700
3459125 UESTC_ElemeNtLz B April 2, 2013, 4:23 p.m. OK GNU C++0x TESTS 30 15 0 1700
3458743 lesf0 B April 2, 2013, 4:19 p.m. OK GNU C++0x TESTS 30 15 0 1700
3458564 savinov B April 2, 2013, 4:17 p.m. OK GNU C++0x TESTS 30 15 0 1700
3457998 Xellos B April 2, 2013, 4:12 p.m. OK GNU C++0x TESTS 30 15 0 1700
32512071 bastin B Nov. 20, 2017, 9:58 p.m. OK GNU C++11 TESTS 30 15 0 1700
29506031 Hikari9 B Aug. 16, 2017, 1:09 p.m. OK GNU C++11 TESTS 30 15 0 1700
22418383 jk_qq B Nov. 23, 2016, 7:51 a.m. OK GNU C++11 TESTS 30 15 0 1700
22340318 DatTenNayChoNgan B Nov. 20, 2016, 4:13 a.m. OK GNU C++11 TESTS 30 15 0 1700
20988510 sahasumit288 B Sept. 29, 2016, 10:07 a.m. OK GNU C++11 TESTS 30 15 0 1700
20344232 NHummel B Sept. 2, 2016, 4:02 p.m. OK GNU C++11 TESTS 30 15 0 1700
19533217 lungly1 B July 31, 2016, 7:59 a.m. OK GNU C++11 TESTS 30 15 0 1700
19436942 dwtfukgv B July 27, 2016, 8:34 a.m. OK GNU C++11 TESTS 30 15 0 1700
19405049 vjudge2 B July 25, 2016, 1:59 p.m. OK GNU C++11 TESTS 30 15 0 1700
19398671 vjudge4 B July 25, 2016, 8:11 a.m. OK GNU C++11 TESTS 30 15 0 1700
57967747 vjudge2 B July 30, 2019, 3:47 a.m. OK GNU C++14 TESTS 30 15 0 1700
57898301 honeysingh123 B July 28, 2019, 2:33 p.m. OK GNU C++14 TESTS 30 15 0 1700
52805135 Gabriel98 B April 16, 2019, 3:22 a.m. OK GNU C++14 TESTS 30 15 0 1700
50801004 alurquiza B March 4, 2019, 11:21 p.m. OK GNU C++14 TESTS 30 15 0 1700
45554864 vjudge5 B Nov. 11, 2018, 7:55 a.m. OK GNU C++14 TESTS 30 15 0 1700
43485400 kzvd4729 B Sept. 27, 2018, 9:51 a.m. OK GNU C++14 TESTS 30 15 0 1700
38702650 Shichibukai B May 28, 2018, 6:55 p.m. OK GNU C++14 TESTS 30 15 0 1700
32501594 Flash-boy B Nov. 20, 2017, 1:47 p.m. OK GNU C++14 TESTS 30 15 0 1700
32159873 ujjwal9895 B Nov. 9, 2017, 2:07 p.m. OK GNU C++14 TESTS 30 15 0 1700
31264998 L.O B Oct. 13, 2017, 4:25 a.m. OK GNU C++14 TESTS 30 15 0 1700
65489479 AK. B Nov. 21, 2019, 2:02 p.m. OK GNU C++17 TESTS 30 15 0 1700
40585655 gleb-kov B July 20, 2018, 5:26 p.m. OK GNU C++17 TESTS 30 15 0 1700
45554769 Hana.jml B Nov. 11, 2018, 7:51 a.m. OK GNU C++17 TESTS 30 15 204800 1700
35813359 eagle93 B March 1, 2018, 2:02 p.m. OK GNU C++17 TESTS 30 15 1945600 1700
38903844 fsociety00 B June 2, 2018, 9:27 p.m. OK GNU C++17 TESTS 30 15 3379200 1700
68238633 hdsingh B Jan. 5, 2020, 11:58 a.m. OK GNU C++17 TESTS 30 30 0 1700
62437197 faresbasbas B Oct. 12, 2019, 5:54 p.m. OK GNU C++17 TESTS 30 30 0 1700
50090975 Onizuka B Feb. 18, 2019, 10:20 a.m. OK GNU C++17 TESTS 30 30 0 1700
46132233 vjudge2 B Nov. 24, 2018, 2:22 a.m. OK GNU C++17 TESTS 30 30 0 1700
45757608 vjudge1 B Nov. 15, 2018, 7:04 a.m. OK GNU C++17 TESTS 30 30 0 1700
3481084 tanakh B April 6, 2013, 8:46 p.m. OK Haskell TESTS 30 31 0 1700
3459584 pok B April 2, 2013, 4:27 p.m. OK Java 6 TESTS 30 78 0 1700
4044295 mkirsche B July 9, 2013, 11:12 p.m. OK Java 6 TESTS 30 78 0 1700
3457955 santjuan B April 2, 2013, 4:11 p.m. OK Java 6 TESTS 30 78 0 1700
3454904 uwi B April 2, 2013, 3:44 p.m. OK Java 6 TESTS 30 78 0 1700
3457445 Slamur B April 2, 2013, 4:07 p.m. OK Java 6 TESTS 30 78 204800 1700
3480130 ask_23 B April 6, 2013, 1:38 p.m. OK Java 6 TESTS 30 78 2252800 1700
3459142 iensen B April 2, 2013, 4:23 p.m. OK Java 6 TESTS 30 93 0 1700
3458993 bohuss B April 2, 2013, 4:21 p.m. OK Java 6 TESTS 30 93 0 1700
3470484 kik11 B April 3, 2013, 6:55 p.m. OK Java 6 TESTS 30 93 0 1700
3465273 0p9o8i B April 2, 2013, 6:42 p.m. OK Java 6 TESTS 30 93 0 1700
11402714 alex_y B June 3, 2015, 2:09 p.m. OK Java 7 TESTS 30 77 0 1700
11403606 alex_y B June 3, 2015, 3:26 p.m. OK Java 7 TESTS 30 78 0 1700
3475719 ysyshtc B April 5, 2013, 8:02 a.m. OK Java 7 TESTS 30 78 0 1700
3464895 dmitry.uvarov B April 2, 2013, 6:12 p.m. OK Java 7 TESTS 30 78 0 1700
3457898 chavit B April 2, 2013, 4:11 p.m. OK Java 7 TESTS 30 78 0 1700
3457086 S.Yesipenko B April 2, 2013, 4:04 p.m. OK Java 7 TESTS 30 78 0 1700
3455600 Egor B April 2, 2013, 3:51 p.m. OK Java 7 TESTS 30 78 0 1700
3455483 mmaxio B April 2, 2013, 3:49 p.m. OK Java 7 TESTS 30 78 0 1700
3787803 hyggyh B May 28, 2013, 12:19 p.m. OK Java 7 TESTS 30 78 0 1700
3705064 hack_tm B May 12, 2013, 6:37 a.m. OK Java 7 TESTS 30 93 0 1700
59965924 saurabhs1206 B Sept. 3, 2019, 8:31 p.m. OK Java 8 TESTS 30 109 0 1700
55594236 Ahmed_Diab B June 15, 2019, 2:07 p.m. OK Java 8 TESTS 30 109 0 1700
27966397 hitesh.bothra B June 22, 2017, 1:32 p.m. OK Java 8 TESTS 30 109 20582400 1700
56740440 nkko.l B July 9, 2019, 7:26 a.m. OK Java 8 TESTS 30 124 0 1700
32197246 Ahmad_Elsagheer B Nov. 10, 2017, 2:06 p.m. OK Java 8 TESTS 30 124 0 1700
19527050 poikniok B July 30, 2016, 9:50 p.m. OK Java 8 TESTS 30 124 0 1700
36679738 MazzForces B March 27, 2018, 9:34 p.m. OK Java 8 TESTS 30 124 20684800 1700
35161258 flyman3046 B Feb. 11, 2018, 6:44 p.m. OK Java 8 TESTS 30 124 20684800 1700
31739222 IntueorDaniel B Oct. 26, 2017, 2:02 p.m. OK Java 8 TESTS 30 139 0 1700
52605207 Vaibhav96 B April 11, 2019, 1:36 p.m. OK Java 8 TESTS 30 140 0 1700
3464136 fiver B April 2, 2013, 5:28 p.m. OK Mono C# TESTS 30 31 211865600 1700
4142798 Dragonborn B July 23, 2013, 6:59 p.m. OK MS C# TESTS 30 46 307200 1700
15390169 og.kostya B Jan. 15, 2016, 2:17 p.m. OK MS C# TESTS 30 93 3072000 1700
3477418 zhongdi B April 5, 2013, 4:02 p.m. OK MS C++ TESTS 30 15 0 1700
15637026 Sandmann B Jan. 28, 2016, 10:28 p.m. OK MS C++ TESTS 30 15 0 1700
12019648 vjudge2 B July 12, 2015, 1:39 p.m. OK MS C++ TESTS 30 15 0 1700
12019519 vjudge1 B July 12, 2015, 1:26 p.m. OK MS C++ TESTS 30 15 0 1700
3692442 Kvark_161 B May 8, 2013, 8:41 a.m. OK MS C++ TESTS 30 15 0 1700
3538958 poopi B April 14, 2013, 9:13 p.m. OK MS C++ TESTS 30 15 0 1700
3481239 mosiomohsen B April 7, 2013, 9:51 a.m. OK MS C++ TESTS 30 15 0 1700
3479784 arosusti B April 6, 2013, 12:01 p.m. OK MS C++ TESTS 30 15 0 1700
3477589 Ac-93 B April 5, 2013, 5 p.m. OK MS C++ TESTS 30 15 0 1700
3474064 Reshetnikov_Ivan B April 4, 2013, 5:33 p.m. OK MS C++ TESTS 30 15 0 1700
3535516 Darooha B April 14, 2013, 2:13 p.m. OK Ocaml TESTS 30 15 0 1700
3472019 MinakoKojima B April 4, 2013, 8:20 a.m. OK Ocaml TESTS 30 15 0 1700
3469083 MinakoKojima B April 3, 2013, 1:23 p.m. OK Ocaml TESTS 30 15 0 1700
31428467 F1NQIE B Oct. 16, 2017, 5:59 p.m. OK PascalABC.NET TESTS 30 31 16896000 1700
32512030 bastin B Nov. 20, 2017, 9:54 p.m. OK PyPy 2 TESTS 30 62 0 1700
16268290 Noureldin B Feb. 21, 2016, 9:33 p.m. OK PyPy 2 TESTS 30 62 0 1700
23919585 Yash_ B Jan. 18, 2017, 10:36 a.m. OK PyPy 2 TESTS 30 78 22016000 1700
27777512 rajat1603 B June 14, 2017, 5:36 p.m. OK PyPy 2 TESTS 30 109 0 1700
37179683 keshav97 B April 10, 2018, 7:19 p.m. OK PyPy 3 TESTS 30 109 21401600 1700
65741620 UTMoonlight B Nov. 26, 2019, 10:30 a.m. OK PyPy 3 TESTS 30 140 0 1700
30237683 mhorst B Sept. 10, 2017, 4:29 a.m. OK Python 2 TESTS 30 46 0 1700
12250267 Badalyan_Shavarsh B July 28, 2015, 9:46 a.m. OK Python 2 TESTS 30 46 0 1700
3526705 OFP B April 13, 2013, 1:49 p.m. OK Python 2 TESTS 30 46 0 1700
3481923 jebwizoscar B April 7, 2013, 12:58 p.m. OK Python 2 TESTS 30 46 0 1700
3481260 jebwizoscar B April 7, 2013, 9:56 a.m. OK Python 2 TESTS 30 46 0 1700
3480275 kymo B April 6, 2013, 2:49 p.m. OK Python 2 TESTS 30 46 0 1700
3468981 E_Fantacy B April 3, 2013, 1:01 p.m. OK Python 2 TESTS 30 46 0 1700
3462038 bsrkaditya B April 2, 2013, 4:58 p.m. OK Python 2 TESTS 30 46 0 1700
3458934 knsn B April 2, 2013, 4:21 p.m. OK Python 2 TESTS 30 46 0 1700
3456641 daidailanlan B April 2, 2013, 4 p.m. OK Python 2 TESTS 30 46 0 1700
21837351 Amores B Oct. 28, 2016, 1:35 a.m. OK Python 3 TESTS 30 62 0 1700
15915060 not_bot_but_POT B Feb. 9, 2016, 1:59 p.m. OK Python 3 TESTS 30 62 0 1700
13007605 verngutz B Sept. 15, 2015, 1:12 p.m. OK Python 3 TESTS 30 62 0 1700
12772250 vjudge5 B Aug. 30, 2015, 7:37 a.m. OK Python 3 TESTS 30 62 0 1700
32714037 bash B Nov. 27, 2017, 12:08 p.m. OK Python 3 TESTS 30 62 5529600 1700
35857732 ______u______ B March 2, 2018, 8:45 p.m. OK Python 3 TESTS 30 62 5632000 1700
35857481 ______n______ B March 2, 2018, 8:40 p.m. OK Python 3 TESTS 30 62 5632000 1700
35857007 _____i_____ B March 2, 2018, 8:32 p.m. OK Python 3 TESTS 30 62 5632000 1700
35856881 _____k_____ B March 2, 2018, 8:28 p.m. OK Python 3 TESTS 30 62 5632000 1700
35848303 ______h______ B March 2, 2018, 4:56 p.m. OK Python 3 TESTS 30 62 5632000 1700
3465916 Lebesgue B April 2, 2013, 8:34 p.m. OK Ruby TESTS 30 46 0 1700
3465246 Lebesgue B April 2, 2013, 6:39 p.m. OK Ruby TESTS 30 46 0 1700
3466214 EbTech B April 2, 2013, 10:20 p.m. OK Scala TESTS 30 375 204800 1700
3456072 winger B April 2, 2013, 3:55 p.m. OK Scala TESTS 30 453 204800 1700

remove filters

Back to search problems