Codeforces Global Round 15

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
1552 Codeforces Global Round 15 FINISHED False 9900 110129111 July 25, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5980 ) C Maximize the Intersections PROGRAMMING combinatorics constructive algorithms geometry greedy

B'On a circle lie 2n distinct points, with the following property: however you choose 3 chords that connect 3 disjoint pairs of points, no point strictly inside the circle belongs to all 3 chords. The points are numbered 1, , 2, , ... , , 2n in clockwise order. Initially, k chords connect k pairs of points, in such a way that all the 2k endpoints of these chords are distinct. You want to draw n - k additional chords that connect the remaining 2(n - k) points (each point must be an endpoint of exactly one chord). In the end, let x be the total number of intersections among all n chords. Compute the maximum value that x can attain if you choose the n - k chords optimally. Note that the exact position of the 2n points is not relevant, as long as the property stated in the first paragraph holds. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t test cases follow. The first line of each test case contains two integers n and k ( 1 <= n <= 100 , 0 <= k <= n ) -- half the number of points and the number of chords initially drawn. Then k lines follow. The i -th of them contains two integers x_i and y_i ( 1 <= x_i, , y_i <= 2n , x_i ne y_i ) -- the endpoints of the i -th chord. It is guaranteed that the 2k numbers x_1, , y_1, , x_2, , y_2, , ... , , x_k, , y_k are all distinct. For each test case, output the maximum number of intersections that can be obtained by drawing n - k additional chords. In the first test case, there are three ways to draw the 2 additional chords, shown below (black chords are the ones initially drawn, while red chords are the new ones): We see that the third way gives the maximum number of intersections, namely 4 . In the second test case, there are no more chords to draw. Of course,'...

Tutorials

Editorial of Global Round 15

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
123774826 rainboy C July 25, 2021, 7:14 p.m. OK GNU C11 TESTS 31 15 3686400
123763010 ja1467 C July 25, 2021, 5:04 p.m. OK GNU C11 TESTS 31 30 4505600
123754878 ttsweet C July 25, 2021, 4:30 p.m. OK GNU C++11 TESTS 31 15 3686400
123756350 whn C July 25, 2021, 4:36 p.m. OK GNU C++11 TESTS 31 15 3891200
123764807 qianguch C July 25, 2021, 5:11 p.m. OK GNU C++11 TESTS 31 15 3891200
123787825 muoshuo C July 26, 2021, 1:40 a.m. OK GNU C++11 TESTS 31 15 6553600
123754513 Qquun C July 25, 2021, 4:28 p.m. OK GNU C++11 TESTS 31 15 6758400
123788598 kindforst C July 26, 2021, 1:59 a.m. OK GNU C++11 TESTS 31 30 3891200
123788050 grass8cow C July 26, 2021, 1:45 a.m. OK GNU C++11 TESTS 31 30 3891200
123786931 asdstu C July 26, 2021, 1:17 a.m. OK GNU C++11 TESTS 31 30 3891200
123792101 cxccxc C July 26, 2021, 3:12 a.m. OK GNU C++11 TESTS 31 30 3891200
123790464 Bi08 C July 26, 2021, 2:40 a.m. OK GNU C++11 TESTS 31 30 3891200
123753923 PAN23 C July 25, 2021, 4:26 p.m. OK GNU C++14 TESTS 31 15 3891200
123762379 kunj_taneja C July 25, 2021, 5:01 p.m. OK GNU C++14 TESTS 31 15 3891200
123770107 Deep_Chaklasiya C July 25, 2021, 6:06 p.m. OK GNU C++14 TESTS 31 15 3891200
123758088 vqt2 C July 25, 2021, 4:43 p.m. OK GNU C++14 TESTS 31 30 3788800
123762485 f20191110 C July 25, 2021, 5:02 p.m. OK GNU C++14 TESTS 31 30 3788800
123770794 2018csb1275 C July 25, 2021, 6:13 p.m. OK GNU C++14 TESTS 31 30 3891200
123766254 Divya_Patel C July 25, 2021, 5:16 p.m. OK GNU C++14 TESTS 31 30 3891200
123781683 werus23 C July 25, 2021, 10:01 p.m. OK GNU C++14 TESTS 31 30 3891200
123764764 Cosmicoder C July 25, 2021, 5:11 p.m. OK GNU C++14 TESTS 31 30 3891200
123776580 royal_sandhu C July 25, 2021, 7:46 p.m. OK GNU C++14 TESTS 31 30 3891200
123777068 w-- C July 25, 2021, 7:57 p.m. OK GNU C++17 TESTS 31 15 3686400
123756028 Artem_Syharev C July 25, 2021, 4:34 p.m. OK GNU C++17 TESTS 31 15 3788800
123761603 ArcCCcp C July 25, 2021, 4:58 p.m. OK GNU C++17 TESTS 31 15 3788800
123757014 Maho C July 25, 2021, 4:39 p.m. OK GNU C++17 TESTS 31 15 3788800
123755362 habeg47004 C July 25, 2021, 4:31 p.m. OK GNU C++17 TESTS 31 15 3788800
123754772 ygam C July 25, 2021, 4:29 p.m. OK GNU C++17 TESTS 31 15 3788800
123775746 18o3 C July 25, 2021, 7:30 p.m. OK GNU C++17 TESTS 31 15 3891200
123772556 kriplani_321 C July 25, 2021, 6:35 p.m. OK GNU C++17 TESTS 31 15 3891200
123789947 Noctambulant C July 26, 2021, 2:29 a.m. OK GNU C++17 TESTS 31 15 3891200
123781692 hasib_hossain C July 25, 2021, 10:01 p.m. OK GNU C++17 TESTS 31 15 3891200
123769764 Turkhuuu C July 25, 2021, 6:03 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123763396 tkacper C July 25, 2021, 5:06 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123754672 8875194058_HoangNH C July 25, 2021, 4:29 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123754598 Kregor C July 25, 2021, 4:29 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123753782 czhang2718 C July 25, 2021, 4:25 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123754225 rishit3234 C July 25, 2021, 4:27 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123784660 Lhohelhohehmm C July 25, 2021, 11:58 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123779398 onglogn C July 25, 2021, 8:51 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123771283 ScarletS C July 25, 2021, 6:19 p.m. OK GNU C++17 (64) TESTS 31 15 4300800
123786739 ducati C July 26, 2021, 1:11 a.m. OK GNU C++17 (64) TESTS 31 15 5120000
123770166 clyring C July 25, 2021, 6:06 p.m. OK Haskell TESTS 31 31 11673600
123758957 codelegend C July 25, 2021, 4:47 p.m. OK Haskell TESTS 31 31 11673600
123775945 aismita_98 C July 25, 2021, 7:34 p.m. OK Java 11 TESTS 31 186 24780800
123775800 Ais007 C July 25, 2021, 7:31 p.m. OK Java 11 TESTS 31 186 24780800
123770611 eyangch C July 25, 2021, 6:11 p.m. OK Java 11 TESTS 31 187 23859200
123754850 tankman890 C July 25, 2021, 4:30 p.m. OK Java 11 TESTS 31 187 23859200
123774183 sarthakmanna C July 25, 2021, 7:02 p.m. OK Java 11 TESTS 31 187 24780800
123774127 sarthakmanna C July 25, 2021, 7:01 p.m. OK Java 11 TESTS 31 187 24780800
123793417 pikachu_pika_pika C July 26, 2021, 3:38 a.m. OK Java 11 TESTS 31 202 23756800
123757382 LiandrysAnguish C July 25, 2021, 4:40 p.m. OK Java 11 TESTS 31 202 23756800
123795108 Clark_Kent C July 26, 2021, 4:11 a.m. OK Java 11 TESTS 31 202 23859200
123757114 Hemose C July 25, 2021, 4:39 p.m. OK Java 11 TESTS 31 202 23859200
123777947 anton_h C July 25, 2021, 8:16 p.m. OK Java 8 TESTS 31 109 20480000
123760877 Pranay_ C July 25, 2021, 4:55 p.m. OK Java 8 TESTS 31 124 20275200
123800718 lcheeme1 C July 26, 2021, 5:52 a.m. OK Java 8 TESTS 31 124 20787200
123759716 oat21 C July 25, 2021, 4:50 p.m. OK Java 8 TESTS 31 124 20889600
123757288 NerfThis C July 25, 2021, 4:40 p.m. OK Java 8 TESTS 31 139 20582400
123783009 themadknight45 C July 25, 2021, 10:46 p.m. OK Java 8 TESTS 31 139 21094400
123784105 Shemo C July 25, 2021, 11:33 p.m. OK Java 8 TESTS 31 140 20684800
123773293 coolManit C July 25, 2021, 6:47 p.m. OK Java 8 TESTS 31 140 20787200
123754061 kelvinc1024 C July 25, 2021, 4:26 p.m. OK Java 8 TESTS 31 140 20787200
123757312 honeysingh18 C July 25, 2021, 4:40 p.m. OK Java 8 TESTS 31 140 20992000
123790859 yyeshell C July 26, 2021, 2:47 a.m. OK MS C++ 2017 TESTS 31 31 3788800
123785425 lrb666 C July 26, 2021, 12:29 a.m. OK MS C++ 2017 TESTS 31 31 3788800
123762580 shirkalinadarya C July 25, 2021, 5:02 p.m. OK MS C++ 2017 TESTS 31 31 3788800
123758824 tygrysek C July 25, 2021, 4:46 p.m. OK MS C++ 2017 TESTS 31 31 3788800
123754176 camacju C July 25, 2021, 4:27 p.m. OK MS C++ 2017 TESTS 31 31 3788800
123761594 coden00b2021 C July 25, 2021, 4:58 p.m. OK PyPy 2 TESTS 31 171 26214400
123772376 nehan_der_thal C July 25, 2021, 6:33 p.m. OK PyPy 3 TESTS 31 140 23859200
123769268 1_2_3_4_5_9 C July 25, 2021, 6 p.m. OK PyPy 3 TESTS 31 155 23244800
123764045 10_11_12 C July 25, 2021, 5:08 p.m. OK PyPy 3 TESTS 31 155 23244800
123781700 yash490 C July 25, 2021, 10:02 p.m. OK PyPy 3 TESTS 31 156 23859200
123765812 nogirosta C July 25, 2021, 5:15 p.m. OK PyPy 3 TESTS 31 156 24064000
123801194 Munchy_1 C July 26, 2021, 5:59 a.m. OK PyPy 3 TESTS 31 170 24064000
123760986 s_prateek26 C July 25, 2021, 4:56 p.m. OK PyPy 3 TESTS 31 171 23552000
123758200 _SODA C July 25, 2021, 4:43 p.m. OK PyPy 3 TESTS 31 186 23654400
123755751 Sitri88 C July 25, 2021, 4:33 p.m. OK PyPy 3 TESTS 31 202 24576000
123782809 Het_Fadia C July 25, 2021, 10:37 p.m. OK PyPy 3 TESTS 31 202 26828800
123761191 ShubhamDoke C July 25, 2021, 4:56 p.m. OK Python 3 TESTS 31 202 6963200
123799127 mightyk C July 26, 2021, 5:27 a.m. OK Python 3 TESTS 31 264 6963200
123754761 dumbass93 C July 25, 2021, 4:29 p.m. OK Python 3 TESTS 31 264 6963200
123757672 amdad7 C July 25, 2021, 4:41 p.m. OK Python 3 TESTS 31 280 7065600
123765807 Freiden C July 25, 2021, 5:15 p.m. OK Python 3 TESTS 31 296 6963200
123762498 flynn_wu C July 25, 2021, 5:02 p.m. OK Python 3 TESTS 31 311 6963200
123758777 aishu007 C July 25, 2021, 4:46 p.m. OK Python 3 TESTS 31 311 7065600
123759409 you1234 C July 25, 2021, 4:49 p.m. OK Python 3 TESTS 31 358 7168000
123779644 belkka C July 25, 2021, 8:58 p.m. OK Python 3 TESTS 31 452 6963200
123778418 Hex1729 C July 25, 2021, 8:27 p.m. OK Python 3 TESTS 31 467 6963200
123754614 apilat C July 25, 2021, 4:29 p.m. OK Rust TESTS 31 30 3891200
123762586 zheland C July 25, 2021, 5:02 p.m. OK Rust TESTS 31 31 3891200

remove filters

Back to search problems