Codeforces Round #Pi (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
567 Codeforces Round #Pi (Div. 2) FINISHED False 9000 337701585 Aug. 5, 2015, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 636 ) F Mausoleum PROGRAMMING dp 2700

King of Berland Berl IV has recently died. Hail Berl V! As a sign of the highest achievements of the deceased king the new king decided to build a mausoleum with Berl IV's body on the main square of the capital. The mausoleum will be constructed from 2 n blocks, each of them has the shape of a cuboid. Each block has the bottom base of a 1 × 1 meter square. Among the blocks, exactly two of them have the height of one meter, exactly two have the height of two meters, ..., exactly two have the height of n meters. The blocks are arranged in a row without spacing one after the other. Of course, not every arrangement of blocks has the form of a mausoleum. In order to make the given arrangement in the form of the mausoleum, it is necessary that when you pass along the mausoleum, from one end to the other, the heights of the blocks first were non-decreasing (i.e., increasing or remained the same), and then — non-increasing (decrease or remained unchanged). It is possible that any of these two areas will be omitted. For example, the following sequences of block height meet this requirement: 1, 2, 2, 3, 4, 4, 3, 1 ; 1, 1 ; 2, 2, 1, 1 ; 1, 2, 3, 3, 2, 1 . Suddenly, k more requirements appeared. Each of the requirements has the form: " h x i sign i h y i ", where h t is the height of the t -th block, and a sign i is one of the five possible signs: ' = ' (equals), ' < ' (less than), ' > ' (more than), ' <= ' (less than or equals), ' >= ' (more than or equals). Thus, each of the k additional requirements is given by a pair of indexes x i , y i ( 1 ≤ x i , y i ≤ 2 n ) and sign sign i . Find the number of possible ways to rearrange the blocks so that both the requirement about the shape of the mausoleum (see paragraph 3) and the k additional requirements were met. The first line of the input contains integers n and k ( 1 ≤ n ≤ 35 , 0 ≤ k ≤ 100 ) — the number of pairs of blocks and the number of additional requirements. Next k lines contain listed addit

Tutorials

Editorial Codeforces Round #Pi

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
12561929 ImNotGay F Aug. 16, 2015, 2:06 p.m. OK FPC TESTS 42 15 102400 2700
15464905 ImNotGay F Jan. 21, 2016, 8:03 a.m. OK FPC TESTS 42 15 204800 2700
31106677 dwjshift F Oct. 7, 2017, 8:46 a.m. OK GNU C++ TESTS 42 15 0 2700
31029616 UniFYH F Oct. 5, 2017, 10:14 a.m. OK GNU C++ TESTS 42 15 0 2700
22191973 Minology F Nov. 13, 2016, 11:44 a.m. OK GNU C++ TESTS 42 15 0 2700
21102464 skywalkert F Oct. 1, 2016, 11:29 p.m. OK GNU C++ TESTS 42 15 0 2700
14764246 KrK F Dec. 11, 2015, 6:50 p.m. OK GNU C++ TESTS 42 15 0 2700
13787593 DRERY F Oct. 22, 2015, 8:59 a.m. OK GNU C++ TESTS 42 15 0 2700
12548978 PlayWithWind F Aug. 15, 2015, 2:33 p.m. OK GNU C++ TESTS 42 15 0 2700
12502980 davorpr1 F Aug. 13, 2015, 5:04 p.m. OK GNU C++ TESTS 42 15 0 2700
12433474 stareven F Aug. 10, 2015, 6:54 a.m. OK GNU C++ TESTS 42 15 0 2700
21970073 vjudge4 F Nov. 1, 2016, 2:18 p.m. OK GNU C++ TESTS 42 15 102400 2700
22696939 letsbe F Dec. 4, 2016, 1:49 p.m. OK GNU C++11 TESTS 42 15 0 2700
15142337 HappyNewYearMike F Dec. 31, 2015, 10:23 p.m. OK GNU C++11 TESTS 42 15 0 2700
13013537 lxk F Sept. 15, 2015, 8:22 p.m. OK GNU C++11 TESTS 42 15 0 2700
12574958 marat.snowbear F Aug. 17, 2015, 12:15 p.m. OK GNU C++11 TESTS 42 15 0 2700
12527821 Vlad_kv F Aug. 14, 2015, 9:57 a.m. OK GNU C++11 TESTS 42 15 0 2700
31702290 I_always_love_cc F Oct. 25, 2017, 7:58 a.m. OK GNU C++11 TESTS 42 15 102400 2700
21971624 shengdebao F Nov. 1, 2016, 3:15 p.m. OK GNU C++11 TESTS 42 15 102400 2700
21795765 judgeee F Oct. 26, 2016, 1:48 p.m. OK GNU C++11 TESTS 42 15 102400 2700
21793606 pzh F Oct. 26, 2016, 12:19 p.m. OK GNU C++11 TESTS 42 15 102400 2700
15961792 I_Love_Tina F Feb. 11, 2016, 6:20 p.m. OK GNU C++11 TESTS 42 15 102400 2700
30053979 step_by_step F Sept. 4, 2017, 1:28 p.m. OK GNU C++14 TESTS 42 15 0 2700
55741608 toxic_hack F June 19, 2019, 7:45 a.m. OK GNU C++14 TESTS 42 15 102400 2700
31906888 danya.smelskiy F Oct. 30, 2017, 10:17 p.m. OK GNU C++14 TESTS 42 15 204800 2700
29995847 rawatds F Sept. 1, 2017, 7:16 p.m. OK GNU C++14 TESTS 42 15 512000 2700
34964618 sincerity F Feb. 6, 2018, 8:19 a.m. OK GNU C++14 TESTS 42 15 1945600 2700
23385884 Ali.Pi F Dec. 28, 2016, 7:49 p.m. OK GNU C++14 TESTS 42 15 1945600 2700
28740074 dorostmishe F July 21, 2017, 5:22 a.m. OK GNU C++14 TESTS 42 15 2048000 2700
34571703 Zeus726 F Jan. 26, 2018, 9:56 a.m. OK GNU C++14 TESTS 42 15 2150400 2700
33870441 Powerslave F Jan. 2, 2018, 4:59 p.m. OK GNU C++14 TESTS 42 15 2150400 2700
28287655 jufusong F July 4, 2017, 6:47 p.m. OK GNU C++14 TESTS 42 15 2150400 2700
64544195 SHOToRSAVARE_KAZEMSHAHR F Nov. 8, 2019, 7:45 p.m. OK GNU C++17 TESTS 42 15 512000 2700
67517552 AliShahali1382 F Dec. 24, 2019, 11:22 a.m. OK GNU C++17 TESTS 42 30 204800 2700
62583082 Umi F Oct. 14, 2019, 5:50 p.m. OK GNU C++17 TESTS 42 30 204800 2700
59115967 Zory F Aug. 20, 2019, 1:40 a.m. OK GNU C++17 TESTS 42 30 8396800 2700
63780149 julianfernando F Oct. 30, 2019, 10:47 a.m. OK GNU C++17 TESTS 42 31 0 2700
38351080 Adrestia F May 17, 2018, 1:50 p.m. OK GNU C++17 TESTS 42 31 102400 2700
38350962 Adrestia F May 17, 2018, 1:46 p.m. OK GNU C++17 TESTS 42 31 102400 2700
65690982 ruo F Nov. 25, 2019, 4:50 a.m. OK GNU C++17 TESTS 42 31 204800 2700
64237470 hjk1030 F Nov. 4, 2019, 2:16 p.m. OK GNU C++17 TESTS 42 31 204800 2700
63100978 Kuroni F Oct. 22, 2019, 12:29 a.m. OK GNU C++17 TESTS 42 31 204800 2700
12846138 edorundo F Sept. 4, 2015, 10:38 p.m. OK Java 7 TESTS 42 93 0 2700
12679759 Bat-Orgil F Aug. 24, 2015, 4:55 a.m. OK Java 8 TESTS 42 109 0 2700
12461905 hama-du F Aug. 11, 2015, 5:52 a.m. OK Java 8 TESTS 42 124 0 2700
12460943 ccdd4211 F Aug. 11, 2015, 3:25 a.m. OK Java 8 TESTS 42 140 0 2700
23909507 physmatman F Jan. 17, 2017, 7:21 p.m. OK Java 8 TESTS 42 218 21913600 2700
23909101 physmatman F Jan. 17, 2017, 6:55 p.m. OK Java 8 TESTS 42 233 21913600 2700
23909563 physmatman F Jan. 17, 2017, 7:24 p.m. OK Java 8 TESTS 42 265 21913600 2700
12884612 sqc1999 F Sept. 7, 2015, 1:05 p.m. OK MS C# TESTS 42 61 614400 2700
12920990 logickaiser F Sept. 10, 2015, 9:49 a.m. OK MS C++ TESTS 42 15 102400 2700
12920935 logickaiser F Sept. 10, 2015, 9:44 a.m. OK MS C++ TESTS 42 15 102400 2700
12837063 cs2000 F Sept. 4, 2015, 5:56 a.m. OK MS C++ TESTS 42 31 0 2700
13418940 Maffka F Oct. 5, 2015, 3:50 p.m. OK MS C++ TESTS 42 31 102400 2700
12707090 Waldis F Aug. 26, 2015, 11:43 a.m. OK MS C++ TESTS 42 31 102400 2700
12563728 kingofnumbers F Aug. 16, 2015, 4:57 p.m. OK MS C++ TESTS 42 31 102400 2700
12441201 art1smagnae F Aug. 10, 2015, 4:17 p.m. OK MS C++ TESTS 42 31 102400 2700
35893789 _____k_____ F March 3, 2018, 4:07 p.m. OK Python 3 TESTS 42 280 5939200 2700
35888562 ______n______ F March 3, 2018, 2:25 p.m. OK Python 3 TESTS 42 280 5939200 2700
35887054 _____i_____ F March 3, 2018, 1:57 p.m. OK Python 3 TESTS 42 280 5939200 2700
35883467 ______h______ F March 3, 2018, 12:56 p.m. OK Python 3 TESTS 42 280 5939200 2700
35883119 ______k______ F March 3, 2018, 12:50 p.m. OK Python 3 TESTS 42 280 5939200 2700
35875332 ______i______ F March 3, 2018, 8:15 a.m. OK Python 3 TESTS 42 280 5939200 2700
35873845 ______M______ F March 3, 2018, 7:40 a.m. OK Python 3 TESTS 42 280 5939200 2700
14199072 grothendieck F Nov. 11, 2015, 4:31 p.m. OK Python 3 TESTS 42 311 409600 2700

remove filters

Back to search problems