Codeforces Round 178 (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
294 Codeforces Round 178 (Div. 2) FINISHED False 7200 372263404 April 7, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3873 ) C Shaass and Lights PROGRAMMING combinatorics number theory 1900

B"There are n lights aligned in a row. These lights are numbered 1 to n from left to right. Initially some of the lights are switched on. Shaass wants to switch all the lights on. At each step he can switch a light on (this light should be switched off at that moment) if there's at least one adjacent light which is already switched on. He knows the initial state of lights and he's wondering how many different ways there exist to switch all the lights on. Please find the required number of ways modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line of the input contains two integers n and m where n is the number of lights in the sequence and m is the number of lights which are initially switched on, (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 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). The second line contains m distinct integers, each between 1 to n inclusive, denoting the indices of lights which are initially switched on. In the only line of the output print the number of different possible ways to switch on all the lights modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897)."...

Tutorials

Codeforces Round #178 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3487328 Gassa C April 7, 2013, 4:38 p.m. OK D TESTS 30 78 8089600 1900
3486770 Timur_Keks C April 7, 2013, 4:28 p.m. OK Delphi TESTS 30 15 102400 1900
3765587 Misha100896 C May 24, 2013, 2:57 p.m. OK Delphi TESTS 30 15 2457600 1900
3493988 ruban C April 8, 2013, 4:25 p.m. OK Delphi TESTS 30 15 96256000 1900
3486944 TheHedgehog C April 7, 2013, 4:32 p.m. OK Delphi TESTS 30 46 35225600 1900
3488679 AleksanderBalobanov C April 7, 2013, 5:07 p.m. OK Delphi TESTS 30 62 35532800 1900
3488089 Manul C April 7, 2013, 4:53 p.m. OK FPC TESTS 30 15 0 1900
3988003 ptnk_1215_panaka_13 C June 29, 2013, 12:50 a.m. OK FPC TESTS 30 15 0 1900
3496186 ommyzhang C April 9, 2013, 11:49 a.m. OK FPC TESTS 30 15 0 1900
3487332 chaos0000 C April 7, 2013, 4:38 p.m. OK FPC TESTS 30 15 0 1900
3486176 Dniwe_of_river C April 7, 2013, 4:18 p.m. OK FPC TESTS 30 15 0 1900
3489167 bao_lap_trinh C April 7, 2013, 5:19 p.m. OK FPC TESTS 30 15 3993600 1900
3484486 hiepsieunhan C April 7, 2013, 3:55 p.m. OK FPC TESTS 30 15 3993600 1900
3700151 _Mao_ C May 10, 2013, 5:53 p.m. OK FPC TESTS 30 15 8601600 1900
3600701 Chen_ChaoRui C April 22, 2013, 12:27 p.m. OK FPC TESTS 30 15 8601600 1900
3486880 Furko C April 7, 2013, 4:31 p.m. OK FPC TESTS 30 15 32358400 1900
3491186 ForceCodes C April 8, 2013, 1:23 a.m. OK GNU C TESTS 30 15 3993600 1900
3495886 cpy C April 9, 2013, 10:32 a.m. OK GNU C TESTS 30 15 4096000 1900
3485652 ali_fiujnomali C April 7, 2013, 4:11 p.m. OK GNU C TESTS 30 15 8396800 1900
34366836 AlecSandra C Jan. 20, 2018, 3:53 p.m. OK GNU C TESTS 30 15 10035200 1900
34354230 Asher_S C Jan. 20, 2018, 1:29 p.m. OK GNU C TESTS 30 15 10035200 1900
34352423 Anonsmd C Jan. 20, 2018, 12:26 p.m. OK GNU C TESTS 30 15 10035200 1900
34349116 Profish C Jan. 20, 2018, 10:48 a.m. OK GNU C TESTS 30 15 10035200 1900
3493124 cpy C April 8, 2013, 12:33 p.m. OK GNU C TESTS 30 15 12288000 1900
3489601 Illyasviel_von_Einzbern C April 7, 2013, 5:28 p.m. OK GNU C++ TESTS 30 0 0 1900
3487250 galileo C April 7, 2013, 4:37 p.m. OK GNU C++ TESTS 30 0 0 1900
31985285 madwingis C Nov. 2, 2017, 3:52 p.m. OK GNU C++ TESTS 30 15 0 1900
31731010 ea6102 C Oct. 26, 2017, 7:16 a.m. OK GNU C++ TESTS 30 15 0 1900
27903582 Scut82 C June 19, 2017, 11:42 a.m. OK GNU C++ TESTS 30 15 0 1900
27895087 RedStar_13 C June 19, 2017, 3:48 a.m. OK GNU C++ TESTS 30 15 0 1900
27463242 MrCode_4 C May 31, 2017, 9:33 a.m. OK GNU C++ TESTS 30 15 0 1900
20894294 vjudge1 C Sept. 24, 2016, 5:39 p.m. OK GNU C++ TESTS 30 15 0 1900
4917077 jafc C Oct. 27, 2013, 8:44 p.m. OK GNU C++ TESTS 30 15 0 1900
4163257 jiangxiong C July 25, 2013, 10:59 a.m. OK GNU C++ TESTS 30 15 0 1900
3488735 teru C April 7, 2013, 5:09 p.m. OK GNU C++0x TESTS 30 15 0 1900
3559996 n1k1tung C April 18, 2013, 11:13 a.m. OK GNU C++0x TESTS 30 15 0 1900
3494660 stan C April 8, 2013, 9:35 p.m. OK GNU C++0x TESTS 30 15 0 1900
3491387 Algiz C April 8, 2013, 3:39 a.m. OK GNU C++0x TESTS 30 15 0 1900
3490531 cocls C April 7, 2013, 7:06 p.m. OK GNU C++0x TESTS 30 15 0 1900
3487915 srnth C April 7, 2013, 4:49 p.m. OK GNU C++0x TESTS 30 15 0 1900
3486302 savinov C April 7, 2013, 4:20 p.m. OK GNU C++0x TESTS 30 15 0 1900
3486204 sharph C April 7, 2013, 4:19 p.m. OK GNU C++0x TESTS 30 15 0 1900
3486088 pawelwa111 C April 7, 2013, 4:17 p.m. OK GNU C++0x TESTS 30 15 0 1900
3485483 anton C April 7, 2013, 4:08 p.m. OK GNU C++0x TESTS 30 15 0 1900
39633535 NaN C June 24, 2018, 10:30 p.m. OK GNU C++11 TESTS 30 15 0 1900
31212978 AmrMorsy2 C Oct. 11, 2017, 10:05 a.m. OK GNU C++11 TESTS 30 15 0 1900
30238635 Yellow.Flash C Sept. 10, 2017, 6:04 a.m. OK GNU C++11 TESTS 30 15 0 1900
30204022 seddik11 C Sept. 8, 2017, 2:06 p.m. OK GNU C++11 TESTS 30 15 0 1900
27732348 tene3nt C June 12, 2017, 6:37 a.m. OK GNU C++11 TESTS 30 15 0 1900
27729763 The_Unbeatable C June 12, 2017, 2:37 a.m. OK GNU C++11 TESTS 30 15 0 1900
27300061 Bengal_Tiger C May 23, 2017, 11:31 a.m. OK GNU C++11 TESTS 30 15 0 1900
27252797 sam29_code C May 20, 2017, 8:05 p.m. OK GNU C++11 TESTS 30 15 0 1900
22892265 codeNight C Dec. 11, 2016, 7:03 p.m. OK GNU C++11 TESTS 30 15 0 1900
22032672 DatTenNayChoNgan C Nov. 4, 2016, 11:22 a.m. OK GNU C++11 TESTS 30 15 0 1900
68326380 vjudge2 C Jan. 6, 2020, 5:02 p.m. OK GNU C++14 TESTS 30 15 0 1900
64485758 TooStupidToWin C Nov. 7, 2019, 5:42 p.m. OK GNU C++14 TESTS 30 15 0 1900
61940870 foreverdiv3 C Oct. 5, 2019, 7:45 p.m. OK GNU C++14 TESTS 30 15 0 1900
55608263 Bekh C June 16, 2019, 3:14 a.m. OK GNU C++14 TESTS 30 15 0 1900
55470427 vibhorshukla C June 11, 2019, 6:28 p.m. OK GNU C++14 TESTS 30 15 0 1900
53811986 walht C May 6, 2019, 7:31 a.m. OK GNU C++14 TESTS 30 15 0 1900
53196450 Wolf. C April 23, 2019, 3:34 p.m. OK GNU C++14 TESTS 30 15 0 1900
52943626 W.Heisenberg C April 18, 2019, 10:32 a.m. OK GNU C++14 TESTS 30 15 0 1900
52360382 kalari499 C April 5, 2019, 7:23 p.m. OK GNU C++14 TESTS 30 15 0 1900
49533880 Psychedelic C Feb. 6, 2019, 3 p.m. OK GNU C++14 TESTS 30 15 0 1900
68325245 vjudge4 C Jan. 6, 2020, 4:37 p.m. OK GNU C++17 TESTS 30 15 0 1900
61107112 mahesh C Sept. 23, 2019, 9:40 a.m. OK GNU C++17 TESTS 30 15 0 1900
60739733 manish_joshi C Sept. 17, 2019, 7:18 p.m. OK GNU C++17 TESTS 30 15 0 1900
59569972 jigsaw7 C Aug. 27, 2019, 12:12 p.m. OK GNU C++17 TESTS 30 15 0 1900
58338302 shikhar7s C Aug. 5, 2019, 12:19 p.m. OK GNU C++17 TESTS 30 15 0 1900
54898161 guanhuai04 C June 1, 2019, 4:41 a.m. OK GNU C++17 TESTS 30 15 0 1900
50643613 HazemEssawi C March 1, 2019, 2:57 p.m. OK GNU C++17 TESTS 30 15 0 1900
49903426 mk_02 C Feb. 14, 2019, 10:40 a.m. OK GNU C++17 TESTS 30 15 0 1900
41955468 last_death C Aug. 22, 2018, 6:12 a.m. OK GNU C++17 TESTS 30 15 0 1900
69303085 binhtranit C Jan. 22, 2020, 2:24 p.m. OK GNU C++17 TESTS 30 15 102400 1900
34473412 reminito C Jan. 23, 2018, 8:05 a.m. OK GNU C++17 Diagnostics TESTS 30 998 112640000 1900
3485735 watashi C April 7, 2013, 4:12 p.m. OK Haskell TESTS 30 109 26419200 1900
3487307 iensen C April 7, 2013, 4:37 p.m. OK Java 6 TESTS 30 78 2252800 1900
3541331 su_58 C April 15, 2013, 1:53 p.m. OK Java 6 TESTS 30 78 2252800 1900
3488444 santjuan C April 7, 2013, 5:02 p.m. OK Java 6 TESTS 30 78 2252800 1900
3639129 jwl C April 27, 2013, 1:44 a.m. OK Java 6 TESTS 30 93 0 1900
3551089 hiukim C April 16, 2013, 7:53 a.m. OK Java 6 TESTS 30 93 0 1900
3494653 zamzam C April 8, 2013, 9:29 p.m. OK Java 6 TESTS 30 93 102400 1900
3647448 I_love_Malika C April 28, 2013, 10:58 a.m. OK Java 6 TESTS 30 93 102400 1900
3489509 DiegoAE C April 7, 2013, 5:26 p.m. OK Java 6 TESTS 30 93 2252800 1900
4076753 mkirsche C July 15, 2013, 4:52 p.m. OK Java 6 TESTS 30 93 2252800 1900
3486777 Rakhdakh C April 7, 2013, 4:28 p.m. OK Java 6 TESTS 30 93 2252800 1900
3486005 Hohol C April 7, 2013, 4:16 p.m. OK Java 7 TESTS 30 78 0 1900
3484935 antonkov C April 7, 2013, 4:01 p.m. OK Java 7 TESTS 30 78 0 1900
3607429 ocelopilli C April 22, 2013, 7:19 p.m. OK Java 7 TESTS 30 78 0 1900
3851112 API C June 9, 2013, 2:55 p.m. OK Java 7 TESTS 30 78 0 1900
3696196 hyggyh C May 9, 2013, 12:48 p.m. OK Java 7 TESTS 30 78 0 1900
3495223 jiangzhijie C April 9, 2013, 5:30 a.m. OK Java 7 TESTS 30 78 0 1900
3494718 vadimmm C April 8, 2013, 10:34 p.m. OK Java 7 TESTS 30 78 0 1900
3487962 dusty.and.rusty C April 7, 2013, 4:50 p.m. OK Java 7 TESTS 30 78 0 1900
3487508 Ahmed_Salama C April 7, 2013, 4:41 p.m. OK Java 7 TESTS 30 78 0 1900
3485935 AlexanderBolshakov C April 7, 2013, 4:15 p.m. OK Java 7 TESTS 30 78 102400 1900
31933059 xodiac C Oct. 31, 2017, 8:17 p.m. OK Java 8 TESTS 30 108 0 1900
65788461 GiantTornado C Nov. 26, 2019, 8:58 p.m. OK Java 8 TESTS 30 109 0 1900
65791459 less_than_gray C Nov. 26, 2019, 10:59 p.m. OK Java 8 TESTS 30 109 0 1900
65791110 less_than_gray C Nov. 26, 2019, 10:36 p.m. OK Java 8 TESTS 30 109 0 1900
48544611 mandark27 C Jan. 18, 2019, 6:38 p.m. OK Java 8 TESTS 30 109 0 1900
31964499 nhkhoi C Nov. 1, 2017, 11:01 p.m. OK Java 8 TESTS 30 109 0 1900
28007245 catchup C June 24, 2017, 2:43 p.m. OK Java 8 TESTS 30 109 20480000 1900
28643124 adityagupta1089 C July 17, 2017, 2:54 p.m. OK Java 8 TESTS 30 109 20582400 1900
26172746 kushwaha_vi C April 6, 2017, 2:36 p.m. OK Java 8 TESTS 30 109 20582400 1900
64719165 mTvTm C Nov. 12, 2019, 1:54 a.m. OK Java 8 TESTS 30 124 0 1900
51958311 hongquanntct C March 29, 2019, 4:54 a.m. OK Mono C# TESTS 30 62 3686400 1900
24901278 og.kostya C Feb. 22, 2017, 7:45 p.m. OK MS C# TESTS 30 46 16793600 1900
6367710 Mosyagin C April 15, 2014, 2:40 p.m. OK MS C# TESTS 30 122 8089600 1900
4046146 divuneh C July 10, 2013, 11:09 a.m. OK MS C++ TESTS 30 15 0 1900
3825425 tomas.svab C June 5, 2013, 4:04 p.m. OK MS C++ TESTS 30 15 0 1900
3599580 vjudge1 C April 22, 2013, 3:59 a.m. OK MS C++ TESTS 30 15 0 1900
3502582 Reshetnikov_Ivan C April 11, 2013, 8:45 a.m. OK MS C++ TESTS 30 15 0 1900
3498843 Sky-J C April 10, 2013, 8:38 a.m. OK MS C++ TESTS 30 15 0 1900
3496788 ASPIRINKA C April 9, 2013, 2:04 p.m. OK MS C++ TESTS 30 15 0 1900
3495969 felix C April 9, 2013, 10:57 a.m. OK MS C++ TESTS 30 15 0 1900
3495599 Deamon C April 9, 2013, 8:22 a.m. OK MS C++ TESTS 30 15 0 1900
3495316 guowentian C April 9, 2013, 6:14 a.m. OK MS C++ TESTS 30 15 0 1900
58244290 vjudge5 C Aug. 4, 2019, 4:14 a.m. OK MS C++ TESTS 30 15 0 1900
58242744 vjudge1 C Aug. 4, 2019, 2:45 a.m. OK MS C++ 2017 TESTS 30 46 8192000 1900
3487995 Darooha C April 7, 2013, 4:51 p.m. OK Ocaml TESTS 30 78 12185600 1900
3490307 MinakoKojima C April 7, 2013, 6:23 p.m. OK Ocaml TESTS 30 93 3788800 1900
21737681 Yash_ C Oct. 24, 2016, 9:47 a.m. OK PyPy 2 TESTS 30 77 512000 1900
42066625 Onesh0t C Aug. 24, 2018, 8:06 p.m. OK PyPy 2 TESTS 30 139 204800 1900
15161946 kfx C Jan. 2, 2016, 7:07 p.m. OK PyPy 2 TESTS 30 154 0 1900
13952697 m7mdbadawy C Oct. 30, 2015, 12:59 p.m. OK PyPy 2 TESTS 30 154 102400 1900
35177655 vjudge4 C Feb. 12, 2018, 12:35 p.m. OK PyPy 3 TESTS 30 108 19968000 1900
35177612 IceQuarze C Feb. 12, 2018, 12:33 p.m. OK PyPy 3 TESTS 30 108 19968000 1900
67656604 MathisHammel C Dec. 26, 2019, 2:09 p.m. OK PyPy 3 TESTS 30 140 0 1900
68461164 vjudge1 C Jan. 9, 2020, 6:08 p.m. OK PyPy 3 TESTS 30 155 1228800 1900
68326603 vjudge4 C Jan. 6, 2020, 5:06 p.m. OK PyPy 3 TESTS 30 155 1536000 1900
11180761 minimario C May 20, 2015, 5:24 p.m. OK PyPy 3 TESTS 30 216 307200 1900
12120131 poikniok C July 19, 2015, 8:54 p.m. OK PyPy 3 TESTS 30 218 307200 1900
3619062 I_love_Malika C April 25, 2013, 5:07 a.m. OK Python 2 TESTS 30 46 0 1900
3503282 micq C April 11, 2013, 11:44 a.m. OK Python 2 TESTS 30 46 0 1900
3501877 lovefly1983 C April 11, 2013, 4:16 a.m. OK Python 2 TESTS 30 46 0 1900
3883810 apoorvj C June 14, 2013, 3:24 p.m. OK Python 2 TESTS 30 46 102400 1900
3883757 apoorvj C June 14, 2013, 3:19 p.m. OK Python 2 TESTS 30 46 102400 1900
3500433 ykalchevskiy C April 10, 2013, 5:21 p.m. OK Python 2 TESTS 30 46 102400 1900
3486734 enhydra C April 7, 2013, 4:28 p.m. OK Python 2 TESTS 30 46 102400 1900
3518444 Artem_kh C April 12, 2013, 2:05 p.m. OK Python 2 TESTS 30 46 307200 1900
4031561 nab C July 6, 2013, 3:26 p.m. OK Python 2 TESTS 30 46 512000 1900
35292280 pavankatta C Feb. 15, 2018, 12:45 p.m. OK Python 2 TESTS 30 61 4608000 1900
25179308 felipe17 C March 3, 2017, 3:01 p.m. OK Python 3 TESTS 30 62 4812800 1900
35178192 IceQuarze C Feb. 12, 2018, 12:54 p.m. OK Python 3 TESTS 30 77 5836800 1900
37572866 nowyyz C April 24, 2018, 12:51 p.m. OK Python 3 TESTS 30 78 7065600 1900
42135079 Mk_Python_v1 C Aug. 26, 2018, 10:39 p.m. OK Python 3 TESTS 30 108 0 1900
68323685 vjudge2 C Jan. 6, 2020, 3:58 p.m. OK Python 3 TESTS 30 109 307200 1900
54146781 Hajj C May 14, 2019, 8:04 p.m. OK Python 3 TESTS 30 109 307200 1900
68357950 vjudge2 C Jan. 7, 2020, 12:55 p.m. OK Python 3 TESTS 30 109 512000 1900
44967098 DrSwad C Oct. 27, 2018, 8 p.m. OK Python 3 TESTS 30 124 0 1900
5354976 yugle7 C Dec. 5, 2013, 2:56 p.m. OK Python 3 TESTS 30 124 0 1900
19941724 CountZero C Aug. 18, 2016, 7:39 a.m. OK Python 3 TESTS 30 124 4812800 1900
3719015 infinity_blue C May 14, 2013, 5:42 a.m. OK Ruby TESTS 30 31 1024000 1900
3555999 milosz C April 17, 2013, 11:21 a.m. OK Ruby TESTS 30 46 1024000 1900
3488898 mircea.moise C April 7, 2013, 5:13 p.m. OK Ruby TESTS 30 62 102400 1900
3664791 D.D.C C May 3, 2013, 1:29 p.m. OK Ruby TESTS 30 62 1024000 1900

remove filters

Back to search problems