Codeforces Round 300

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
538 Codeforces Round 300 FINISHED False 9000 346341623 April 26, 2015, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 733 ) H Summer Dichotomy PROGRAMMING 2-sat data structures dfs and similar greedy 3100

T students applied into the ZPP class of Summer Irrelevant School. The organizing committee of the school may enroll any number of them, but at least t students must be enrolled. The enrolled students should be divided into two groups in any manner (it is possible that one of the groups will be empty!) During a shift the students from the ZPP grade are tutored by n teachers. Due to the nature of the educational process, each of the teachers should be assigned to exactly one of two groups (it is possible that no teacher will be assigned to some of the groups!). The i -th teacher is willing to work in a group as long as the group will have at least l i and at most r i students (otherwise it would be either too boring or too hard). Besides, some pairs of the teachers don't like each other other and therefore can not work in the same group; in total there are m pairs of conflicting teachers. You, as the head teacher of Summer Irrelevant School, have got a difficult task: to determine how many students to enroll in each of the groups and in which group each teacher will teach. The first line contains two space-separated integers, t and T ( 1 ≤ t ≤ T ≤ 10 9 ). The second line contains two space-separated integers n and m ( 1 ≤ n ≤ 10 5 , 0 ≤ m ≤ 10 5 ). The i -th of the next n lines contain integers l i and r i ( 0 ≤ l i ≤ r i ≤ 10 9 ). The next m lines describe the pairs of conflicting teachers. Each of these lines contain two space-separated integers — the indices of teachers in the pair. The teachers are indexed starting from one. It is guaranteed that no teacher has a conflict with himself and no pair of conflicting teachers occurs in the list more than once. If the distribution is possible, print in the first line a single word ' POSSIBLE ' (without the quotes). In the second line print two space-separated integers n 1 and n 2 — the number of students in the first and second group, correspondingly, the contstraint t ≤ n 1 + n 2 ≤ T should be met. In the thi

Tutorials

Codeforces Round #300 Editorial (+challenges)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11311685 vjudge4 H May 27, 2015, 2:36 a.m. OK FPC TESTS 53 233 3481600 3100
11311172 vjudge2 H May 27, 2015, 1:25 a.m. OK FPC TESTS 53 234 3481600 3100
13907060 130705009 H Oct. 28, 2015, 1:01 a.m. OK GNU C++ TESTS 53 62 6656000 3100
40986708 ReaLNero1 H July 30, 2018, 8:42 p.m. OK GNU C++ TESTS 53 77 6656000 3100
12085031 syc1999 H July 16, 2015, 2:22 p.m. OK GNU C++ TESTS 53 77 6656000 3100
27789052 jasonvictoryan H June 15, 2017, 8:02 a.m. OK GNU C++ TESTS 53 93 4096000 3100
27466970 Septher H May 31, 2017, 12:48 p.m. OK GNU C++ TESTS 53 93 4403200 3100
11311663 vjudge1 H May 27, 2015, 2:33 a.m. OK GNU C++ TESTS 53 108 5120000 3100
10924992 vfleaking H April 29, 2015, 4:47 a.m. OK GNU C++ TESTS 53 108 7168000 3100
11311672 vjudge2 H May 27, 2015, 2:34 a.m. OK GNU C++ TESTS 53 109 5120000 3100
11009812 Lagrang3 H May 6, 2015, 2:42 a.m. OK GNU C++ TESTS 53 124 6246400 3100
10969696 I_so_sad H May 2, 2015, 1:27 a.m. OK GNU C++ TESTS 53 124 7168000 3100
11908392 Remilia-Scarlet H July 3, 2015, 9:06 a.m. OK GNU C++11 TESTS 53 31 8396800 3100
65741662 luogu_bot3 H Nov. 26, 2019, 10:31 a.m. OK GNU C++11 TESTS 53 46 3584000 3100
65708936 JoaoFelix7 H Nov. 25, 2019, 1:37 p.m. OK GNU C++11 TESTS 53 46 3584000 3100
52601503 xgcxgc H April 11, 2019, 12:06 p.m. OK GNU C++11 TESTS 53 46 4812800 3100
63905045 AutumnKite H Oct. 31, 2019, 6:20 a.m. OK GNU C++11 TESTS 53 46 5120000 3100
68660318 Dilute H Jan. 12, 2020, 1:27 p.m. OK GNU C++11 TESTS 53 46 57958400 3100
69600156 vjudge4 H Jan. 27, 2020, 7:06 a.m. OK GNU C++11 TESTS 53 61 7577600 3100
65460302 WZYYN H Nov. 21, 2019, 1:17 a.m. OK GNU C++11 TESTS 53 62 3686400 3100
43445845 emoairx H Sept. 26, 2018, 11:21 a.m. OK GNU C++11 TESTS 53 62 4812800 3100
43445814 emoairx H Sept. 26, 2018, 11:20 a.m. OK GNU C++11 TESTS 53 62 4812800 3100
64731498 Created_equal H Nov. 12, 2019, 8:37 a.m. OK GNU C++14 TESTS 53 46 8601600 3100
69838134 iotang H Jan. 30, 2020, 12:25 p.m. OK GNU C++14 TESTS 53 46 10547200 3100
65311440 yhx-12243 H Nov. 18, 2019, 3:28 p.m. OK GNU C++14 TESTS 53 109 3584000 3100
63121595 zsyzsy H Oct. 22, 2019, 11:27 a.m. OK GNU C++14 TESTS 53 109 5222400 3100
68013794 rushcheyo H Dec. 31, 2019, 5:16 p.m. OK GNU C++14 TESTS 53 124 2662400 3100
26223528 renegade_warrior H April 8, 2017, 4:53 p.m. OK GNU C++14 TESTS 53 124 7270400 3100
64436661 Cyanic H Nov. 7, 2019, 1:48 a.m. OK GNU C++14 TESTS 53 124 7680000 3100
65508110 nqiiii H Nov. 22, 2019, 1:10 a.m. OK GNU C++14 TESTS 53 124 10547200 3100
38601475 _ChenKerui H May 25, 2018, 5:55 a.m. OK GNU C++14 TESTS 53 124 12902400 3100
68470301 liuxiao H Jan. 10, 2020, 12:51 a.m. OK GNU C++14 TESTS 53 139 5222400 3100
69838174 vjudge3 H Jan. 30, 2020, 12:25 p.m. OK GNU C++17 TESTS 53 31 10444800 3100
69943132 yuhaw H Feb. 1, 2020, 6:46 a.m. OK GNU C++17 TESTS 53 139 7680000 3100
52558859 Rose_max H April 10, 2019, 9:14 a.m. OK GNU C++17 TESTS 53 171 4812800 3100
66270404 Fulisike H Dec. 4, 2019, 12:06 p.m. OK GNU C++17 TESTS 53 171 8089600 3100
64038056 Jatana H Nov. 1, 2019, 5:06 p.m. OK GNU C++17 TESTS 53 171 19353600 3100
64038014 Jatana H Nov. 1, 2019, 5:05 p.m. OK GNU C++17 TESTS 53 186 19353600 3100
68573361 HirasawaaYui H Jan. 11, 2020, 3:41 a.m. OK GNU C++17 TESTS 53 186 75161600 3100
68380617 zbww H Jan. 8, 2020, 12:31 a.m. OK GNU C++17 TESTS 53 202 28160000 3100
68592031 xz153531 H Jan. 11, 2020, 12:56 p.m. OK GNU C++17 TESTS 53 280 45875200 3100
68660653 xz153531 H Jan. 12, 2020, 1:32 p.m. OK GNU C++17 TESTS 53 327 53760000 3100
10909441 cat1860 H April 27, 2015, 1:33 p.m. OK Java 8 TESTS 53 342 45363200 3100
10914155 damHuman H April 27, 2015, 11:21 p.m. OK Java 8 TESTS 53 951 79052800 3100
11117396 Al.Cash H May 16, 2015, 1:20 p.m. OK MS C++ TESTS 53 280 23142400 3100
10977961 mikhail.safin H May 2, 2015, 8:20 p.m. OK MS C++ TESTS 53 499 18022400 3100

remove filters

Back to search problems