Codeforces Round 960 (Div. 2)

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
1990 Codeforces Round 960 (Div. 2) FINISHED False 7200 15693863 July 20, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 315 ) F Polygonal Segments PROGRAMMING data structures geometry two pointers

B'You are given an array a of size n . A segment [l, r](1 <= l < r <= n) is called a polygonal segment only if the following conditions hold: Process q queries of two types: The first line contains an integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. For each test case: It is guaranteed that the sum of n over all test cases will not exceed 2 cdot 10^5 , and the sum of q over all test cases will not exceed 10^5 . For each query, if there is no suitable segment, output -1 in a new line. Otherwise, output the length of the longest segment satisfying the condition above in a new line. In the first query of the first test case, there is no polygonal segment under the given condition. For example, considering segment [1,3] , you can not form a triangle with side lengths of a_1=3 , a_2=1 , and a_3=2 . In the second query of the first test case, the longest polygonal segment is [1,4] . You can form a quadrilateral with side lengths of a_1=3 , a_2=1 , a_3=2 , and a_4=2 . '...

Tutorials

Video Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
271644705 erray F July 20, 2024, 5:55 p.m. OK C++17 (GCC 7-32) TESTS 41 1015 445235200
271671811 daubi F July 20, 2024, 9:41 p.m. OK C++17 (GCC 7-32) TESTS 41 2030 93593600
271644348 sammyuri F July 20, 2024, 5:53 p.m. OK C++17 (GCC 7-32) TESTS 41 2281 25088000
271651994 myst-6 F July 20, 2024, 6:44 p.m. OK C++17 (GCC 7-32) TESTS 41 2843 52224000
271684955 Sparkle_Twilight F July 21, 2024, 2:15 a.m. OK C++17 (GCC 7-32) TESTS 41 3077 522649600
271648767 DimmyT F July 20, 2024, 6:19 p.m. OK C++17 (GCC 7-32) TESTS 41 3187 100044800
271653114 celin F July 20, 2024, 6:55 p.m. OK C++17 (GCC 7-32) TESTS 41 3999 122777600
271652597 celin F July 20, 2024, 6:50 p.m. OK C++17 (GCC 7-32) TESTS 41 4093 185651200
271644479 erray F July 20, 2024, 5:54 p.m. OK C++17 (GCC 7-32) TESTS 41 4562 325017600
271643682 erray F July 20, 2024, 5:50 p.m. OK C++17 (GCC 7-32) TESTS 41 4656 515174400
271672866 Laboratory F July 20, 2024, 10:01 p.m. OK C++20 (GCC 13-64) TESTS 41 1124 16896000
271688099 Rubikun F July 21, 2024, 3:01 a.m. OK C++20 (GCC 13-64) TESTS 41 1905 90931200
271684407 ikaurov F July 21, 2024, 2:06 a.m. OK C++20 (GCC 13-64) TESTS 41 1953 522752000
271701106 PurpleCrayon F July 21, 2024, 5:48 a.m. OK C++20 (GCC 13-64) TESTS 41 1984 145100800
271697929 GALA F July 21, 2024, 5:12 a.m. OK C++20 (GCC 13-64) TESTS 41 2140 101683200
271680387 superyijin_txdy F July 21, 2024, 12:55 a.m. OK C++20 (GCC 13-64) TESTS 41 2140 136601600
271666933 244mhq F July 20, 2024, 8:34 p.m. OK C++20 (GCC 13-64) TESTS 41 2218 206950400
271699210 propane F July 21, 2024, 5:27 a.m. OK C++20 (GCC 13-64) TESTS 41 2389 104243200
271663763 NimaAryan F July 20, 2024, 7:59 p.m. OK C++20 (GCC 13-64) TESTS 41 2499 97382400
271640852 BurnedChicken F July 20, 2024, 5:39 p.m. OK C++20 (GCC 13-64) TESTS 41 2796 159027200

remove filters

Back to search problems