Codeforces Round 245 (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
429 Codeforces Round 245 (Div. 1) FINISHED False 7200 332000399 May 11, 2014, 3:40 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 890 ) E Points and Segments PROGRAMMING graphs 2900

B"Iahub isn't well prepared on geometry problems, but he heard that this year there will be a lot of geometry problems on the IOI selection camp. Scared, Iahub locked himself in the basement and started thinking of new problems of this kind. One of them is the following. Iahub wants to draw n distinct segments [li, xe2 x80 x89ri] on the OX axis. He can draw each segment with either red or blue. The drawing is good if and only if the following requirement is met: for each point x of the OX axis consider all the segments that contains point x; suppose, that rx red segments and bx blue segments contain point x; for each point x inequality |rx xe2 x80 x89- xe2 x80 x89bx| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891 must be satisfied. A segment [l, xe2 x80 x89r] contains a point x if and only if l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r. Iahub gives you the starting and ending points of all the segments. You have to find any good drawing for him. The first line of input contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of segments. The i-th of the next n lines contains two integers li and ri (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the borders of the i-th segment. It's guaranteed that all the segments are distinct. If there is no good drawing for a given test, output a single integer -1. Otherwise output n integers; each integer must be 0 or 1. The i-th number denotes the color of the i-th segment (0 is red and 1 is blue). If there are multiple good drawings you can output any of them."...

Tutorials

Codeforces Round #245 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11245437 louisja1 E May 24, 2015, 3:34 a.m. OK FPC TESTS 16 233 10547200 2900
11245431 vjudge2 E May 24, 2015, 3:33 a.m. OK FPC TESTS 16 233 10547200 2900
11254715 vjudge5 E May 24, 2015, 1:21 p.m. OK FPC TESTS 16 249 19763200 2900
11245257 yubaby E May 24, 2015, 3 a.m. OK FPC TESTS 16 264 19968000 2900
11245259 vjudge2 E May 24, 2015, 3:01 a.m. OK FPC TESTS 16 265 19968000 2900
6796915 Wasun E June 4, 2014, 12:57 p.m. OK FPC TESTS 16 280 20172800 2900
14002205 130705009 E Nov. 1, 2015, 7:23 a.m. OK GNU C++ TESTS 16 62 6553600 2900
35871574 ______u______ E March 3, 2018, 6:52 a.m. OK GNU C++ TESTS 16 62 8601600 2900
35871331 ______n______ E March 3, 2018, 6:46 a.m. OK GNU C++ TESTS 16 62 8601600 2900
35870743 _____i_____ E March 3, 2018, 6:34 a.m. OK GNU C++ TESTS 16 62 8601600 2900
35870740 _____k_____ E March 3, 2018, 6:34 a.m. OK GNU C++ TESTS 16 62 8601600 2900
35861999 ______k______ E March 2, 2018, 10:15 p.m. OK GNU C++ TESTS 16 62 8601600 2900
35861981 ______h______ E March 2, 2018, 10:15 p.m. OK GNU C++ TESTS 16 62 8601600 2900
35861484 ______i______ E March 2, 2018, 10:04 p.m. OK GNU C++ TESTS 16 62 8601600 2900
35859985 ______M______ E March 2, 2018, 9:32 p.m. OK GNU C++ TESTS 16 62 8601600 2900
36468723 R_rank_Pyramid E March 22, 2018, 4:24 a.m. OK GNU C++ TESTS 16 77 9728000 2900
6652557 hos.lyric E May 18, 2014, 6:04 p.m. OK GNU C++0x TESTS 16 93 13619200 2900
6590927 Jacob E May 11, 2014, 4:17 p.m. OK GNU C++0x TESTS 16 124 12390400 2900
6610348 MinakoKojima E May 13, 2014, 2:13 p.m. OK GNU C++0x TESTS 16 124 12902400 2900
7156563 sspa E July 19, 2014, 10:49 a.m. OK GNU C++0x TESTS 16 124 15257600 2900
8768963 toi333 E Nov. 20, 2014, 9:41 p.m. OK GNU C++0x TESTS 16 124 18329600 2900
8768780 toi333 E Nov. 20, 2014, 9:24 p.m. OK GNU C++0x TESTS 16 124 22118400 2900
8768755 toi333 E Nov. 20, 2014, 9:18 p.m. OK GNU C++0x TESTS 16 124 22630400 2900
6716043 rares.buhai E May 26, 2014, 2:10 p.m. OK GNU C++0x TESTS 16 139 13107200 2900
6715902 gagaga5-gagaga E May 26, 2014, 1:47 p.m. OK GNU C++0x TESTS 16 140 13209600 2900
6607397 edward_mj E May 13, 2014, 3:28 a.m. OK GNU C++0x TESTS 16 140 15257600 2900
18990390 ntu_vjudge_2 E July 9, 2016, 6:29 p.m. OK GNU C++11 TESTS 16 62 3584000 2900
40988684 ReaLNero1 E July 30, 2018, 10:16 p.m. OK GNU C++11 TESTS 16 77 3584000 2900
17146368 freebsdx E April 3, 2016, 2:19 p.m. OK GNU C++11 TESTS 16 77 8601600 2900
61988221 SSL_XJQ E Oct. 6, 2019, 2:15 p.m. OK GNU C++11 TESTS 16 77 11776000 2900
13805139 ntu_vjudge_2 E Oct. 23, 2015, 8:48 a.m. OK GNU C++11 TESTS 16 78 2867200 2900
57890363 lopare E July 28, 2019, 11:36 a.m. OK GNU C++11 TESTS 16 78 6553600 2900
57819545 py_ultron E July 26, 2019, 9:58 p.m. OK GNU C++11 TESTS 16 78 6553600 2900
55913622 Logey E June 22, 2019, 4:03 a.m. OK GNU C++11 TESTS 16 78 10649600 2900
59346777 luogu_bot2 E Aug. 23, 2019, 10:02 a.m. OK GNU C++11 TESTS 16 78 11776000 2900
59345922 luogu_bot1 E Aug. 23, 2019, 9:40 a.m. OK GNU C++11 TESTS 16 78 11776000 2900
50781829 luogu_bot1 E March 4, 2019, 11:44 a.m. OK GNU C++14 TESTS 16 78 54681600 2900
69836230 iotang E Jan. 30, 2020, 11:53 a.m. OK GNU C++14 TESTS 16 93 27648000 2900
59340392 lzoiexplorer2004 E Aug. 23, 2019, 7:15 a.m. OK GNU C++14 TESTS 16 109 47206400 2900
50739495 StupidTurtle E March 3, 2019, 2:37 p.m. OK GNU C++14 TESTS 16 124 18329600 2900
38011023 Whitesola E May 8, 2018, 4:06 a.m. OK GNU C++14 TESTS 16 124 65843200 2900
56641569 Scut82 E July 7, 2019, 2:17 a.m. OK GNU C++14 TESTS 16 139 12902400 2900
69455778 vjudge1 E Jan. 24, 2020, 8:34 a.m. OK GNU C++14 TESTS 16 139 26828800 2900
44061762 iaojnh E Oct. 10, 2018, 6:24 a.m. OK GNU C++14 TESTS 16 139 46182400 2900
56729926 Scut82 E July 9, 2019, midnight OK GNU C++14 TESTS 16 140 7372800 2900
25707734 Ice_Cream E March 22, 2017, 9:49 a.m. OK GNU C++14 TESTS 16 140 18124800 2900
69836282 vjudge4 E Jan. 30, 2020, 11:54 a.m. OK GNU C++17 TESTS 16 109 27648000 2900
64433824 ivan100sic E Nov. 6, 2019, 11:33 p.m. OK GNU C++17 TESTS 16 124 14028800 2900
69677245 hjk1030 E Jan. 28, 2020, 2:36 p.m. OK GNU C++17 TESTS 16 124 19148800 2900
58422812 ruo E Aug. 7, 2019, 8:28 a.m. OK GNU C++17 TESTS 16 139 13721600 2900
61909675 vjudge5 E Oct. 5, 2019, 10:36 a.m. OK GNU C++17 TESTS 16 140 62771200 2900
61909640 AlexPanda E Oct. 5, 2019, 10:36 a.m. OK GNU C++17 TESTS 16 140 62771200 2900
58480127 liaoranrio E Aug. 9, 2019, 5:06 a.m. OK GNU C++17 TESTS 16 155 14745600 2900
62118573 luogu_bot1 E Oct. 8, 2019, 2:01 p.m. OK GNU C++17 TESTS 16 155 62771200 2900
39514455 q234rty E June 22, 2018, 11:12 a.m. OK GNU C++17 TESTS 16 156 27443200 2900
39508841 q234rty E June 22, 2018, 7:42 a.m. OK GNU C++17 TESTS 16 156 27443200 2900
6590436 Lewin E May 11, 2014, 4:12 p.m. OK Java 7 TESTS 16 186 102400 2900
6612270 lamnguyenrs E May 14, 2014, 12:46 a.m. OK Java 7 TESTS 16 202 204800 2900
6754162 Di735 E May 31, 2014, 2:28 a.m. OK Java 7 TESTS 16 373 3072000 2900
14183799 Sumeet.Varma E Nov. 10, 2015, 12:11 p.m. OK Java 8 TESTS 16 404 12697600 2900
14183752 Sumeet.Varma E Nov. 10, 2015, 12:07 p.m. OK Java 8 TESTS 16 436 12697600 2900
7010984 IgorKoval E July 4, 2014, 2:12 p.m. OK Java 8 TESTS 16 857 6553600 2900
7010950 IgorKoval E July 4, 2014, 2:07 p.m. OK Java 8 TESTS 16 904 6656000 2900
6606362 Rivx E May 12, 2014, 8:26 p.m. OK MS C++ TESTS 16 78 5017600 2900
6620193 robots.txt E May 15, 2014, 10:55 a.m. OK MS C++ TESTS 16 78 5836800 2900
25089430 DEGwer E Feb. 27, 2017, 10:21 p.m. OK MS C++ TESTS 16 78 9318400 2900
6614229 blueseen E May 14, 2014, 10:12 a.m. OK MS C++ TESTS 16 109 5734400 2900
6595809 SergeyRogulenko E May 11, 2014, 5:22 p.m. OK MS C++ TESTS 16 171 15257600 2900
6729350 Darooha E May 28, 2014, 3:22 p.m. OK Ocaml TESTS 16 390 21708800 2900

remove filters

Back to search problems