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

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2298 ) A Points and Segments (easy) PROGRAMMING constructive algorithms sortings 1600

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 points and m segments on the OX axis. He can draw each point with either red or blue. The drawing is good if and only if the following requirement is met: for each segment [li, xe2 x80 x89ri] consider all the red points belong to it (ri points), and all the blue points belong to it (bi points); each segment i should satisfy the inequality |ri xe2 x80 x89- xe2 x80 x89bi| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891. Iahub thinks that point x belongs to segment [l, xe2 x80 x89r], if inequality l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r holds. Iahub gives to you all coordinates of points and segments. Please, help him to find any good drawing. The first line of input contains two integers: n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). The next line contains n space-separated integers x1, xe2 x80 x89x2, xe2 x80 x89..., xe2 x80 x89xn (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the coordinates of the points. The following m lines contain the descriptions of the m segments. Each line 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 x89100) -- the borders of the i-th segment. It's guaranteed that all the points 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 point (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
10749034 izuru A April 17, 2015, 8:28 a.m. OK D TESTS 12 15 0 1600
6589100 boo A May 11, 2014, 3:57 p.m. OK Delphi TESTS 12 15 0 1600
6590325 Casio A May 11, 2014, 4:11 p.m. OK Delphi TESTS 12 15 102400 1600
6588303 Al2K A May 11, 2014, 3:48 p.m. OK Delphi TESTS 12 15 102400 1600
6598143 ruban A May 11, 2014, 6:28 p.m. OK Delphi TESTS 12 31 48128000 1600
6601482 Hellyscythe A May 12, 2014, 4:59 a.m. OK FPC TESTS 12 0 0 1600
6590453 ladpro98 A May 11, 2014, 4:12 p.m. OK FPC TESTS 12 0 0 1600
12275250 VAVAvile A July 30, 2015, 12:41 p.m. OK FPC TESTS 12 15 0 1600
7187704 giabao4498 A July 20, 2014, 3:41 p.m. OK FPC TESTS 12 15 0 1600
6666274 I_love_Varechka A May 21, 2014, 9:55 a.m. OK FPC TESTS 12 15 0 1600
6639947 I_Love_EEvilCatt A May 17, 2014, 3:39 a.m. OK FPC TESTS 12 15 0 1600
6615573 BinBin123 A May 14, 2014, 1:53 p.m. OK FPC TESTS 12 15 0 1600
6601466 caozy623 A May 12, 2014, 4:55 a.m. OK FPC TESTS 12 15 0 1600
6600817 graceoflives A May 12, 2014, 2:15 a.m. OK FPC TESTS 12 15 0 1600
6598490 daksenik A May 11, 2014, 6:43 p.m. OK FPC TESTS 12 15 0 1600
6593509 gnaw A May 11, 2014, 4:49 p.m. OK GNU C TESTS 12 0 0 1600
7450723 vasu_didi A Aug. 15, 2014, 7:14 a.m. OK GNU C TESTS 12 15 0 1600
7441472 abhiruchi16 A Aug. 13, 2014, 10:23 a.m. OK GNU C TESTS 12 15 0 1600
7059559 120302508 A July 10, 2014, 3:09 p.m. OK GNU C TESTS 12 15 0 1600
6991350 luyanliang A July 1, 2014, 11:03 a.m. OK GNU C TESTS 12 15 0 1600
6661890 yash.15296 A May 20, 2014, 10:55 a.m. OK GNU C TESTS 12 15 0 1600
6661816 yash.15296 A May 20, 2014, 10:26 a.m. OK GNU C TESTS 12 15 0 1600
6618282 vikramsundar A May 15, 2014, 3:13 a.m. OK GNU C TESTS 12 15 0 1600
6604547 dishant_singh A May 12, 2014, 3:06 p.m. OK GNU C TESTS 12 15 0 1600
6602223 Tried A May 12, 2014, 7:58 a.m. OK GNU C TESTS 12 15 0 1600
9877969 bagpipe A Feb. 17, 2015, 3 a.m. OK GNU C++ TESTS 12 0 0 1600
7284321 happy_lcj A July 29, 2014, 10:59 a.m. OK GNU C++ TESTS 12 0 0 1600
6687723 kymo A May 23, 2014, 1:53 p.m. OK GNU C++ TESTS 12 0 0 1600
6634430 V1_Forces7Y7 A May 16, 2014, 5:08 a.m. OK GNU C++ TESTS 12 0 0 1600
40917213 vjudge4 A July 29, 2018, 12:27 p.m. OK GNU C++ TESTS 12 15 0 1600
39689280 yan_matheus A June 27, 2018, 2:35 a.m. OK GNU C++ TESTS 12 15 0 1600
39634556 Xzavie A June 25, 2018, 12:16 a.m. OK GNU C++ TESTS 12 15 0 1600
32544824 vjudge3 A Nov. 22, 2017, 8:47 a.m. OK GNU C++ TESTS 12 15 0 1600
32542943 vjudge2 A Nov. 22, 2017, 7:35 a.m. OK GNU C++ TESTS 12 15 0 1600
32284459 vjudge3 A Nov. 13, 2017, 12:53 p.m. OK GNU C++ TESTS 12 15 0 1600
10341370 randomusername A March 18, 2015, 6:02 p.m. OK GNU C++0x TESTS 12 15 0 1600
10311260 RHCP A March 17, 2015, 2:20 p.m. OK GNU C++0x TESTS 12 15 0 1600
10264107 T0RRES A March 13, 2015, 11:54 p.m. OK GNU C++0x TESTS 12 15 0 1600
9965971 ErzhaNN A Feb. 23, 2015, 6:22 a.m. OK GNU C++0x TESTS 12 15 0 1600
9872546 nitinj A Feb. 16, 2015, 3:04 p.m. OK GNU C++0x TESTS 12 15 0 1600
9869640 Rainto96 A Feb. 16, 2015, 10:08 a.m. OK GNU C++0x TESTS 12 15 0 1600
9824971 Manny A Feb. 14, 2015, 10:53 a.m. OK GNU C++0x TESTS 12 15 0 1600
9778285 Lamtung99 A Feb. 9, 2015, 9:05 a.m. OK GNU C++0x TESTS 12 15 0 1600
9778183 What_is_life A Feb. 9, 2015, 8:49 a.m. OK GNU C++0x TESTS 12 15 0 1600
9777884 M-i-s-t-a-k-e A Feb. 9, 2015, 8:04 a.m. OK GNU C++0x TESTS 12 15 0 1600
15773692 .tx A Feb. 3, 2016, 4:49 p.m. OK GNU C++11 TESTS 12 0 0 1600
69878830 maomaoyu804 A Jan. 31, 2020, 5:28 a.m. OK GNU C++11 TESTS 12 15 0 1600
69556883 vjudge3 A Jan. 26, 2020, 9:10 a.m. OK GNU C++11 TESTS 12 15 0 1600
57819543 py_ultron A July 26, 2019, 9:57 p.m. OK GNU C++11 TESTS 12 15 0 1600
57787522 vjudge3 A July 26, 2019, 8:20 a.m. OK GNU C++11 TESTS 12 15 0 1600
54502221 WOSHIGEPACHONG2 A May 22, 2019, 9:56 p.m. OK GNU C++11 TESTS 12 15 0 1600
54055814 HALoop A May 13, 2019, 8:09 a.m. OK GNU C++11 TESTS 12 15 0 1600
49324481 yefrigg A Feb. 1, 2019, 1:34 p.m. OK GNU C++11 TESTS 12 15 0 1600
42609886 sakib_muhit A Sept. 7, 2018, 10:20 a.m. OK GNU C++11 TESTS 12 15 0 1600
42286797 vjudge5 A Aug. 30, 2018, 5:44 p.m. OK GNU C++11 TESTS 12 15 0 1600
52639404 Un.CD A April 12, 2019, 11:49 a.m. OK GNU C++14 TESTS 12 15 0 1600
51928283 hazardousbro A March 28, 2019, 8:56 a.m. OK GNU C++14 TESTS 12 15 0 1600
41760555 vjudge3 A Aug. 18, 2018, 2:21 p.m. OK GNU C++14 TESTS 12 15 0 1600
41657002 vjudge5 A Aug. 16, 2018, 3:19 p.m. OK GNU C++14 TESTS 12 15 0 1600
40916313 Sohrabi_Alir A July 29, 2018, 11:58 a.m. OK GNU C++14 TESTS 12 15 0 1600
40647459 testing_code A July 22, 2018, 5:27 p.m. OK GNU C++14 TESTS 12 15 0 1600
31847081 amirala2013 A Oct. 28, 2017, 6 p.m. OK GNU C++14 TESTS 12 15 0 1600
31840960 Bmz8880 A Oct. 28, 2017, 2:25 p.m. OK GNU C++14 TESTS 12 15 0 1600
31840790 amir-kh A Oct. 28, 2017, 2:21 p.m. OK GNU C++14 TESTS 12 15 0 1600
31839498 ArshiaDadras A Oct. 28, 2017, 1:43 p.m. OK GNU C++14 TESTS 12 15 0 1600
69049166 Gorokhov_Gleb A Jan. 18, 2020, 12:03 p.m. OK GNU C++17 TESTS 12 15 0 1600
68431337 Kiank1e A Jan. 9, 2020, 6:59 a.m. OK GNU C++17 TESTS 12 15 0 1600
68428370 DreamNoMore A Jan. 9, 2020, 5:24 a.m. OK GNU C++17 TESTS 12 15 0 1600
66215637 vjudge3 A Dec. 3, 2019, 8:47 a.m. OK GNU C++17 TESTS 12 15 0 1600
58235317 spaesk A Aug. 3, 2019, 7:08 p.m. OK GNU C++17 TESTS 12 15 0 1600
56553273 F.R.O.S.T A July 5, 2019, 11:03 a.m. OK GNU C++17 TESTS 12 15 0 1600
52564952 vjudge5 A April 10, 2019, 12:05 p.m. OK GNU C++17 TESTS 12 15 0 1600
41656283 vjudge2 A Aug. 16, 2018, 2:50 p.m. OK GNU C++17 TESTS 12 15 0 1600
41634088 dmkozyrev A Aug. 15, 2018, 8:58 p.m. OK GNU C++17 TESTS 12 15 0 1600
40882682 vjudge1 A July 28, 2018, 11:26 a.m. OK GNU C++17 TESTS 12 15 0 1600
6611756 OutSide A May 13, 2014, 7:49 p.m. OK Go TESTS 12 15 0 1600
6608198 _the_george_ A May 13, 2014, 7:03 a.m. OK Go TESTS 12 15 0 1600
7051331 betaveros A July 9, 2014, 7:07 a.m. OK Haskell TESTS 12 15 0 1600
6613137 haruki57 A May 14, 2014, 6:12 a.m. OK Java 6 TESTS 12 62 0 1600
6592488 maradonah A May 11, 2014, 4:36 p.m. OK Java 6 TESTS 12 62 0 1600
8325062 xiaowuc1 A Oct. 20, 2014, 1:33 a.m. OK Java 6 TESTS 12 77 0 1600
7298917 khoahoc1024 A July 31, 2014, 10:53 a.m. OK Java 6 TESTS 12 77 0 1600
6730597 shashank201101193 A May 28, 2014, 9:11 p.m. OK Java 6 TESTS 12 77 0 1600
6618249 alibaba A May 15, 2014, 3:02 a.m. OK Java 6 TESTS 12 77 0 1600
6612732 nickbuelich A May 14, 2014, 3:40 a.m. OK Java 6 TESTS 12 77 0 1600
6592326 DooIt A May 11, 2014, 4:34 p.m. OK Java 6 TESTS 12 77 0 1600
6590901 Nil_ct A May 11, 2014, 4:17 p.m. OK Java 6 TESTS 12 77 0 1600
7301177 TranCongDuy A July 31, 2014, 4:48 p.m. OK Java 6 TESTS 12 78 0 1600
6591108 bluepichu A May 11, 2014, 4:19 p.m. OK Java 7 TESTS 12 61 0 1600
7300479 nguyenmanhphuc A July 31, 2014, 2:40 p.m. OK Java 7 TESTS 12 62 0 1600
6728605 urvashi A May 28, 2014, 12:51 p.m. OK Java 7 TESTS 12 62 0 1600
6712842 marcelodata A May 26, 2014, 2:18 a.m. OK Java 7 TESTS 12 62 0 1600
6618675 sifatoooo A May 15, 2014, 5:44 a.m. OK Java 7 TESTS 12 62 0 1600
6600544 alexey.kasatkin A May 12, 2014, 12:45 a.m. OK Java 7 TESTS 12 62 0 1600
6600540 1e9 A May 12, 2014, 12:44 a.m. OK Java 7 TESTS 12 62 0 1600
6598420 wadissimo A May 11, 2014, 6:40 p.m. OK Java 7 TESTS 12 62 0 1600
6593661 dwoolley3 A May 11, 2014, 4:51 p.m. OK Java 7 TESTS 12 62 0 1600
6591768 hidayat A May 11, 2014, 4:27 p.m. OK Java 7 TESTS 12 62 0 1600
27556112 Carson A June 4, 2017, 5:32 a.m. OK Java 8 TESTS 12 93 0 1600
25577840 VerticesEdge A March 17, 2017, 4:20 p.m. OK Java 8 TESTS 12 93 20172800 1600
68411170 adarsh000321 A Jan. 8, 2020, 5:03 p.m. OK Java 8 TESTS 12 109 0 1600
12391612 sweiss A Aug. 6, 2015, 4:29 p.m. OK Java 8 TESTS 12 109 0 1600
12037222 akshay_miterani A July 14, 2015, 6:27 a.m. OK Java 8 TESTS 12 109 0 1600
10126849 essar A March 2, 2015, 11:48 p.m. OK Java 8 TESTS 12 109 0 1600
40676021 ashubeckham A July 23, 2018, 3:31 p.m. OK Java 8 TESTS 12 124 0 1600
22034496 OmarRadwan A Nov. 4, 2016, 12:50 p.m. OK Java 8 TESTS 12 124 0 1600
15150375 safarisoul A Jan. 1, 2016, 4:45 p.m. OK Java 8 TESTS 12 124 0 1600
12702741 Abkreno94 A Aug. 26, 2015, 2:22 a.m. OK Java 8 TESTS 12 124 0 1600
6590508 Eeyore A May 11, 2014, 4:13 p.m. OK JavaScript TESTS 12 15 102400 1600
25556476 ML3968 A March 16, 2017, 5:28 p.m. OK JavaScript TESTS 12 30 6144000 1600
10725419 redbell014 A April 15, 2015, 1:38 a.m. OK JavaScript TESTS 12 31 102400 1600
6589566 goldie A May 11, 2014, 4:02 p.m. OK MS C# TESTS 12 46 0 1600
10993541 T-D-K A May 4, 2015, 8:03 a.m. OK MS C# TESTS 12 46 204800 1600
6589175 og.kostya A May 11, 2014, 3:58 p.m. OK MS C# TESTS 12 46 204800 1600
6602446 dev8546 A May 12, 2014, 8:50 a.m. OK MS C# TESTS 12 46 2150400 1600
6603601 Silithus A May 12, 2014, 1:20 p.m. OK MS C# TESTS 12 61 409600 1600
6588702 HamsterWool A May 11, 2014, 3:53 p.m. OK MS C# TESTS 12 61 2150400 1600
6593924 Loremaster A May 11, 2014, 4:54 p.m. OK MS C# TESTS 12 62 102400 1600
8178742 LLT A Oct. 12, 2014, 12:08 a.m. OK MS C# TESTS 12 62 2150400 1600
6602491 dev8546 A May 12, 2014, 9:01 a.m. OK MS C# TESTS 12 62 2150400 1600
6602467 dev8546 A May 12, 2014, 8:55 a.m. OK MS C# TESTS 12 62 2150400 1600
6602040 peaceful A May 12, 2014, 7:14 a.m. OK MS C++ TESTS 12 0 0 1600
22470120 mostafa_9a7c2 A Nov. 24, 2016, 3:21 p.m. OK MS C++ TESTS 12 15 0 1600
10690444 Lingsong A April 13, 2015, 6:43 a.m. OK MS C++ TESTS 12 15 0 1600
10600307 Samsam A April 5, 2015, 10:53 a.m. OK MS C++ TESTS 12 15 0 1600
10600255 OmarHashim A April 5, 2015, 10:47 a.m. OK MS C++ TESTS 12 15 0 1600
8897131 Sehnsucht A Nov. 30, 2014, 10:18 a.m. OK MS C++ TESTS 12 15 0 1600
8897125 Sehnsucht A Nov. 30, 2014, 10:17 a.m. OK MS C++ TESTS 12 15 0 1600
8554309 Dadaxon A Nov. 5, 2014, 6:02 a.m. OK MS C++ TESTS 12 15 0 1600
8445026 Aidos A Oct. 28, 2014, 12:13 a.m. OK MS C++ TESTS 12 15 0 1600
8036121 Kmcode A Sept. 30, 2014, 12:43 p.m. OK MS C++ TESTS 12 15 0 1600
6588694 BC_ A May 11, 2014, 3:52 p.m. OK Ocaml TESTS 12 15 0 1600
6639636 jackhftang A May 17, 2014, 2:03 a.m. OK Ocaml TESTS 12 30 0 1600
14489847 mayakin A Nov. 26, 2015, 8:41 a.m. OK PHP TESTS 12 31 0 1600
6600272 Dixtosa A May 11, 2014, 11:07 p.m. OK Python 2 TESTS 12 31 0 1600
14488554 vjudge5 A Nov. 26, 2015, 6:45 a.m. OK Python 2 TESTS 12 46 0 1600
6991136 Candyman A July 1, 2014, 10:15 a.m. OK Python 2 TESTS 12 46 0 1600
6771346 nicovaras22 A June 1, 2014, 2:21 p.m. OK Python 2 TESTS 12 46 0 1600
6759243 squiggly_lines A May 31, 2014, 10:54 p.m. OK Python 2 TESTS 12 46 0 1600
6723891 chunwei A May 27, 2014, 10:31 p.m. OK Python 2 TESTS 12 46 0 1600
6660808 wito.chandra A May 20, 2014, 5:37 a.m. OK Python 2 TESTS 12 46 0 1600
6659859 sfelixjr A May 19, 2014, 9:13 p.m. OK Python 2 TESTS 12 46 0 1600
6658617 abc_1988_1106 A May 19, 2014, 4:12 p.m. OK Python 2 TESTS 12 46 0 1600
6614511 Luxo A May 14, 2014, 11:09 a.m. OK Python 2 TESTS 12 46 0 1600
9383025 merolish A Jan. 7, 2015, 11:15 p.m. OK Python 3 TESTS 12 46 0 1600
7699818 dpark3542 A Sept. 7, 2014, 12:36 p.m. OK Python 3 TESTS 12 46 0 1600
15914387 not_bot_but_POT A Feb. 9, 2016, 1:44 p.m. OK Python 3 TESTS 12 61 0 1600
10409824 imprtant A March 23, 2015, 12:10 p.m. OK Python 3 TESTS 12 61 0 1600
6600191 Dixtosa A May 11, 2014, 10:40 p.m. OK Python 3 TESTS 12 61 0 1600
7698241 minimario A Sept. 7, 2014, 4:04 a.m. OK Python 3 TESTS 12 62 0 1600
7063348 Shiz0 A July 11, 2014, 11:21 a.m. OK Python 3 TESTS 12 62 0 1600
6730535 ddr2 A May 28, 2014, 8:38 p.m. OK Python 3 TESTS 12 62 0 1600
6621179 yugle7 A May 15, 2014, 1:41 p.m. OK Python 3 TESTS 12 62 0 1600
6612737 m1_k3 A May 14, 2014, 3:41 a.m. OK Python 3 TESTS 12 62 0 1600

remove filters

Back to search problems