Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + 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
1060 Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2) FINISHED False 9000 193186499 Oct. 4, 2018, 7:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3640 ) D Social Circles PROGRAMMING greedy math 1900

B'You invited n guests to dinner! You plan to arrange one or more circles of chairs. Each chair is going to be either occupied by one guest, or be empty. You can make any number of circles. Your guests happen to be a little bit shy, so the i -th guest wants to have a least l_i free chairs to the left of his chair, and at least r_i free chairs to the right. The "left" and "right" directions are chosen assuming all guests are going to be seated towards the center of the circle. Note that when a guest is the only one in his circle, the l_i chairs to his left and r_i chairs to his right may overlap. What is smallest total number of chairs you have to use? First line contains one integer n -- number of guests, ( 1 <= qslant n <= qslant 10^5 ). Next n lines contain n pairs of space-separated integers l_i and r_i ( 0 <= qslant l_i, r_i <= qslant 10^9 ). Output a single integer -- the smallest number of chairs you have to use. In the second sample the only optimal answer is to use two circles: a circle with 5 chairs accomodating guests 1 and 2 , and another one with 10 chairs accomodationg guests 3 and 4 . In the third sample, you have only one circle with one person. The guest should have at least five free chairs to his left, and at least six free chairs to his right to the next person, which is in this case the guest herself. So, overall number of chairs should be at least 6+1=7. '...

Tutorials

User editorial for Codeforces Round 513 by Barcelona Bootcamp (rated, Div. 1 + Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64184775 rr_ D Nov. 4, 2019, 4:09 a.m. OK D TESTS 43 124 4198400 1900
43779738 fluffyowl D Oct. 4, 2018, 9:30 a.m. OK D TESTS 43 358 6963200 1900
43815778 luogu_bot1 D Oct. 5, 2018, 5:11 a.m. OK FPC TESTS 43 77 1638400 1900
43826544 luogu_bot5 D Oct. 5, 2018, 12:06 p.m. OK FPC TESTS 43 77 1638400 1900
43922761 cbl_nhathuy D Oct. 7, 2018, 2:07 a.m. OK FPC TESTS 43 78 921600 1900
43826521 luogu_bot5 D Oct. 5, 2018, 12:06 p.m. OK FPC TESTS 43 78 1638400 1900
43782412 TShT D Oct. 4, 2018, 11:03 a.m. OK FPC TESTS 43 78 7987200 1900
45090421 luogu_bot1 D Oct. 30, 2018, 9:19 a.m. OK FPC TESTS 43 93 3174400 1900
48296396 vjudge2 D Jan. 12, 2019, 2:45 p.m. OK GNU C11 TESTS 43 61 819200 1900
57259413 sansen D July 18, 2019, 4:14 a.m. OK GNU C11 TESTS 43 62 1228800 1900
43818827 libra9z D Oct. 5, 2018, 7:06 a.m. OK GNU C11 TESTS 43 77 1638400 1900
43769184 zhouyuheng D Oct. 4, 2018, 7:54 a.m. OK GNU C++11 TESTS 43 31 614400 1900
43767444 xuanyi D Oct. 4, 2018, 7:43 a.m. OK GNU C++11 TESTS 43 31 614400 1900
43771843 Recc D Oct. 4, 2018, 8:13 a.m. OK GNU C++11 TESTS 43 31 614400 1900
43774752 CaptainSlow D Oct. 4, 2018, 8:38 a.m. OK GNU C++11 TESTS 43 31 614400 1900
43781740 Rebirth_A D Oct. 4, 2018, 10:52 a.m. OK GNU C++11 TESTS 43 31 614400 1900
59653870 zcs123 D Aug. 29, 2019, 9:27 a.m. OK GNU C++11 TESTS 43 31 819200 1900
50914559 chc_1234567890 D March 7, 2019, 5:21 a.m. OK GNU C++11 TESTS 43 31 819200 1900
69137027 wlzs D Jan. 19, 2020, 3:06 p.m. OK GNU C++11 TESTS 43 31 819200 1900
64681512 lindalee D Nov. 11, 2019, 10:12 a.m. OK GNU C++11 TESTS 43 31 819200 1900
64681483 luogu_bot2 D Nov. 11, 2019, 10:12 a.m. OK GNU C++11 TESTS 43 31 819200 1900
43928435 nickluo D Oct. 7, 2018, 6:12 a.m. OK GNU C++14 TESTS 43 31 921600 1900
43773679 interestingLSY D Oct. 4, 2018, 8:28 a.m. OK GNU C++14 TESTS 43 31 8089600 1900
45775831 wleung_bvg D Nov. 15, 2018, 5 p.m. OK GNU C++14 TESTS 43 46 819200 1900
63381054 vjudge3 D Oct. 25, 2019, 12:28 p.m. OK GNU C++14 TESTS 43 61 819200 1900
54815840 igorqs D May 29, 2019, 7:49 p.m. OK GNU C++14 TESTS 43 61 819200 1900
57743490 vjudge1 D July 25, 2019, 12:13 p.m. OK GNU C++14 TESTS 43 62 819200 1900
66237057 lcs147 D Dec. 3, 2019, 4:35 p.m. OK GNU C++14 TESTS 43 62 819200 1900
61316201 Underdog_eagle D Sept. 26, 2019, 11:09 a.m. OK GNU C++14 TESTS 43 62 819200 1900
53627943 vjudge1 D May 1, 2019, 3:24 p.m. OK GNU C++14 TESTS 43 62 819200 1900
52494487 bluefi D April 8, 2019, 1:05 p.m. OK GNU C++14 TESTS 43 62 819200 1900
43924237 LiChenKoh D Oct. 7, 2018, 3:35 a.m. OK GNU C++17 TESTS 43 46 819200 1900
43771242 Trisolaris D Oct. 4, 2018, 8:09 a.m. OK GNU C++17 TESTS 43 46 921600 1900
45201450 vjudge2 D Nov. 2, 2018, 10:15 a.m. OK GNU C++17 TESTS 43 46 1024000 1900
43762340 whzzt D Oct. 4, 2018, 7:21 a.m. OK GNU C++17 TESTS 43 46 5017600 1900
43922048 q234rty D Oct. 7, 2018, 1:14 a.m. OK GNU C++17 TESTS 43 46 10854400 1900
43764164 xumingkuan D Oct. 4, 2018, 7:28 a.m. OK GNU C++17 TESTS 43 61 819200 1900
55717553 iShibly D June 18, 2019, 1:30 p.m. OK GNU C++17 TESTS 43 61 819200 1900
49776005 Dup4 D Feb. 11, 2019, 3:29 p.m. OK GNU C++17 TESTS 43 61 1024000 1900
43803611 apostoldaniel854 D Oct. 4, 2018, 6:33 p.m. OK GNU C++17 TESTS 43 61 1126400 1900
45845506 J.S. D Nov. 16, 2018, 7:22 p.m. OK GNU C++17 TESTS 43 61 1433600 1900
43814599 Haar D Oct. 5, 2018, 4:12 a.m. OK Haskell TESTS 43 343 34816000 1900
64779221 IslamTalipovTop D Nov. 13, 2019, 6:20 a.m. OK Java 11 TESTS 43 358 0 1900
44534233 BaZ_ D Oct. 19, 2018, 8:07 a.m. OK Java 8 TESTS 43 139 0 1900
43822719 jenish9599 D Oct. 5, 2018, 10:06 a.m. OK Java 8 TESTS 43 140 0 1900
43782600 jyoti_123 D Oct. 4, 2018, 11:06 a.m. OK Java 8 TESTS 43 140 0 1900
46024880 hongquanntct D Nov. 21, 2018, 10:37 a.m. OK Java 8 TESTS 43 155 0 1900
43799568 Ahmad D Oct. 4, 2018, 4:53 p.m. OK Java 8 TESTS 43 155 0 1900
43797409 aman28rwt D Oct. 4, 2018, 4:04 p.m. OK Java 8 TESTS 43 155 0 1900
43783646 U_Square D Oct. 4, 2018, 11:27 a.m. OK Java 8 TESTS 43 155 0 1900
59566559 yaoct D Aug. 27, 2019, 10:57 a.m. OK Java 8 TESTS 43 156 0 1900
43780073 Musin D Oct. 4, 2018, 9:33 a.m. OK Java 8 TESTS 43 170 0 1900
68408337 shaurya_singh D Jan. 8, 2020, 3:55 p.m. OK Java 8 TESTS 43 171 0 1900
43793795 NguyenHungCuong D Oct. 4, 2018, 2:44 p.m. OK JavaScript TESTS 43 234 12288000 1900
48408773 eki D Jan. 15, 2019, 6:21 a.m. OK Mono C# TESTS 43 140 3788800 1900
43812254 witchu D Oct. 5, 2018, 2 a.m. OK Mono C# TESTS 43 155 4608000 1900
43767891 leign D Oct. 4, 2018, 7:46 a.m. OK Mono C# TESTS 43 155 4710400 1900
43773579 omikad D Oct. 4, 2018, 8:27 a.m. OK Mono C# TESTS 43 187 8192000 1900
48287193 vjudge3 D Jan. 12, 2019, 11:08 a.m. OK MS C++ TESTS 43 46 819200 1900
45363303 vjudge1 D Nov. 6, 2018, 9:25 a.m. OK MS C++ TESTS 43 46 819200 1900
44617237 vjudge2 D Oct. 21, 2018, 3:02 a.m. OK MS C++ TESTS 43 46 819200 1900
48287329 vjudge3 D Jan. 12, 2019, 11:13 a.m. OK MS C++ TESTS 43 46 819200 1900
44572973 vjudge2 D Oct. 20, 2018, 5:45 a.m. OK MS C++ TESTS 43 46 1638400 1900
43766399 davidlee1999WTK D Oct. 4, 2018, 7:37 a.m. OK MS C++ TESTS 43 46 1638400 1900
63382014 vjudge5 D Oct. 25, 2019, 12:44 p.m. OK MS C++ TESTS 43 61 819200 1900
45669837 vjudge3 D Nov. 13, 2018, 9:52 a.m. OK MS C++ TESTS 43 61 819200 1900
44040493 vjudge4 D Oct. 9, 2018, 2:31 p.m. OK MS C++ TESTS 43 61 819200 1900
48290723 vjudge5 D Jan. 12, 2019, 12:39 p.m. OK MS C++ TESTS 43 61 819200 1900
50566948 YESMAths D Feb. 27, 2019, 1:34 p.m. OK PyPy 2 TESTS 43 233 15462400 1900
43930845 kd710306 D Oct. 7, 2018, 7:15 a.m. OK PyPy 2 TESTS 43 638 8089600 1900
43784964 Onesh0t D Oct. 4, 2018, 11:52 a.m. OK PyPy 2 TESTS 43 670 8294400 1900
43783579 c1729 D Oct. 4, 2018, 11:26 a.m. OK PyPy 2 TESTS 43 701 2867200 1900
44685803 test616.cpp D Oct. 22, 2018, 9:25 a.m. OK PyPy 2 TESTS 43 716 7884800 1900
49173799 conjecture_xyz D Jan. 29, 2019, 7:18 p.m. OK PyPy 2 TESTS 43 842 20787200 1900
43791947 haxxpop D Oct. 4, 2018, 2:07 p.m. OK PyPy 3 TESTS 43 358 16998400 1900
43773647 titia D Oct. 4, 2018, 8:28 a.m. OK PyPy 3 TESTS 43 389 15667200 1900
52995468 bupt.wc D April 19, 2019, 3:23 a.m. OK PyPy 3 TESTS 43 920 8601600 1900
44155915 omarnvidia D Oct. 11, 2018, 6:17 p.m. OK PyPy 3 TESTS 43 920 9932800 1900
44265772 tranphuminhbkhn D Oct. 13, 2018, 4:33 p.m. OK PyPy 3 TESTS 43 935 9523200 1900
48288900 vjudge4 D Jan. 12, 2019, 11:54 a.m. OK PyPy 3 TESTS 43 935 10035200 1900
48288707 vjudge4 D Jan. 12, 2019, 11:49 a.m. OK PyPy 3 TESTS 43 951 9625600 1900
48288597 vjudge5 D Jan. 12, 2019, 11:47 a.m. OK PyPy 3 TESTS 43 967 9625600 1900
43814235 quantu_zo D Oct. 5, 2018, 3:53 a.m. OK PyPy 3 TESTS 43 967 10035200 1900
48286295 vjudge5 D Jan. 12, 2019, 10:37 a.m. OK PyPy 3 TESTS 43 982 9728000 1900
53961394 vjudge4 D May 10, 2019, 2:26 p.m. OK Python 2 TESTS 43 436 4505600 1900
44685845 test616.cpp D Oct. 22, 2018, 9:27 a.m. OK Python 2 TESTS 43 467 9932800 1900
45557280 Jonasz D Nov. 11, 2018, 9:20 a.m. OK Python 2 TESTS 43 499 10547200 1900
43792015 sirjan13 D Oct. 4, 2018, 2:09 p.m. OK Python 2 TESTS 43 592 6553600 1900
43776936 ManasG D Oct. 4, 2018, 8:59 a.m. OK Python 2 TESTS 43 1044 19865600 1900
44829503 Ostad_George D Oct. 25, 2018, 7:52 a.m. OK Python 3 TESTS 43 404 6041600 1900
45191804 rareone0602 D Nov. 2, 2018, 3:09 a.m. OK Python 3 TESTS 43 404 6348800 1900
44338159 sampash D Oct. 15, 2018, 12:12 a.m. OK Python 3 TESTS 43 404 6553600 1900
48292600 vjudge4 D Jan. 12, 2019, 1:22 p.m. OK Python 3 TESTS 43 405 6246400 1900
53292739 vjudge3 D April 25, 2019, 4:16 p.m. OK Python 3 TESTS 43 405 6860800 1900
44718673 codefield D Oct. 23, 2018, 1:24 a.m. OK Python 3 TESTS 43 420 5734400 1900
44531899 SamuelLH D Oct. 19, 2018, 6:56 a.m. OK Python 3 TESTS 43 420 5836800 1900
68629159 vjudge2 D Jan. 12, 2020, 1:31 a.m. OK Python 3 TESTS 43 420 6553600 1900
44718262 codefield D Oct. 23, 2018, 12:36 a.m. OK Python 3 TESTS 43 420 6656000 1900
48288068 vjudge4 D Jan. 12, 2019, 11:33 a.m. OK Python 3 TESTS 43 420 7372800 1900
43935439 Felerius D Oct. 7, 2018, 8:49 a.m. OK Rust TESTS 43 61 819200 1900
43798484 clrcldy D Oct. 4, 2018, 4:27 p.m. OK Rust TESTS 43 62 8908800 1900
44556157 yakamoto D Oct. 19, 2018, 5:22 p.m. OK Scala TESTS 43 514 0 1900

remove filters

Back to search problems