Codeforces Round 932 (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
1935 Codeforces Round 932 (Div. 2) FINISHED False 7200 27530663 March 5, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8539 ) D Exam in MAC PROGRAMMING binary search combinatorics math

B"The Master's Assistance Center has announced an entrance exam, which consists of the following. The candidate is given a set s of size n and some strange integer c . For this set, it is needed to calculate the number of pairs of integers (x, y) such that 0 <= q x <= q y <= q c , x + y is not contained in the set s , and also y - x is not contained in the set s . Your friend wants to enter the Center. Help him pass the exam! Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 2 cdot 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and c ( 1 <= q n <= q 3 cdot 10^5 , 1 <= q c <= q 10^9 ) -- the size of the set and the strange integer. The second line of each test case contains n integers s_1, s_2, ldots, s_{n} ( 0 <= q s_1 < s_2 < ldots < s_{n} <= q c ) -- the elements of the set s . It is guaranteed that the sum of n over all test cases does not exceed 3 cdot 10^5 . For each test case, output a single integer -- the number of suitable pairs of integers. In the first test case, the following pairs are suitable: (0, 0) , (2, 2) , (3, 3) . In the third test case, the following pairs are suitable: (0, 1) , (0, 2) , (0, 4) , (1, 3) , (2, 6) , (3, 4) , (3, 5) , (4, 5) , (4, 6) , (5, 6) . "...

Tutorials

Codeforces Round #932 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
249834769 AutumnMist D March 5, 2024, 5:09 p.m. OK C# 10 TESTS 19 124 41472000
249881887 AutumnMist D March 6, 2024, 3:39 a.m. OK C# 10 TESTS 19 202 33075200
249835467 3151301111 D March 5, 2024, 5:12 p.m. OK C++17 (GCC 7-32) TESTS 19 78 1228800
249877055 jican000 D March 6, 2024, 2:08 a.m. OK C++17 (GCC 7-32) TESTS 19 93 0
249829358 h_f_ctw D March 5, 2024, 4:32 p.m. OK C++17 (GCC 7-32) TESTS 19 93 0
249828762 waiittt D March 5, 2024, 4:31 p.m. OK C++17 (GCC 7-32) TESTS 19 93 0
249889441 mayukh03 D March 6, 2024, 5:29 a.m. OK C++17 (GCC 7-32) TESTS 19 93 1228800
249885420 jainzzz D March 6, 2024, 4:37 a.m. OK C++17 (GCC 7-32) TESTS 19 93 1228800
249880843 cabron111 D March 6, 2024, 3:22 a.m. OK C++17 (GCC 7-32) TESTS 19 93 1228800
249880795 Ruanyy D March 6, 2024, 3:21 a.m. OK C++17 (GCC 7-32) TESTS 19 93 1228800
249877287 ArsNova D March 6, 2024, 2:13 a.m. OK C++17 (GCC 7-32) TESTS 19 93 1228800
249866395 MZFMLLJMPAJDAG D March 5, 2024, 9:46 p.m. OK C++17 (GCC 7-32) TESTS 19 93 1228800
249881979 xu826281112 D March 6, 2024, 3:41 a.m. OK C++17 (GCC 9-64) TESTS 19 15 8192000
249877756 CodeChild D March 6, 2024, 2:23 a.m. OK C++17 (GCC 9-64) TESTS 19 46 0
249835958 wxgmjfhy D March 5, 2024, 5:14 p.m. OK C++17 (GCC 9-64) TESTS 19 61 0
249845849 prakhar2704 D March 5, 2024, 6:16 p.m. OK C++17 (GCC 9-64) TESTS 19 61 2355200
249827977 Prajak013 D March 5, 2024, 4:29 p.m. OK C++17 (GCC 9-64) TESTS 19 61 2355200
249880991 LAODIE D March 6, 2024, 3:25 a.m. OK C++17 (GCC 9-64) TESTS 19 61 2457600
249880962 SGColin D March 6, 2024, 3:24 a.m. OK C++17 (GCC 9-64) TESTS 19 62 0
249875811 Winding. D March 6, 2024, 1:39 a.m. OK C++17 (GCC 9-64) TESTS 19 62 0
249853644 Remilia1023 D March 5, 2024, 7:18 p.m. OK C++17 (GCC 9-64) TESTS 19 62 0
249872970 liyishui_2003 D March 6, 2024, 12:25 a.m. OK C++17 (GCC 9-64) TESTS 19 62 1228800
249880192 ZrjaK D March 6, 2024, 3:10 a.m. OK C++20 (GCC 11-64) TESTS 19 30 2662400
249890312 amit_nehra D March 6, 2024, 5:39 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249887008 Siddardha.N D March 6, 2024, 4:57 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249886643 luo233 D March 6, 2024, 4:53 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249884271 magma110 D March 6, 2024, 4:19 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249880727 Kyzer1de D March 6, 2024, 3:20 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249879425 DinosaurSlayer D March 6, 2024, 2:56 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249877009 Rosmontis_L D March 6, 2024, 2:06 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249876695 coldwind9029 D March 6, 2024, 1:59 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0
249874726 JhoZzel_ D March 6, 2024, 1:13 a.m. OK C++20 (GCC 11-64) TESTS 19 46 0

remove filters

Back to search problems