Codeforces Round 223 (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
380 Codeforces Round 223 (Div. 1) FINISHED False 7200 342282599 Jan. 12, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 468 ) D Sereja and Cinema PROGRAMMING combinatorics math 2500

B'The cinema theater hall in Sereja 's city is n seats lined up in front of one large screen. There are slots for personal possessions to the left and to the right of each seat. Any two adjacent seats have exactly one shared slot. The figure below shows the arrangement of seats and slots for n xe2 x80 x89= xe2 x80 x894. Today it 's the premiere of a movie called "Dry Hard". The tickets for all the seats have been sold. There is a very strict controller at the entrance to the theater, so all n people will come into the hall one by one. As soon as a person enters a cinema hall, he immediately (momentarily) takes his seat and occupies all empty slots to the left and to the right from him. If there are no empty slots, the man gets really upset and leaves. People are not very constant, so it 's hard to predict the order in which the viewers will enter the hall. For some seats, Sereja knows the number of the viewer (his number in the entering queue of the viewers) that will come and take this seat. For others, it can be any order. Being a programmer and a mathematician, Sereja wonders: how many ways are there for the people to enter the hall, such that nobody gets upset? As the number can be quite large, print it modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n integers, the i-th integer shows either the index of the person (index in the entering queue) with the ticket for the i-th seat or a 0, if his index is not known. It is guaranteed that all positive numbers in the second line are distinct. You can assume that the index of the person who enters the cinema hall is a unique integer from 1 to n. The person who has index 1 comes first to the hall, the person who has index 2 comes second and so on. In a single line print the remainder after dividing the answer by number 1000000007 (109 xe2 x80 x89+ xe2 x80 x897).'...

Tutorials

Codeforces Round #223 — Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
5673151 Gassa D Jan. 12, 2014, 4:42 p.m. OK D TESTS 41 46 921600 2500
5741209 Reventon1 D Jan. 19, 2014, 3:10 p.m. OK FPC TESTS 41 171 6451200 2500
5741185 Reventon1 D Jan. 19, 2014, 3:05 p.m. OK FPC TESTS 41 186 7987200 2500
5675639 LayCurse D Jan. 12, 2014, 5:22 p.m. OK GNU C TESTS 41 31 7372800 2500
5676128 11j_bash D Jan. 12, 2014, 5:28 p.m. OK GNU C++ TESTS 41 15 2355200 2500
7572809 zyh D Aug. 25, 2014, 12:18 p.m. OK GNU C++ TESTS 41 31 1228800 2500
5738256 vfleaking D Jan. 19, 2014, 7:03 a.m. OK GNU C++ TESTS 41 31 1228800 2500
14035085 130705009 D Nov. 2, 2015, 11:25 p.m. OK GNU C++ TESTS 41 31 1638400 2500
5781102 lsmll D Jan. 23, 2014, 11:59 p.m. OK GNU C++ TESTS 41 31 1638400 2500
6203183 Tohka D April 1, 2014, 8:31 a.m. OK GNU C++ TESTS 41 31 2048000 2500
15143038 HappyNewYearMike D Dec. 31, 2015, 11 p.m. OK GNU C++ TESTS 41 31 2457600 2500
5690740 Shangke7788 D Jan. 14, 2014, 1:29 p.m. OK GNU C++ TESTS 41 31 2457600 2500
5690722 Shangke7788 D Jan. 14, 2014, 1:27 p.m. OK GNU C++ TESTS 41 31 2457600 2500
5676917 dreamoon_love_AA D Jan. 12, 2014, 5:58 p.m. OK GNU C++ TESTS 41 31 2457600 2500
7911158 zhj D Sept. 22, 2014, 2:30 p.m. OK GNU C++0x TESTS 41 31 1945600 2500
7068663 soda_beta D July 12, 2014, 11:33 a.m. OK GNU C++0x TESTS 41 31 2048000 2500
7342168 delta_4d D Aug. 4, 2014, 6:20 a.m. OK GNU C++0x TESTS 41 31 2252800 2500
5678337 Zuza D Jan. 12, 2014, 8:28 p.m. OK GNU C++0x TESTS 41 31 2252800 2500
5698563 bmerry D Jan. 15, 2014, 6:03 p.m. OK GNU C++0x TESTS 41 31 2662400 2500
5687724 Swistakk D Jan. 14, 2014, 1:57 a.m. OK GNU C++0x TESTS 41 31 4812800 2500
5680178 EmK D Jan. 13, 2014, 5:11 a.m. OK GNU C++0x TESTS 41 31 6963200 2500
6259360 ijkijkijkikjikjkij D April 4, 2014, 4:54 p.m. OK GNU C++0x TESTS 41 62 1638400 2500
5673843 Fdg D Jan. 12, 2014, 4:53 p.m. OK GNU C++0x TESTS 41 62 1843200 2500
7200004 Amor727 D July 22, 2014, 6:08 a.m. OK GNU C++0x TESTS 41 62 2252800 2500
20749292 returnzoo D Sept. 19, 2016, 7:25 a.m. OK GNU C++11 TESTS 41 31 1945600 2500
17432313 Vercingetorix D April 22, 2016, 9:25 a.m. OK GNU C++11 TESTS 41 31 3584000 2500
34825939 strawberrry D Feb. 2, 2018, 4:18 a.m. OK GNU C++11 TESTS 41 31 3686400 2500
55229380 SoiMae D June 7, 2019, 4:29 a.m. OK GNU C++11 TESTS 41 31 6144000 2500
60705627 luogu_bot2 D Sept. 17, 2019, 4:54 a.m. OK GNU C++11 TESTS 41 31 6963200 2500
22122270 RetiredAmrMahmoud D Nov. 9, 2016, 1:04 a.m. OK GNU C++11 TESTS 41 46 1228800 2500
52074964 Daniel_Yeh D March 31, 2019, 9:33 a.m. OK GNU C++11 TESTS 41 46 1638400 2500
52597213 zhuwanman D April 11, 2019, 9:48 a.m. OK GNU C++11 TESTS 41 46 2457600 2500
40833306 zd11024 D July 27, 2018, 6:39 a.m. OK GNU C++11 TESTS 41 46 2457600 2500
60481835 2016wudi D Sept. 13, 2019, 10:51 a.m. OK GNU C++11 TESTS 41 46 2662400 2500
24461258 Lumaere D Feb. 6, 2017, 2:16 a.m. OK GNU C++14 TESTS 41 31 2867200 2500
26195178 jasonvictoryan D April 7, 2017, 1:58 p.m. OK GNU C++14 TESTS 41 31 4403200 2500
57990764 vjudge1 D July 30, 2019, 1:09 p.m. OK GNU C++14 TESTS 41 46 2457600 2500
57990642 vjudge5 D July 30, 2019, 1:06 p.m. OK GNU C++14 TESTS 41 46 2457600 2500
38540569 SUDAL D May 22, 2018, 3:44 p.m. OK GNU C++14 TESTS 41 46 2764800 2500
63680944 ShafinKhadem D Oct. 28, 2019, 7:58 p.m. OK GNU C++14 TESTS 41 46 3174400 2500
35759836 Marco_L_T D Feb. 27, 2018, 11:32 a.m. OK GNU C++14 TESTS 41 46 3481600 2500
32938782 Flash-boy D Dec. 5, 2017, 2:48 a.m. OK GNU C++14 TESTS 41 46 3481600 2500
31622745 FallDream D Oct. 23, 2017, 8:26 a.m. OK GNU C++14 TESTS 41 46 3891200 2500
21394754 SakurakoujiRuna D Oct. 13, 2016, 3:15 a.m. OK GNU C++14 TESTS 41 46 4300800 2500
60486596 stArliGht D Sept. 13, 2019, 12:52 p.m. OK GNU C++17 TESTS 41 46 1638400 2500
40106917 majk D July 9, 2018, 9:05 a.m. OK GNU C++17 TESTS 41 46 2252800 2500
58044523 vjudge4 D July 30, 2019, 9:54 p.m. OK GNU C++17 TESTS 41 46 7168000 2500
47875622 amnesiac_dusk D Jan. 3, 2019, 3:12 p.m. OK GNU C++17 TESTS 41 46 8704000 2500
58044606 vjudge4 D July 30, 2019, 9:58 p.m. OK GNU C++17 TESTS 41 46 9011200 2500
61787071 SashaPROS3 D Oct. 3, 2019, 2:44 p.m. OK GNU C++17 TESTS 41 46 10444800 2500
56541169 ruo D July 5, 2019, 5:18 a.m. OK GNU C++17 TESTS 41 78 3072000 2500
39128483 eyqs D June 10, 2018, 5:50 p.m. OK GNU C++17 TESTS 41 78 3788800 2500
39128515 eyqs D June 10, 2018, 5:51 p.m. OK GNU C++17 TESTS 41 93 3788800 2500
61932418 krasav4ik D Oct. 5, 2019, 4:47 p.m. OK GNU C++17 TESTS 41 109 3481600 2500
5675433 uwi D Jan. 12, 2014, 5:19 p.m. OK Java 7 TESTS 41 78 0 2500
5673713 Egor D Jan. 12, 2014, 4:51 p.m. OK Java 7 TESTS 41 78 102400 2500
5669776 Petr D Jan. 12, 2014, 3:59 p.m. OK Java 7 TESTS 41 78 204800 2500
5687475 islam-al-aarag D Jan. 14, 2014, 12:27 a.m. OK Java 7 TESTS 41 93 15564800 2500
5697484 harhrayr D Jan. 15, 2014, 1:47 p.m. OK Java 7 TESTS 41 140 0 2500
5678875 ivan.popelyshev D Jan. 12, 2014, 10:36 p.m. OK Java 7 TESTS 41 140 204800 2500
5675604 mmaxio D Jan. 12, 2014, 5:22 p.m. OK Java 7 TESTS 41 140 6758400 2500
5810110 net12k44 D Jan. 26, 2014, 2:52 a.m. OK Java 7 TESTS 41 155 0 2500
15901348 mkirsche D Feb. 8, 2016, 7:18 p.m. OK Java 7 TESTS 41 155 9420800 2500
5677898 bendyna.ivan D Jan. 12, 2014, 7:21 p.m. OK Java 7 TESTS 41 202 8704000 2500
5672189 Timur_Sitdikov D Jan. 12, 2014, 4:29 p.m. OK MS C++ TESTS 41 31 2252800 2500
11004193 Alex7 D May 5, 2015, 10:30 a.m. OK MS C++ TESTS 41 31 2764800 2500
11109502 polequoll D May 15, 2015, 4:47 p.m. OK MS C++ TESTS 41 46 3993600 2500
25096166 DEGwer D Feb. 28, 2017, 8:49 a.m. OK MS C++ TESTS 41 61 12697600 2500
5676767 Kurpilyansky D Jan. 12, 2014, 5:51 p.m. OK MS C++ TESTS 41 62 3584000 2500
5682000 NVAL D Jan. 13, 2014, 7:35 a.m. OK MS C++ TESTS 41 62 4608000 2500
5675768 Monyura D Jan. 12, 2014, 5:24 p.m. OK MS C++ TESTS 41 78 3276800 2500
5674692 AleX D Jan. 12, 2014, 5:07 p.m. OK MS C++ TESTS 41 78 3276800 2500
5805180 blueseen D Jan. 25, 2014, 10:41 a.m. OK MS C++ TESTS 41 93 4300800 2500
19940192 yangxinthu D Aug. 18, 2016, 5:44 a.m. OK MS C++ TESTS 41 93 4505600 2500

remove filters

Back to search problems