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 |
---|---|---|---|---|---|---|
1194 | Educational Codeforces Round 68 (Rated for Div. 2) | FINISHED | False | 7200 | 174323687 | July 14, 2019, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1946 ) | E | Count The Rectangles | PROGRAMMING | bitmasks brute force data structures geometry sortings | 2200 |
B'There are n segments drawn on a plane; the i -th segment connects two points ( x_{i, 1} , y_{i, 1} ) and ( x_{i, 2} , y_{i, 2} ). Each segment is non-degenerate, and is either horizontal or vertical -- formally, for every i in [1, n] either x_{i, 1} = x_{i, 2} or y_{i, 1} = y_{i, 2} (but only one of these conditions holds). Only segments of different types may intersect: no pair of horizontal segments shares any common points, and no pair of vertical segments shares any common points. We say that four segments having indices h_1 , h_2 , v_1 and v_2 such that h_1 < h_2 and v_1 < v_2 form a rectangle if the following conditions hold: Please calculate the number of ways to choose four segments so they form a rectangle. Note that the conditions h_1 < h_2 and v_1 < v_2 should hold. The first line contains one integer n ( 1 <= n <= 5000 ) -- the number of segments. Then n lines follow. The i -th line contains four integers x_{i, 1} , y_{i, 1} , x_{i, 2} and y_{i, 2} denoting the endpoints of the i -th segment. All coordinates of the endpoints are in the range [-5000, 5000] . It is guaranteed that each segment is non-degenerate and is either horizontal or vertical. Furthermore, if two segments share a common point, one of these segments is horizontal, and another one is vertical. Print one integer -- the number of ways to choose four segments so they form a rectangle. The following pictures represent sample cases: '... |
Разбор Educational Codeforces Round 68 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
57148708 | MRoy | E | July 16, 2019, 1:56 p.m. | OK | GNU C11 | TESTS | 55 | 358 | 100864000 | 2200 | |
57149365 | MRoy | E | July 16, 2019, 2:10 p.m. | OK | GNU C11 | TESTS | 55 | 373 | 100864000 | 2200 | |
63533910 | kal0rona | E | Oct. 27, 2019, 7:31 a.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
60057679 | oduesp | E | Sept. 5, 2019, 5:16 a.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
58420183 | hz2016 | E | Aug. 7, 2019, 7:22 a.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
57185741 | vjudge5 | E | July 17, 2019, 8:39 a.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
57148413 | vjudge1 | E | July 16, 2019, 1:49 p.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
57148244 | vjudge3 | E | July 16, 2019, 1:45 p.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
57147618 | vjudge3 | E | July 16, 2019, 1:32 p.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
57147573 | vjudge5 | E | July 16, 2019, 1:31 p.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
65905844 | luogu_bot1 | E | Nov. 28, 2019, 10:52 a.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
65024610 | Dream-chasing_Juvenile | E | Nov. 15, 2019, 7:01 a.m. | OK | GNU C++11 | TESTS | 55 | 124 | 204800 | 2200 | |
57053509 | Arg_007 | E | July 14, 2019, 4:31 p.m. | OK | GNU C++14 | TESTS | 53 | 124 | 307200 | 2200 | |
57138641 | meooow | E | July 16, 2019, 9:59 a.m. | OK | GNU C++14 | TESTS | 55 | 124 | 409600 | 2200 | |
57473337 | tshr | E | July 21, 2019, 7:33 p.m. | OK | GNU C++14 | TESTS | 55 | 124 | 409600 | 2200 | |
57473897 | tshr | E | July 21, 2019, 7:54 p.m. | OK | GNU C++14 | TESTS | 55 | 124 | 409600 | 2200 | |
57126455 | Gaga_liao | E | July 16, 2019, 4:45 a.m. | OK | GNU C++14 | TESTS | 55 | 139 | 307200 | 2200 | |
57058700 | xdu_lhz | E | July 14, 2019, 5:03 p.m. | OK | GNU C++14 | TESTS | 53 | 139 | 307200 | 2200 | |
57058951 | lanran2002 | E | July 14, 2019, 5:07 p.m. | OK | GNU C++14 | TESTS | 53 | 139 | 409600 | 2200 | |
57178608 | queragion2726 | E | July 17, 2019, 6:28 a.m. | OK | GNU C++14 | TESTS | 55 | 140 | 204800 | 2200 | |
57058956 | lanran2002 | E | July 14, 2019, 5:07 p.m. | OK | GNU C++14 | TESTS | 53 | 140 | 409600 | 2200 | |
57105268 | RobeZH | E | July 15, 2019, 3:05 p.m. | OK | GNU C++14 | TESTS | 55 | 140 | 512000 | 2200 | |
57057642 | _Cardinal | E | July 14, 2019, 4:49 p.m. | OK | GNU C++17 | TESTS | 53 | 109 | 307200 | 2200 | |
57128243 | neal | E | July 16, 2019, 5:53 a.m. | OK | GNU C++17 | TESTS | 55 | 124 | 102400 | 2200 | |
57128111 | neal | E | July 16, 2019, 5:49 a.m. | OK | GNU C++17 | TESTS | 55 | 124 | 307200 | 2200 | |
57048522 | edenooo | E | July 14, 2019, 4:09 p.m. | OK | GNU C++17 | TESTS | 53 | 124 | 307200 | 2200 | |
57128612 | neal | E | July 16, 2019, 6:04 a.m. | OK | GNU C++17 | TESTS | 55 | 124 | 307200 | 2200 | |
57128801 | neal | E | July 16, 2019, 6:10 a.m. | OK | GNU C++17 | TESTS | 55 | 124 | 307200 | 2200 | |
57128540 | neal | E | July 16, 2019, 6:02 a.m. | OK | GNU C++17 | TESTS | 55 | 124 | 307200 | 2200 | |
57284366 | TrivialMan | E | July 18, 2019, 2 p.m. | OK | GNU C++17 | TESTS | 55 | 124 | 512000 | 2200 | |
57128659 | neal | E | July 16, 2019, 6:06 a.m. | OK | GNU C++17 | TESTS | 55 | 139 | 307200 | 2200 | |
57128706 | neal | E | July 16, 2019, 6:07 a.m. | OK | GNU C++17 | TESTS | 55 | 139 | 307200 | 2200 | |
57086046 | tkachenko | E | July 15, 2019, 8:53 a.m. | OK | Go | TESTS | 53 | 358 | 5427200 | 2200 | |
57085384 | brainfxxk | E | July 15, 2019, 8:36 a.m. | OK | Java 8 | TESTS | 53 | 389 | 0 | 2200 | |
57817619 | norty | E | July 26, 2019, 8:39 p.m. | OK | Java 8 | TESTS | 55 | 545 | 0 | 2200 | |
57065134 | brainfxxk | E | July 14, 2019, 8:40 p.m. | OK | Java 8 | TESTS | 53 | 561 | 0 | 2200 | |
57167232 | uwi | E | July 17, 2019, 12:19 a.m. | OK | Java 8 | TESTS | 55 | 592 | 0 | 2200 | |
57048625 | Musin | E | July 14, 2019, 4:10 p.m. | OK | Java 8 | TESTS | 53 | 607 | 0 | 2200 | |
57122225 | Tlatoani | E | July 16, 2019, 2 a.m. | OK | Java 8 | TESTS | 55 | 623 | 0 | 2200 | |
57191584 | pandrei | E | July 17, 2019, 10:49 a.m. | OK | Java 8 | TESTS | 55 | 654 | 0 | 2200 | |
57795679 | 7dan | E | July 26, 2019, 11:18 a.m. | OK | Java 8 | TESTS | 55 | 654 | 0 | 2200 | |
57059271 | dalt | E | July 14, 2019, 5:12 p.m. | OK | Java 8 | TESTS | 53 | 826 | 77824000 | 2200 | |
66789924 | Oopsimbad | E | Dec. 13, 2019, 2:55 p.m. | OK | Java 8 | TESTS | 55 | 841 | 0 | 2200 | |
57061484 | omikad | E | July 14, 2019, 6:14 p.m. | OK | Mono C# | TESTS | 53 | 1637 | 7680000 | 2200 | |
63057329 | vjudge2 | E | Oct. 21, 2019, 6:59 a.m. | OK | MS C++ | TESTS | 55 | 936 | 716800 | 2200 | |
57094783 | xsc | E | July 15, 2019, 11:54 a.m. | OK | MS C++ 2017 | TESTS | 53 | 420 | 204800 | 2200 | |
57741586 | ai.lugle1997 | E | July 25, 2019, 11:37 a.m. | OK | MS C++ 2017 | TESTS | 55 | 561 | 1433600 | 2200 | |
57061245 | pseuda | E | July 14, 2019, 6:05 p.m. | OK | MS C++ 2017 | TESTS | 53 | 1513 | 1740800 | 2200 | |
65272852 | sansen | E | Nov. 17, 2019, 9:04 p.m. | OK | Rust | TESTS | 55 | 732 | 1228800 | 2200 | |
62822904 | yakamoto | E | Oct. 17, 2019, 5:10 p.m. | OK | Scala | TESTS | 55 | 1185 | 0 | 2200 |
Back to search problems