Codeforces Round 715 (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
1508 Codeforces Round 715 (Div. 1) FINISHED False 8100 113239499 April 16, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 575 ) D Swap Pass PROGRAMMING constructive algorithms geometry sortings

B"Based on a peculiar incident at basketball practice, Akari came up with the following competitive programming problem! You are given n points on the plane, no three of which are collinear. The i -th point initially has a label a_i , in such a way that the labels a_1, a_2, ... , a_n form a permutation of 1, 2, ... , n . You are allowed to modify the labels through the following operation: A sequence of operations is valid if after applying all of the operations in the sequence in order, the k -th point ends up having the label k for all k between 1 and n inclusive, and the drawn segments don't intersect each other internally. Formally, if two of the segments intersect, then they must do so at a common endpoint of both segments. In particular, all drawn segments must be distinct. Find any valid sequence of operations, or say that none exist. The first line contains an integer n ( 3 <= n <= 2000 ) -- the number of points. The i -th of the following n lines contains three integers x_i , y_i , a_i ( -10^6 <= x_i, y_i <= 10^6 , 1 <= a_i <= n ), representing that the i -th point has coordinates (x_i, y_i) and initially has label a_i . It is guaranteed that all points are distinct, no three points are collinear, and the labels a_1, a_2, ... , a_n form a permutation of 1, 2, ... , n . If it is impossible to perform a valid sequence of operations, print -1 . Otherwise, print an integer k ( 0 <= k <= frac{n(n - 1)}{2} ) -- the number of operations to perform, followed by k lines, each containing two integers i and j ( 1 <= i, j <= n , i neq j ) -- the indices of the points chosen for the operation. Note that you are not required to minimize or maximize the value of k . If there are multiple possible answers, you may print any of them. The following animation showcases t"...

Tutorials

Codeforces Round #715 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113277386 rainboy D April 16, 2021, 9:49 p.m. OK GNU C11 TESTS 117 46 102400
113240058 Isonan D April 16, 2021, 4:05 p.m. OK GNU C++11 TESTS 117 31 0
113296913 yzc2005 D April 17, 2021, 5:55 a.m. OK GNU C++11 TESTS 117 31 102400
113294243 Grice D April 17, 2021, 5:19 a.m. OK GNU C++11 TESTS 117 31 36147200
113242005 y1s1 D April 16, 2021, 4:10 p.m. OK GNU C++14 TESTS 117 31 102400
113256880 dlalswp25 D April 16, 2021, 4:49 p.m. OK GNU C++14 TESTS 117 31 102400
113242382 Radewoosh D April 16, 2021, 4:11 p.m. OK GNU C++14 TESTS 117 31 204800
113286917 Hs-Black D April 17, 2021, 3:03 a.m. OK GNU C++14 TESTS 117 31 15257600
113262685 Mustang98 D April 16, 2021, 5:51 p.m. OK GNU C++14 TESTS 117 46 512000
113288648 djq_fpc D April 17, 2021, 3:38 a.m. OK GNU C++14 TESTS 117 62 307200
113277985 peti1234 D April 16, 2021, 10:08 p.m. OK GNU C++17 TESTS 117 31 102400
113261303 Nakagawa.Kanon D April 16, 2021, 5:38 p.m. OK GNU C++17 TESTS 117 31 102400
113260347 Splashing D April 16, 2021, 5:29 p.m. OK GNU C++17 TESTS 117 31 102400
113249820 TeaPot D April 16, 2021, 4:32 p.m. OK GNU C++17 TESTS 117 31 102400
113249563 wucstdio D April 16, 2021, 4:31 p.m. OK GNU C++17 TESTS 117 31 102400
113225842 ksun48 D April 16, 2021, 3:32 p.m. OK GNU C++17 TESTS 117 31 102400
113288125 1-gon D April 17, 2021, 3:28 a.m. OK GNU C++17 TESTS 117 31 102400
113277156 maximumSHOT D April 16, 2021, 9:43 p.m. OK GNU C++17 TESTS 117 31 204800
113270637 fivefourthreeone D April 16, 2021, 7:40 p.m. OK GNU C++17 TESTS 117 31 204800
113270607 deepspacewaifu D April 16, 2021, 7:39 p.m. OK GNU C++17 TESTS 117 31 204800
113268494 risujiroh D April 16, 2021, 7:07 p.m. OK GNU C++17 (64) TESTS 117 31 102400
113264056 Kuroni D April 16, 2021, 6:06 p.m. OK GNU C++17 (64) TESTS 117 31 102400
113285959 Isoeasy D April 17, 2021, 2:41 a.m. OK GNU C++17 (64) TESTS 117 31 102400
113259942 rama_pang D April 16, 2021, 5:26 p.m. OK GNU C++17 (64) TESTS 117 31 102400
113256393 user202729_ D April 16, 2021, 4:49 p.m. OK GNU C++17 (64) TESTS 117 31 102400
113248310 Benq D April 16, 2021, 4:27 p.m. OK GNU C++17 (64) TESTS 117 31 102400
113271482 antony191 D April 16, 2021, 7:52 p.m. OK GNU C++17 (64) TESTS 117 31 102400
113279806 cuom1999 D April 16, 2021, 11:06 p.m. OK GNU C++17 (64) TESTS 117 31 204800
113264247 Sana D April 16, 2021, 6:08 p.m. OK GNU C++17 (64) TESTS 117 31 204800
113259526 emorgan5289 D April 16, 2021, 5:23 p.m. OK GNU C++17 (64) TESTS 117 31 204800
113288609 FlakeLCR D April 17, 2021, 3:38 a.m. OK PyPy 3 TESTS 117 187 6041600
113241631 FlakeLCR D April 16, 2021, 4:09 p.m. OK PyPy 3 TESTS 117 187 6451200

remove filters

Back to search problems