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 |
|---|---|---|---|---|---|---|
| 793 | Tinkoff Challenge - Elimination Round | FINISHED | False | 7200 | 283439723 | April 23, 2017, 4:45 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 451 ) | G | Oleg and chess | PROGRAMMING | data structures divide and conquer flows graph matchings | 3100 |
Oleg the bank client solves an interesting chess problem: place on n × n chessboard the maximum number of rooks so that they don't beat each other. Of course, no two rooks can share the same cell. Remind that a rook standing in the cell ( a , b ) beats a rook standing in the cell ( x , y ) if and only if a = x or b = y . Unfortunately (of fortunately?) for Oleg the answer in this problem was always n , so the task bored Oleg soon. He decided to make it more difficult by removing some cells from the board. If a cell is deleted, Oleg can't put a rook there, but rooks do beat each other "through" deleted cells. Oleg deletes the cells in groups, namely, he repeatedly choose a rectangle with sides parallel to the board sides and deletes all the cells inside the rectangle. Formally, if he chooses a rectangle, lower left cell of which has coordinates ( x 1 , y 1 ) , and upper right cell of which has coordinates ( x 2 , y 2 ) , then he deletes all such cells with coordinates ( x , y ) that x 1 ≤ x ≤ x 2 and y 1 ≤ y ≤ y 2 . It is guaranteed that no cell is deleted twice, i.e. the chosen rectangles do not intersect. This version of the problem Oleg can't solve, and his friend Igor is busy at a conference, so he can't help Oleg. You are the last hope for Oleg! Help him: given the size of the board and the deleted rectangles find the maximum possible number of rooks that could be placed on the board so that no two rooks beat each other. The first line contains single integer n ( 1 ≤ n ≤ 10000 ) — the size of the board. The second line contains single integer q ( 0 ≤ q ≤ 10000 ) — the number of deleted rectangles. The next q lines contain the information about the deleted rectangles. Each of these lines contains four integers x 1 , y 1 , x 2 and y 2 ( 1 ≤ x 1 ≤ x 2 ≤ n , 1 ≤ y 1 ≤ y 2 ≤ n ) — the coordinates of the lower left and the upper right cells of a deleted rectangle. If is guaranteed that the rectangles do not intersect. In the only line print the maximum numbe |
| 51685 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 33157821 | vjudge1 | G | Dec. 12, 2017, 2:31 p.m. | OK | GNU C++ | TESTS | 145 | 280 | 70451200 | 3100 | |
| 31465254 | sshockwave | G | Oct. 17, 2017, 11:39 p.m. | OK | GNU C++ | TESTS | 145 | 499 | 49356800 | 3100 | |
| 33482340 | wh2001_ZY | G | Dec. 21, 2017, 2:08 p.m. | OK | GNU C++ | TESTS | 145 | 514 | 86528000 | 3100 | |
| 31466895 | y20070316 | G | Oct. 18, 2017, 2:42 a.m. | OK | GNU C++ | TESTS | 145 | 561 | 41369600 | 3100 | |
| 27354404 | AkaneSasu | G | May 26, 2017, 11:15 a.m. | OK | GNU C++ | TESTS | 145 | 608 | 30208000 | 3100 | |
| 26697093 | jasonvictoryan | G | April 27, 2017, 6:36 a.m. | OK | GNU C++ | TESTS | 145 | 919 | 65126400 | 3100 | |
| 26627749 | C_SUNSHINE | G | April 23, 2017, 8:37 p.m. | OK | GNU C++ | TESTS | 145 | 1185 | 40960000 | 3100 | |
| 33242483 | Created_equal | G | Dec. 14, 2017, 2:25 p.m. | OK | GNU C++ | TESTS | 145 | 1185 | 86220800 | 3100 | |
| 28818981 | DCXDCX | G | July 24, 2017, 8:24 a.m. | OK | GNU C++ | TESTS | 145 | 1621 | 43417600 | 3100 | |
| 31383941 | vjudge1 | G | Oct. 16, 2017, 7:02 a.m. | OK | GNU C++ | TESTS | 145 | 1731 | 46080000 | 3100 | |
| 62040716 | zxyoi | G | Oct. 7, 2019, 5:51 a.m. | OK | GNU C++11 | TESTS | 145 | 108 | 62156800 | 3100 | |
| 59896666 | mlby | G | Sept. 2, 2019, 12:21 p.m. | OK | GNU C++11 | TESTS | 145 | 171 | 18227200 | 3100 | |
| 26718772 | vjudge1 | G | April 28, 2017, 12:18 p.m. | OK | GNU C++11 | TESTS | 145 | 264 | 98099200 | 3100 | |
| 26640593 | eddy1021 | G | April 24, 2017, 12:44 p.m. | OK | GNU C++11 | TESTS | 145 | 264 | 98201600 | 3100 | |
| 26630579 | King_George | G | April 23, 2017, 11:55 p.m. | OK | GNU C++11 | TESTS | 145 | 358 | 17510400 | 3100 | |
| 33155759 | NOIRP | G | Dec. 12, 2017, 1:11 p.m. | OK | GNU C++11 | TESTS | 145 | 390 | 70348800 | 3100 | |
| 33155651 | NOIRP | G | Dec. 12, 2017, 1:07 p.m. | OK | GNU C++11 | TESTS | 145 | 390 | 82329600 | 3100 | |
| 33155577 | NOIRP | G | Dec. 12, 2017, 1:04 p.m. | OK | GNU C++11 | TESTS | 145 | 405 | 106393600 | 3100 | |
| 33155431 | NOIRP | G | Dec. 12, 2017, 12:58 p.m. | OK | GNU C++11 | TESTS | 145 | 420 | 150528000 | 3100 | |
| 31449317 | ywwyww | G | Oct. 17, 2017, 1:01 p.m. | OK | GNU C++11 | TESTS | 145 | 436 | 41984000 | 3100 | |
| 40547020 | ywwyww | G | July 19, 2018, 12:20 p.m. | OK | GNU C++14 | TESTS | 145 | 78 | 43315200 | 3100 | |
| 26946510 | spencer | G | May 7, 2017, 8:40 p.m. | OK | GNU C++14 | TESTS | 145 | 218 | 23756800 | 3100 | |
| 26926517 | spencer | G | May 7, 2017, 3:42 p.m. | OK | GNU C++14 | TESTS | 145 | 218 | 23756800 | 3100 | |
| 27203267 | spencer | G | May 18, 2017, 7:06 p.m. | OK | GNU C++14 | TESTS | 145 | 218 | 28979200 | 3100 | |
| 40981856 | ReaLNero1 | G | July 30, 2018, 6:10 p.m. | OK | GNU C++14 | TESTS | 145 | 233 | 23756800 | 3100 | |
| 26649485 | winger | G | April 24, 2017, 9:43 p.m. | OK | GNU C++14 | TESTS | 145 | 248 | 98099200 | 3100 | |
| 27203291 | spencer | G | May 18, 2017, 7:07 p.m. | OK | GNU C++14 | TESTS | 145 | 265 | 37580800 | 3100 | |
| 26627362 | enot110 | G | April 23, 2017, 8:25 p.m. | OK | GNU C++14 | TESTS | 145 | 280 | 158208000 | 3100 | |
| 26654060 | winger | G | April 25, 2017, 6:27 a.m. | OK | GNU C++14 | TESTS | 145 | 358 | 55193600 | 3100 | |
| 26654032 | winger | G | April 25, 2017, 6:25 a.m. | OK | GNU C++14 | TESTS | 145 | 389 | 55193600 | 3100 | |
| 47442318 | vjudge2 | G | Dec. 24, 2018, 2:54 a.m. | OK | GNU C++17 | TESTS | 145 | 171 | 18329600 | 3100 | |
| 47442288 | 616156 | G | Dec. 24, 2018, 2:51 a.m. | OK | GNU C++17 | TESTS | 145 | 171 | 18329600 | 3100 | |
| 47442237 | 616156 | G | Dec. 24, 2018, 2:48 a.m. | OK | GNU C++17 | TESTS | 145 | 186 | 18329600 | 3100 | |
| 57162143 | Benq | G | July 16, 2019, 7:43 p.m. | OK | GNU C++17 | TESTS | 145 | 842 | 26214400 | 3100 | |
| 50884881 | zhangqingqi | G | March 6, 2019, 10:48 a.m. | OK | GNU C++17 | TESTS | 145 | 904 | 145510400 | 3100 | |
| 60920946 | EZOJ | G | Sept. 20, 2019, 10:36 a.m. | OK | GNU C++17 | TESTS | 145 | 1091 | 57344000 | 3100 | |
| 47884449 | Light | G | Jan. 3, 2019, 8:46 p.m. | OK | GNU C++17 | TESTS | 145 | 1123 | 68812800 | 3100 | |
| 68917903 | vjudge4 | G | Jan. 16, 2020, 8:50 a.m. | OK | GNU C++17 | TESTS | 145 | 1341 | 123289600 | 3100 | |
| 60904548 | 1351593868 | G | Sept. 20, 2019, 1:25 a.m. | OK | GNU C++17 | TESTS | 145 | 5007 | 44032000 | 3100 | |
| 47441919 | vjudge5 | G | Dec. 24, 2018, 2:25 a.m. | OK | GNU C++17 | TESTS | 145 | 6489 | 67788800 | 3100 | |
| 26671099 | JShinjuro | G | April 25, 2017, 9:29 p.m. | OK | Java 8 | TESTS | 145 | 1559 | 62361600 | 3100 | |
| 26669894 | eatmore | G | April 25, 2017, 7:32 p.m. | OK | Java 8 | TESTS | 145 | 1591 | 62361600 | 3100 | |
| 26750452 | honeypot | G | April 29, 2017, 2:22 p.m. | OK | Java 8 | TESTS | 145 | 1747 | 62361600 | 3100 | |
| 47442316 | vjudge5 | G | Dec. 24, 2018, 2:54 a.m. | OK | MS C++ | TESTS | 145 | 202 | 18227200 | 3100 | |
| 47442294 | vjudge5 | G | Dec. 24, 2018, 2:52 a.m. | OK | MS C++ | TESTS | 145 | 234 | 18227200 | 3100 | |
| 62072591 | vjudge1 | G | Oct. 7, 2019, 5:11 p.m. | OK | MS C++ | TESTS | 145 | 421 | 83353600 | 3100 | |
| 47455285 | vjudge2 | G | Dec. 24, 2018, 12:12 p.m. | OK | MS C++ | TESTS | 145 | 436 | 83353600 | 3100 | |
| 47480440 | vjudge1 | G | Dec. 25, 2018, 4:27 a.m. | OK | MS C++ | TESTS | 145 | 451 | 83353600 | 3100 | |
| 47455269 | vjudge4 | G | Dec. 24, 2018, 12:11 p.m. | OK | MS C++ | TESTS | 145 | 451 | 83353600 | 3100 | |
| 44378361 | Darooha | G | Oct. 16, 2018, 12:21 a.m. | OK | Ocaml | TESTS | 145 | 2074 | 49664000 | 3100 |
Back to search problems