Codeforces Round 337 (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
610 Codeforces Round 337 (Div. 2) FINISHED False 7200 286396804 Dec. 27, 2015, 11:20 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1537 ) D Vika and Segments PROGRAMMING constructive algorithms data structures geometry two pointers 2300

B'Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet and drew n black horizontal and vertical segments parallel to the coordinate axes. All segments have width equal to 1 square, that means every segment occupy some set of neighbouring squares situated in one row or one column. Your task is to calculate the number of painted cells. If a cell was painted more than once, it should be calculated exactly once. The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000) -- the number of segments drawn by Vika. Each of the next n lines contains four integers x1, y1, x2 and y2 ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x1, xe2 x80 x89y1, xe2 x80 x89x2, xe2 x80 x89y2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the coordinates of the endpoints of the segments drawn by Vika. It is guaranteed that all the segments are parallel to coordinate axes. Segments may touch, overlap and even completely coincide. Print the number of cells painted by Vika. If a cell was painted more than once, it should be calculated exactly once in the answer. In the first sample Vika will paint squares (0, xe2 x80 x891), (1, xe2 x80 x891), (2, xe2 x80 x891), (1, xe2 x80 x892), (1, xe2 x80 x893), (1, xe2 x80 x894), (0, xe2 x80 x893) and (2, xe2 x80 x893).'...

Tutorials

Codeforces Round #337 (Div.2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
15133699 Profeeder D Dec. 31, 2015, 7:30 a.m. OK FPC TESTS 47 171 13619200 2300
15059361 ThereIsNoSalvationForMe D Dec. 27, 2015, 5:22 p.m. OK FPC TESTS 47 171 23449600 2300
15744493 ez_zkj D Feb. 2, 2016, 6:21 a.m. OK FPC TESTS 47 311 19251200 2300
15052759 Sanja D Dec. 27, 2015, 12:38 p.m. OK FPC TESTS 47 483 235827200 2300
15056731 EKASMA D Dec. 27, 2015, 2:09 p.m. OK GNU C TESTS 47 156 15155200 2300
22166307 rainboy D Nov. 11, 2016, 4:42 p.m. OK GNU C TESTS 47 187 64102400 2300
16981600 jcvb D March 28, 2016, 1:50 a.m. OK GNU C++ TESTS 47 62 32051200 2300
40985490 ReaLNero1 D July 30, 2018, 7:58 p.m. OK GNU C++ TESTS 47 77 29798400 2300
15049809 NaiveNaive D Dec. 27, 2015, 12:04 p.m. OK GNU C++ TESTS 47 78 29798400 2300
15155318 DSSGSRA D Jan. 2, 2016, 5:57 a.m. OK GNU C++ TESTS 47 93 6041600 2300
15050760 yubowenok D Dec. 27, 2015, 12:16 p.m. OK GNU C++ TESTS 47 93 8806400 2300
16055229 sfiction D Feb. 16, 2016, 11:56 a.m. OK GNU C++ TESTS 47 109 7065600 2300
15082214 Lee52 D Dec. 29, 2015, 9:23 a.m. OK GNU C++ TESTS 47 109 11059200 2300
15067555 Lee52 D Dec. 28, 2015, 8:40 a.m. OK GNU C++ TESTS 47 109 11161600 2300
15067305 lsmll D Dec. 28, 2015, 8:19 a.m. OK GNU C++ TESTS 47 109 11161600 2300
15549646 vjudge3 D Jan. 24, 2016, 7:39 a.m. OK GNU C++ TESTS 47 109 16076800 2300
15081673 MohanLau D Dec. 29, 2015, 8:41 a.m. OK GNU C++11 TESTS 47 78 9420800 2300
15071277 MohanLau D Dec. 28, 2015, 1:29 p.m. OK GNU C++11 TESTS 47 78 10240000 2300
15062494 Jhamra D Dec. 27, 2015, 10:22 p.m. OK GNU C++11 TESTS 47 78 10854400 2300
15083483 Meowww D Dec. 29, 2015, 11:04 a.m. OK GNU C++11 TESTS 47 78 11878400 2300
15055211 zscc D Dec. 27, 2015, 1:14 p.m. OK GNU C++11 TESTS 47 93 7270400 2300
21890647 Duxar D Oct. 30, 2016, 10:50 a.m. OK GNU C++11 TESTS 47 108 9932800 2300
15163613 krijgertje D Jan. 3, 2016, 12:36 a.m. OK GNU C++11 TESTS 47 109 7475200 2300
15056194 cmd D Dec. 27, 2015, 1:46 p.m. OK GNU C++11 TESTS 47 109 8294400 2300
15069900 akim D Dec. 28, 2015, 11:47 a.m. OK GNU C++11 TESTS 47 109 8806400 2300
15057705 comzyh D Dec. 27, 2015, 3:01 p.m. OK GNU C++11 TESTS 47 109 11059200 2300
31193627 waynetuinfor D Oct. 10, 2017, 3:19 p.m. OK GNU C++14 TESTS 47 109 22630400 2300
59398894 Scut82 D Aug. 24, 2019, 11:23 a.m. OK GNU C++14 TESTS 47 139 10752000 2300
59392188 Scut82 D Aug. 24, 2019, 8:59 a.m. OK GNU C++14 TESTS 47 140 10649600 2300
59398661 Scut82 D Aug. 24, 2019, 11:18 a.m. OK GNU C++14 TESTS 47 140 10752000 2300
35586784 jiangshibiao D Feb. 23, 2018, 2:06 a.m. OK GNU C++14 TESTS 47 140 14643200 2300
59399759 Scut82 D Aug. 24, 2019, 11:41 a.m. OK GNU C++14 TESTS 47 155 10649600 2300
35583070 TadijaSebez D Feb. 22, 2018, 8:27 p.m. OK GNU C++14 TESTS 47 155 25600000 2300
34536899 universe- D Jan. 25, 2018, 6:07 a.m. OK GNU C++14 TESTS 47 171 12800000 2300
34536835 universe- D Jan. 25, 2018, 6:03 a.m. OK GNU C++14 TESTS 47 171 12800000 2300
34535721 universe- D Jan. 25, 2018, 4:53 a.m. OK GNU C++14 TESTS 47 171 14336000 2300
54816424 OMG_wc D May 29, 2019, 8:18 p.m. OK GNU C++17 TESTS 47 140 13824000 2300
68714259 ruo D Jan. 13, 2020, 1:57 p.m. OK GNU C++17 TESTS 47 155 11161600 2300
55699809 chongryong D June 18, 2019, 3 a.m. OK GNU C++17 TESTS 47 155 11264000 2300
54816377 OMG_wc D May 29, 2019, 8:16 p.m. OK GNU C++17 TESTS 47 155 11366400 2300
48310515 karasek D Jan. 13, 2019, 12:54 a.m. OK GNU C++17 TESTS 47 187 9011200 2300
55699806 chongryong D June 18, 2019, 3 a.m. OK GNU C++17 TESTS 47 187 15257600 2300
55557462 chongryong D June 14, 2019, 10:42 a.m. OK GNU C++17 TESTS 47 187 18739200 2300
35767853 vjudge3 D Feb. 27, 2018, 3:47 p.m. OK GNU C++17 TESTS 47 202 12288000 2300
35767539 lightyears1998 D Feb. 27, 2018, 3:34 p.m. OK GNU C++17 TESTS 47 202 12288000 2300
61578607 ivan100sic D Sept. 30, 2019, 11:15 p.m. OK GNU C++17 TESTS 47 202 82841600 2300
15073341 kuldeeppatel D Dec. 28, 2015, 3:40 p.m. OK Java 7 TESTS 47 311 8704000 2300
15073498 kuldeeppatel D Dec. 28, 2015, 3:51 p.m. OK Java 7 TESTS 47 343 8806400 2300
16626619 alibaba D March 10, 2016, 3:14 a.m. OK Java 7 TESTS 47 670 27238400 2300
15268417 Ljubitel D Jan. 9, 2016, 11:13 a.m. OK Java 7 TESTS 47 748 45465600 2300
15046470 uwi D Dec. 27, 2015, 11:39 a.m. OK Java 8 TESTS 47 280 0 2300
15493350 squee_spoon D Jan. 22, 2016, 7:23 a.m. OK Java 8 TESTS 47 436 0 2300
15162862 Dukkha D Jan. 2, 2016, 9:21 p.m. OK Java 8 TESTS 47 436 14848000 2300
15066173 DanielAnderson D Dec. 28, 2015, 6:36 a.m. OK Java 8 TESTS 47 451 102400 2300
15491979 knelson D Jan. 22, 2016, 6:30 a.m. OK Java 8 TESTS 47 468 14643200 2300
15195310 Cozma_Tudor D Jan. 5, 2016, 7:55 p.m. OK Java 8 TESTS 47 483 14950400 2300
15088963 holeguma D Dec. 29, 2015, 6:35 p.m. OK Java 8 TESTS 47 483 21401600 2300
15091158 Aemon D Dec. 29, 2015, 11:32 p.m. OK Java 8 TESTS 47 483 23654400 2300
17475275 dale.flamm D April 24, 2016, 12:46 a.m. OK Java 8 TESTS 47 483 43929600 2300
16065106 unsupo D Feb. 17, 2016, 3:28 a.m. OK Java 8 TESTS 47 499 16793600 2300
42811711 hey_boris D Sept. 12, 2018, 8:36 p.m. OK Kotlin TESTS 47 982 19353600 2300
43619884 hey_boris D Sept. 30, 2018, 6:31 p.m. OK Kotlin TESTS 47 982 21708800 2300
15070494 AnatolyTolstobrov D Dec. 28, 2015, 12:35 p.m. OK MS C# TESTS 47 186 14745600 2300
15069341 AnatolyTolstobrov D Dec. 28, 2015, 11:02 a.m. OK MS C# TESTS 47 186 14745600 2300
15069361 AnatolyTolstobrov D Dec. 28, 2015, 11:04 a.m. OK MS C# TESTS 47 187 14745600 2300
15070523 AnatolyTolstobrov D Dec. 28, 2015, 12:38 p.m. OK MS C# TESTS 47 202 14745600 2300
15070535 AnatolyTolstobrov D Dec. 28, 2015, 12:39 p.m. OK MS C# TESTS 47 218 14848000 2300
17475480 Bunni D April 24, 2016, 1:45 a.m. OK MS C# TESTS 47 326 24064000 2300
17475332 Bunni D April 24, 2016, 1:05 a.m. OK MS C# TESTS 47 327 24064000 2300
17475609 dale.flamm D April 24, 2016, 2:19 a.m. OK MS C# TESTS 47 327 24166400 2300
17475575 Bunni D April 24, 2016, 2:12 a.m. OK MS C# TESTS 47 342 24473600 2300
15053430 AleksanderBalobanov D Dec. 27, 2015, 12:48 p.m. OK MS C++ TESTS 47 171 50790400 2300
15068585 Musuccess D Dec. 28, 2015, 10:02 a.m. OK MS C++ TESTS 47 187 54681600 2300
16070121 SlavaSSU D Feb. 17, 2016, 11:46 a.m. OK MS C++ TESTS 47 342 63078400 2300
15066879 vintage_Vlad_Makeev D Dec. 28, 2015, 7:41 a.m. OK MS C++ TESTS 47 358 54579200 2300
15219220 SniXosha D Jan. 6, 2016, 10:20 p.m. OK MS C++ TESTS 47 374 7372800 2300
15058053 dinarisio D Dec. 27, 2015, 3:23 p.m. OK MS C++ TESTS 47 405 11468800 2300
22035633 AWCXV D Nov. 4, 2016, 1:49 p.m. OK MS C++ TESTS 47 405 19353600 2300
22035833 AWCXV D Nov. 4, 2016, 2 p.m. OK MS C++ TESTS 47 405 28979200 2300
15232817 Golovin D Jan. 8, 2016, 6:06 a.m. OK MS C++ TESTS 47 421 14438400 2300
15437354 ice_cookie D Jan. 19, 2016, 8:45 a.m. OK MS C++ TESTS 47 467 44851200 2300
61736509 extremum D Oct. 2, 2019, 6:25 p.m. OK MS C++ 2017 TESTS 47 655 24985600 2300
15074394 Darooha D Dec. 28, 2015, 4:36 p.m. OK Ocaml TESTS 47 483 24780800 2300
15090823 naresh7406 D Dec. 29, 2015, 10:23 p.m. OK PyPy 2 TESTS 47 685 26931200 2300
15060692 lollollol D Dec. 27, 2015, 6:59 p.m. OK PyPy 2 TESTS 47 779 33382400 2300
15062860 lollollol D Dec. 27, 2015, 11:28 p.m. OK PyPy 2 TESTS 47 1014 34918400 2300
15062851 lollollol D Dec. 27, 2015, 11:26 p.m. OK PyPy 2 TESTS 47 1045 34406400 2300
15062877 lollollol D Dec. 27, 2015, 11:32 p.m. OK PyPy 2 TESTS 47 1107 34508800 2300
15062870 lollollol D Dec. 27, 2015, 11:30 p.m. OK PyPy 3 TESTS 47 1996 32256000 2300
15052058 nwi D Dec. 27, 2015, 12:29 p.m. OK Python 2 TESTS 47 1341 37990400 2300
15062854 lollollol D Dec. 27, 2015, 11:26 p.m. OK Python 2 TESTS 47 1403 35942400 2300
24290663 SamuelLH D Jan. 31, 2017, 1:11 p.m. OK Python 3 TESTS 47 1606 41881600 2300
15062868 lollollol D Dec. 27, 2015, 11:30 p.m. OK Python 3 TESTS 47 1684 37068800 2300
15061766 limed D Dec. 27, 2015, 8:36 p.m. OK Scala TESTS 47 920 10547200 2300
15061497 limed D Dec. 27, 2015, 8:11 p.m. OK Scala TESTS 47 920 10547200 2300
15061739 limed D Dec. 27, 2015, 8:34 p.m. OK Scala TESTS 47 935 10547200 2300
15061920 limed D Dec. 27, 2015, 8:51 p.m. OK Scala TESTS 47 951 10547200 2300
15061702 limed D Dec. 27, 2015, 8:31 p.m. OK Scala TESTS 47 951 10547200 2300
15061519 limed D Dec. 27, 2015, 8:13 p.m. OK Scala TESTS 47 1028 10444800 2300
15061420 limed D Dec. 27, 2015, 8:02 p.m. OK Scala TESTS 47 1044 28262400 2300
15061441 limed D Dec. 27, 2015, 8:04 p.m. OK Scala TESTS 47 1045 22937600 2300

remove filters

Back to search problems