CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!)

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
1942 CodeTON Round 8 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 10800 20013899 March 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6187 ) C2 Bessie's Birthday Cake (Hard Version) PROGRAMMING geometry greedy math

B"This is the hard version of the problem. The only difference between the two versions is the constraint on y . In this version 0 <= q y <= q n - x . You can make hacks only if both versions are solved. Bessie has received a birthday cake from her best friend Elsie, and it came in the form of a regular polygon with n sides. The vertices of the cake are numbered from 1 to n clockwise. You and Bessie are going to choose some of those vertices to cut non-intersecting diagonals into the cake. In other words, the endpoints of the diagonals must be part of the chosen vertices. Bessie would only like to give out pieces of cake which result in a triangle to keep consistency. The size of the pieces doesn't matter, and the whole cake does not have to be separated into all triangles (other shapes are allowed in the cake, but those will not be counted). Bessie has already chosen x of those vertices that can be used to form diagonals. She wants you to choose no more than y other vertices such that the number of triangular pieces of cake she can give out is maximized. What is the maximum number of triangular pieces of cake Bessie can give out? The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case consists of three integers, n , x , and y ( 4 <= q n <= q 10^9 , 2 <= q x <= q min(n, 2 cdot 10^5) , 0 <= q y <= q n - x ) -- the number of sides of the polygon, number of vertices Bessie has chosen, and the maximum number of other vertices you can choose. The second line consists of x distinct integers from 1 to n , representing the vertices Bessie has chosen. It is guaranteed the sum of x over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer: the maximum number of non-intersecting triangular pieces of cake she can give out. In test cases 1 , "...

Tutorials

CodeTON Round 8 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
254191251 DDDG C2 March 30, 2024, 5:14 p.m. OK C++14 (GCC 6-32) TESTS 15 93 1638400
254187569 fall-into-dust C2 March 30, 2024, 5:01 p.m. OK C++14 (GCC 6-32) TESTS 15 93 1638400
254194035 Kblp_COCu4kA C2 March 30, 2024, 5:23 p.m. OK C++14 (GCC 6-32) TESTS 15 93 3584000
254194240 csegura C2 March 30, 2024, 5:23 p.m. OK C++14 (GCC 6-32) TESTS 15 93 3788800
254197622 t1r3d_ C2 March 30, 2024, 5:33 p.m. OK C++14 (GCC 6-32) TESTS 15 93 4608000
254196281 wellwei C2 March 30, 2024, 5:29 p.m. OK C++14 (GCC 6-32) TESTS 15 93 5120000
254191914 cjtsai C2 March 30, 2024, 5:16 p.m. OK C++14 (GCC 6-32) TESTS 15 93 6144000
254214632 mastermindevil C2 March 30, 2024, 8:18 p.m. OK C++14 (GCC 6-32) TESTS 15 93 6451200
254185156 amirisokokok C2 March 30, 2024, 4:54 p.m. OK C++14 (GCC 6-32) TESTS 15 108 2662400
254196406 Lcaokai C2 March 30, 2024, 5:30 p.m. OK C++14 (GCC 6-32) TESTS 15 108 4608000
254243002 SeConSorL C2 March 31, 2024, 4:36 a.m. OK C++17 (GCC 7-32) TESTS 15 77 1843200
254201868 sgfc C2 March 30, 2024, 6:23 p.m. OK C++17 (GCC 7-32) TESTS 15 77 1843200
254211146 jmyszka C2 March 30, 2024, 7:41 p.m. OK C++17 (GCC 7-32) TESTS 15 77 2252800
254245783 rahilshah17 C2 March 31, 2024, 5:12 a.m. OK C++17 (GCC 7-32) TESTS 15 77 2662400
254237284 kabu C2 March 31, 2024, 3:04 a.m. OK C++17 (GCC 7-32) TESTS 15 77 2662400
254209354 KhaledElgendy C2 March 30, 2024, 7:22 p.m. OK C++17 (GCC 7-32) TESTS 15 77 2662400
254230076 hhhyh C2 March 31, 2024, 12:46 a.m. OK C++17 (GCC 7-32) TESTS 15 77 3481600
254210718 amanbol C2 March 30, 2024, 7:36 p.m. OK C++17 (GCC 7-32) TESTS 15 77 3584000
254196196 nicerice C2 March 30, 2024, 5:29 p.m. OK C++17 (GCC 7-32) TESTS 15 77 3891200
254194867 FredBill C2 March 30, 2024, 5:25 p.m. OK C++17 (GCC 7-32) TESTS 15 77 6758400
254222828 fullflex C2 March 30, 2024, 10:09 p.m. OK C++20 (GCC 13-64) TESTS 15 46 1945600
254213000 rishabhdeepsingh C2 March 30, 2024, 8 p.m. OK C++20 (GCC 13-64) TESTS 15 46 1945600
254208881 Stronger_Than_Kdlyh C2 March 30, 2024, 7:17 p.m. OK C++20 (GCC 13-64) TESTS 15 46 1945600
254208702 G_Raev C2 March 30, 2024, 7:16 p.m. OK C++20 (GCC 13-64) TESTS 15 46 3481600
254193008 kagariet01 C2 March 30, 2024, 5:19 p.m. OK C++20 (GCC 13-64) TESTS 15 46 3788800
254205988 milind0110 C2 March 30, 2024, 6:51 p.m. OK C++20 (GCC 13-64) TESTS 15 46 5632000
254189577 umm_Kulthum C2 March 30, 2024, 5:08 p.m. OK C++20 (GCC 13-64) TESTS 15 46 5836800
254222346 InvisibleOne C2 March 30, 2024, 10:01 p.m. OK C++20 (GCC 13-64) TESTS 15 61 1638400
254186355 Faccirx C2 March 30, 2024, 4:57 p.m. OK C++20 (GCC 13-64) TESTS 15 61 1638400
254239247 23-8liumingyang C2 March 31, 2024, 3:38 a.m. OK C++20 (GCC 13-64) TESTS 15 61 2867200
254219858 NenadDapic C2 March 30, 2024, 9:23 p.m. OK FPC TESTS 15 109 2560000
254221171 NenadDapic C2 March 30, 2024, 9:42 p.m. OK FPC TESTS 15 124 2560000
254219991 NenadDapic C2 March 30, 2024, 9:24 p.m. OK FPC TESTS 15 124 2560000
254242728 sleepntsheep C2 March 31, 2024, 4:33 a.m. OK GNU C11 TESTS 15 109 3481600
254232698 1435730 C2 March 31, 2024, 1:43 a.m. OK GNU C11 TESTS 15 124 1843200
254239750 priyaroy3370 C2 March 31, 2024, 3:46 a.m. OK Java 21 TESTS 15 405 9625600
254189016 wait_rain_stops C2 March 30, 2024, 5:06 p.m. OK Java 21 TESTS 15 421 0
254216083 santanu2414 C2 March 30, 2024, 8:34 p.m. OK Java 21 TESTS 15 467 5427200
254228224 testtest111ksjfrdvn C2 March 31, 2024, 12:06 a.m. OK Java 21 TESTS 15 483 11059200
254228423 testtest111ksjfrdvn C2 March 31, 2024, 12:10 a.m. OK Java 21 TESTS 15 514 11161600
254208917 tushar19280 C2 March 30, 2024, 7:18 p.m. OK Java 21 TESTS 15 530 82944000
254193128 venom246800 C2 March 30, 2024, 5:20 p.m. OK Java 21 TESTS 15 545 4505600
254186757 kritikmodi C2 March 30, 2024, 4:59 p.m. OK Java 21 TESTS 15 545 12083200
254203819 warks C2 March 30, 2024, 6:35 p.m. OK Java 21 TESTS 15 608 16691200
254204638 justinalmazan477 C2 March 30, 2024, 6:40 p.m. OK Java 21 TESTS 15 748 819200
254222863 Pre_L C2 March 30, 2024, 10:10 p.m. OK Java 8 TESTS 15 171 0
254205194 kasiru_69 C2 March 30, 2024, 6:44 p.m. OK Java 8 TESTS 15 295 12288000
254191347 tirthgohil1410 C2 March 30, 2024, 5:14 p.m. OK Java 8 TESTS 15 296 15257600
254185044 formidablechief27 C2 March 30, 2024, 4:53 p.m. OK Java 8 TESTS 15 296 80588800
254205286 kasiru_69 C2 March 30, 2024, 6:45 p.m. OK Java 8 TESTS 15 311 12390400
254204321 PlayDate C2 March 30, 2024, 6:38 p.m. OK Java 8 TESTS 15 498 4812800
254194791 KAITOkun C2 March 30, 2024, 5:25 p.m. OK Java 8 TESTS 15 529 4915200
254185474 Hammad1.2 C2 March 30, 2024, 4:55 p.m. OK Java 8 TESTS 15 560 5017600
254195749 MdAnas6757 C2 March 30, 2024, 5:28 p.m. OK Java 8 TESTS 15 561 4915200
254196558 manekshaw.rifles C2 March 30, 2024, 5:30 p.m. OK Kotlin 1.9 TESTS 15 529 1433600
254192852 aayush.mishra C2 March 30, 2024, 5:19 p.m. OK Kotlin 1.9 TESTS 15 530 1433600
254202982 ahtoh_ C2 March 30, 2024, 6:29 p.m. OK Node.js TESTS 15 218 35020800
254202731 OLOGY C2 March 30, 2024, 6:28 p.m. OK PyPy 2 TESTS 15 529 13516800
254212021 Sparkle_Twilight C2 March 30, 2024, 7:50 p.m. OK PyPy 3 TESTS 15 670 19046400
254211978 bboo_123 C2 March 30, 2024, 7:49 p.m. OK PyPy 3 TESTS 15 670 19046400
254191397 Kefrov C2 March 30, 2024, 5:14 p.m. OK PyPy 3 TESTS 15 686 19456000
254194954 dnzc C2 March 30, 2024, 5:25 p.m. OK PyPy 3 TESTS 15 748 20377600
254186611 Y_LX C2 March 30, 2024, 4:58 p.m. OK PyPy 3 TESTS 15 764 19148800
254234489 TJacobus C2 March 31, 2024, 2:16 a.m. OK PyPy 3-64 TESTS 15 187 29696000
254208721 vedantmishra69 C2 March 30, 2024, 7:16 p.m. OK PyPy 3-64 TESTS 15 187 29900800
254188572 a1s2d3w2 C2 March 30, 2024, 5:05 p.m. OK PyPy 3-64 TESTS 15 202 22528000
254198220 Yashraj_Prasad C2 March 30, 2024, 5:34 p.m. OK PyPy 3-64 TESTS 15 202 25292800
254194832 nonam33 C2 March 30, 2024, 5:25 p.m. OK PyPy 3-64 TESTS 15 202 28262400
254223786 Hossam_Hassan_Taher C2 March 30, 2024, 10:27 p.m. OK PyPy 3-64 TESTS 15 202 28672000
254223186 MaxValgen_ C2 March 30, 2024, 10:16 p.m. OK PyPy 3-64 TESTS 15 202 28672000
254217792 athvasingh34568 C2 March 30, 2024, 8:55 p.m. OK PyPy 3-64 TESTS 15 217 29491200
254189331 34z12000 C2 March 30, 2024, 5:07 p.m. OK PyPy 3-64 TESTS 15 217 29798400
254207959 Osprey_8535 C2 March 30, 2024, 7:08 p.m. OK PyPy 3-64 TESTS 15 217 32563200
254206434 OLOGY C2 March 30, 2024, 6:55 p.m. OK Python 2 TESTS 15 265 12902400
254206722 OLOGY C2 March 30, 2024, 6:57 p.m. OK Python 2 TESTS 15 312 12902400
254203017 OLOGY C2 March 30, 2024, 6:29 p.m. OK Python 2 TESTS 15 358 13004800
254185040 Codness50 C2 March 30, 2024, 4:53 p.m. OK Python 3 TESTS 15 296 29081600
254197911 pawank21 C2 March 30, 2024, 5:34 p.m. OK Python 3 TESTS 15 311 28160000
254194818 gunda_hu_main C2 March 30, 2024, 5:25 p.m. OK Python 3 TESTS 15 326 27136000
254196563 danianmercado C2 March 30, 2024, 5:30 p.m. OK Python 3 TESTS 15 327 27136000
254193791 NGPNAN C2 March 30, 2024, 5:22 p.m. OK Python 3 TESTS 15 327 28160000
254195005 SDUFE_ACM C2 March 30, 2024, 5:26 p.m. OK Python 3 TESTS 15 373 28160000
254194401 prafull904434 C2 March 30, 2024, 5:24 p.m. OK Python 3 TESTS 15 404 27136000
254195792 avengers2405 C2 March 30, 2024, 5:28 p.m. OK Python 3 TESTS 15 577 35123200
254194347 TonyStark_000 C2 March 30, 2024, 5:23 p.m. OK Ruby 3 TESTS 15 639 29696000
254210799 paugh00001 C2 March 30, 2024, 7:37 p.m. OK Rust 2021 TESTS 15 93 7884800

remove filters

Back to search problems