Codeforces Round 165 (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
269 Codeforces Round 165 (Div. 1) FINISHED False 7200 416759385 Feb. 1, 2013, 3:30 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 493 ) D Maximum Waterfall PROGRAMMING data structures dp graphs sortings 2500

Emuskald was hired to design an artificial waterfall according to the latest trends in landscape architecture. A modern artificial waterfall consists of multiple horizontal panels affixed to a wide flat wall. The water flows down the top of the wall from panel to panel until it reaches the bottom of the wall. The wall has height t and has n panels on the wall. Each panel is a horizontal segment at height h i which begins at l i and ends at r i . The i -th panel connects the points ( l i , h i ) and ( r i , h i ) of the plane. The top of the wall can be considered a panel connecting the points ( - 10 9 , t ) and (10 9 , t ) . Similarly, the bottom of the wall can be considered a panel connecting the points ( - 10 9 , 0) and (10 9 , 0) . No two panels share a common point. Emuskald knows that for the waterfall to be aesthetically pleasing, it can flow from panel i to panel j ( ) only if the following conditions hold: max ( l i , l j ) < min ( r i , r j ) (horizontal projections of the panels overlap); h j < h i (panel j is below panel i ); there is no such panel k ( h j < h k < h i ) that the first two conditions hold for the pairs ( i , k ) and ( k , j ) . Then the flow for is equal to min ( r i , r j ) - max ( l i , l j ) , the length of their horizontal projection overlap. Emuskald has decided that in his waterfall the water will flow in a single path from top to bottom. If water flows to a panel (except the bottom of the wall), the water will fall further to exactly one lower panel. The total amount of water flow in the waterfall is then defined as the minimum horizontal projection overlap between two consecutive panels in the path of the waterfall. Formally: the waterfall consists of a single path of panels ; the flow of the waterfall is the minimum flow in the path . To make a truly great waterfall Emuskald must maximize this water flow, but there are too many panels and he is having a hard time planning his creation. Below is an example of a waterfall

Tutorials

Разбор Codeforces Round #165

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
9136201 xj-jyw D Dec. 15, 2014, 3:21 a.m. OK FPC TESTS 65 592 22835200 2500
9136110 xj-jyw D Dec. 15, 2014, 2:33 a.m. OK FPC TESTS 65 592 31641600 2500
9136236 xj-jyw D Dec. 15, 2014, 3:35 a.m. OK FPC TESTS 65 622 22835200 2500
3092818 Hina D Feb. 11, 2013, 10:08 a.m. OK FPC TESTS 65 984 15257600 2500
40990241 ReaLNero1 D July 30, 2018, 11:44 p.m. OK GNU C++ TESTS 65 124 8499200 2500
40479086 AH_ljq D July 17, 2018, 1:12 p.m. OK GNU C++ TESTS 65 124 8499200 2500
13787730 HJWJBSR D Oct. 22, 2015, 9:09 a.m. OK GNU C++ TESTS 65 124 8601600 2500
40482510 AH_ljq D July 17, 2018, 2:48 p.m. OK GNU C++ TESTS 65 139 8499200 2500
40480608 AH_ljq D July 17, 2018, 1:56 p.m. OK GNU C++ TESTS 65 140 8396800 2500
26487178 cuibst2 D April 19, 2017, 3:05 a.m. OK GNU C++ TESTS 65 140 10137600 2500
18840490 zhangJvv D July 1, 2016, 12:34 p.m. OK GNU C++ TESTS 65 140 12492800 2500
25334188 asdfghjkl12358 D March 8, 2017, 5:55 a.m. OK GNU C++ TESTS 65 140 16998400 2500
14092789 130705009 D Nov. 5, 2015, 4:31 p.m. OK GNU C++ TESTS 65 155 8806400 2500
42322797 Scut82 D Sept. 1, 2018, 12:33 a.m. OK GNU C++ TESTS 65 155 12083200 2500
3110570 MinakoKojima D Feb. 13, 2013, 6:42 a.m. OK GNU C++0x TESTS 65 140 8601600 2500
3110518 MinakoKojima D Feb. 13, 2013, 6:14 a.m. OK GNU C++0x TESTS 65 203 8601600 2500
3110481 MinakoKojima D Feb. 13, 2013, 5:55 a.m. OK GNU C++0x TESTS 65 203 8601600 2500
3110516 MinakoKojima D Feb. 13, 2013, 6:13 a.m. OK GNU C++0x TESTS 65 218 8601600 2500
3060430 jonathanasdf D Feb. 1, 2013, 9:22 p.m. OK GNU C++0x TESTS 65 265 22732800 2500
3071726 BJIAJL D Feb. 4, 2013, 4:41 p.m. OK GNU C++0x TESTS 65 296 10956800 2500
9297380 equation314 D Dec. 29, 2014, 11:03 a.m. OK GNU C++0x TESTS 65 310 8192000 2500
3058964 betalife37 D Feb. 1, 2013, 6:20 p.m. OK GNU C++0x TESTS 65 468 25600000 2500
8542919 zshi D Nov. 4, 2014, 5:45 a.m. OK GNU C++0x TESTS 65 498 22630400 2500
8301732 a654889339 D Oct. 19, 2014, 8:45 a.m. OK GNU C++0x TESTS 65 624 21606400 2500
40546464 purple_sun D July 19, 2018, 12:02 p.m. OK GNU C++11 TESTS 65 124 18841600 2500
57821517 py_ultron D July 26, 2019, 11:42 p.m. OK GNU C++11 TESTS 65 140 8806400 2500
17129873 freebsdx D April 2, 2016, 12:22 p.m. OK GNU C++11 TESTS 65 140 11059200 2500
55064741 SoiMae D June 4, 2019, 2:43 a.m. OK GNU C++11 TESTS 65 140 18534400 2500
52232367 xielinhan D April 2, 2019, 12:22 p.m. OK GNU C++11 TESTS 65 155 16076800 2500
57897567 lopare D July 28, 2019, 2:14 p.m. OK GNU C++11 TESTS 65 156 8806400 2500
26453806 vjudge4 D April 17, 2017, 12:02 p.m. OK GNU C++11 TESTS 65 156 10956800 2500
40546813 luogu_bot1 D July 19, 2018, 12:14 p.m. OK GNU C++11 TESTS 65 156 15257600 2500
40547586 eddysboy D July 19, 2018, 12:37 p.m. OK GNU C++11 TESTS 65 156 18636800 2500
18855691 RNS_CUS D July 2, 2016, 2:36 p.m. OK GNU C++11 TESTS 65 171 14540800 2500
25354374 la1la1la D March 9, 2017, 6:42 a.m. OK GNU C++14 TESTS 65 171 11980800 2500
35667290 ShakuganSky D Feb. 25, 2018, 3:46 a.m. OK GNU C++14 TESTS 65 171 16691200 2500
35542569 cnnfls_csy D Feb. 21, 2018, 9:13 a.m. OK GNU C++14 TESTS 65 187 14540800 2500
23662063 Ali.Pi D Jan. 9, 2017, 7:52 a.m. OK GNU C++14 TESTS 65 202 10956800 2500
35574884 cnnfls_csy D Feb. 22, 2018, 1:58 p.m. OK GNU C++14 TESTS 65 202 13926400 2500
40545861 cnnfls_csy D July 19, 2018, 11:42 a.m. OK GNU C++14 TESTS 65 202 14438400 2500
40546526 vjudge3 D July 19, 2018, 12:04 p.m. OK GNU C++14 TESTS 65 202 18739200 2500
67204190 ElangBondol D Dec. 19, 2019, 11:54 a.m. OK GNU C++14 TESTS 65 202 22732800 2500
40546443 naive_wcx D July 19, 2018, 12:02 p.m. OK GNU C++14 TESTS 65 202 23961600 2500
40546632 gwq2017 D July 19, 2018, 12:08 p.m. OK GNU C++14 TESTS 65 218 19046400 2500
40547639 charliez D July 19, 2018, 12:38 p.m. OK GNU C++17 TESTS 65 171 10752000 2500
40162740 majk D July 10, 2018, 8:03 a.m. OK GNU C++17 TESTS 65 187 12288000 2500
40546207 vjudge3 D July 19, 2018, 11:54 a.m. OK GNU C++17 TESTS 65 187 16179200 2500
40547202 Kirito_wmj D July 19, 2018, 12:25 p.m. OK GNU C++17 TESTS 65 202 19046400 2500
40547155 SKY_magician D July 19, 2018, 12:24 p.m. OK GNU C++17 TESTS 65 202 20172800 2500
51819469 ruo D March 25, 2019, 11:17 a.m. OK GNU C++17 TESTS 65 217 12390400 2500
53082843 Eric_hooo D April 21, 2019, 7:32 a.m. OK GNU C++17 TESTS 65 217 25088000 2500
40547810 vjudge1 D July 19, 2018, 12:43 p.m. OK GNU C++17 TESTS 65 218 19046400 2500
40546383 vjudge3 D July 19, 2018, noon OK GNU C++17 TESTS 65 218 20684800 2500
40546335 libra9z D July 19, 2018, 11:58 a.m. OK GNU C++17 TESTS 65 218 20684800 2500
3055616 Egor D Feb. 1, 2013, 5:02 p.m. OK Java 6 TESTS 65 609 16486400 2500
3061468 qwerty787788 D Feb. 2, 2013, 4:46 a.m. OK Java 7 TESTS 65 625 15769600 2500
3056290 Petr D Feb. 1, 2013, 5:11 p.m. OK Java 7 TESTS 65 734 102400 2500
3058352 niyaznigmatul D Feb. 1, 2013, 6:02 p.m. OK Java 7 TESTS 65 812 22220800 2500
3055096 andrewzta D Feb. 1, 2013, 4:56 p.m. OK Java 7 TESTS 65 1140 58368000 2500
3066120 OgieKako D Feb. 3, 2013, 5:55 a.m. OK Java 7 TESTS 65 1156 22528000 2500
15188666 AndreiNet D Jan. 5, 2016, 7:53 a.m. OK Java 8 TESTS 65 577 14028800 2500
10500091 scanhex D March 28, 2015, 12:38 p.m. OK Java 8 TESTS 65 1310 55910400 2500
10495987 AlexFetisov D March 28, 2015, 3:31 a.m. OK Java 8 TESTS 65 1684 21504000 2500
3110971 problem-solved D Feb. 13, 2013, 9:37 a.m. OK MS C++ TESTS 65 203 8601600 2500
3552761 FattyChicken D April 16, 2013, 1:40 p.m. OK MS C++ TESTS 65 250 15769600 2500
3055514 RAVEman D Feb. 1, 2013, 5:01 p.m. OK MS C++ TESTS 65 265 8294400 2500
3067825 Erop D Feb. 3, 2013, 4:42 p.m. OK MS C++ TESTS 65 280 9420800 2500
3131884 seen D Feb. 15, 2013, 10:03 a.m. OK MS C++ TESTS 65 281 10956800 2500
40565999 vjudge3 D July 20, 2018, 5:28 a.m. OK MS C++ TESTS 65 296 13619200 2500
3316746 Krasnokutskiy D March 14, 2013, 2:07 p.m. OK MS C++ TESTS 65 296 13721600 2500
3055970 kuviman D Feb. 1, 2013, 5:07 p.m. OK MS C++ TESTS 65 358 15667200 2500
3068104 NALP D Feb. 3, 2013, 5:51 p.m. OK MS C++ TESTS 65 375 31027200 2500
4853199 kcm1700 D Oct. 23, 2013, 2:08 p.m. OK MS C++ TESTS 65 404 13414400 2500

remove filters

Back to search problems