Codeforces Round 936 (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
1946 Codeforces Round 936 (Div. 2) FINISHED False 7200 26061863 March 22, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1041 ) F Nobody is needed PROGRAMMING brute force data structures dp math number theory

B"Oleg received a permutation a of length n as a birthday present. Oleg's friend Nechipor asks Oleg q questions, each question is characterized by two numbers l and r , in response to the question Oleg must say the number of sets of indices (t_1, t_2, ldots, t_k) of any length k ge 1 such that: Help Oleg and answer all of Nechipor's questions. Each test consists of several sets of input data. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of sets of input data. The description of the sets of input data follows. The first line of each set of input data contains two integers n and q ( 1 <= n, q <= 10^6 ) -- the length of the permutation and the number of Nechipor's questions. The second line of each set of input data contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= n ) -- the permutation a itself. In each of the next q lines of each set of input data, there are two integers l and r ( 1 <= l <= r <= n ) -- the next question of Nechipor. It is guaranteed that the sum of the values of n and the sum of the values of q over all test cases does not exceed 10^6 . For each set of input data, output the answers to all of Nechipor's questions. All suitable arrays in the first set of input data: ( 1 ), ( 2 ), ( 3 ), ( 4 ), ( 5 ), ( 6 ), ( 7 ), ( 8 ), ( 1, 3 ), ( 1, 6 ), ( 1, 7 ), ( 1, 6, 7 ), ( 2, 3 ), ( 2, 4 ), ( 2, 5 ), ( 2, 6 ), ( 2, 7 ), ( 2, 8 ), ( 2, 6, 7 ), ( 6, 7 ). All suitable arrays in the fourth set of input data: ( 1 ), ( 2 ), ( 3 ), ( 4 ), ( 5 ), ( 6 ), ( 7 ), ( 8 ), ( 1, 2 ), ( 1, 3 ), ( 1, 4 ), ( 1, 5 ), ( 1, 6 ), ( 1, 7 ), ( 1, 8 ), ( 1, 2, 4 ), ( 1, 2, 6 ), ( 1, 2, 8 ), ( 1, 2, 4, 8 ), ( 1, 3, 6 ), ( 1, 4, 8 ), "...

Tutorials

Codeforces Round #936 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
252869058 ImmortaLimit F March 23, 2024, 5:46 a.m. OK C++14 (GCC 6-32) TESTS 31 2573 92979200
252868860 ImmortaLimit F March 23, 2024, 5:44 a.m. OK C++14 (GCC 6-32) TESTS 31 2932 96972800
252869548 ImmortaLimit F March 23, 2024, 5:50 a.m. OK C++14 (GCC 6-32) TESTS 31 3181 97075200
252869502 ImmortaLimit F March 23, 2024, 5:50 a.m. OK C++14 (GCC 6-32) TESTS 31 3416 97075200
252842956 pengyantong F March 22, 2024, 11:16 p.m. OK C++14 (GCC 6-32) TESTS 31 4507 84992000
252867608 ImmortaLimit F March 23, 2024, 5:35 a.m. OK C++14 (GCC 6-32) TESTS 31 4741 117043200
252860502 chasedeath F March 23, 2024, 4:13 a.m. OK C++17 (GCC 7-32) TESTS 31 2199 50483200
252860542 chasedeath F March 23, 2024, 4:14 a.m. OK C++17 (GCC 7-32) TESTS 31 2230 50483200
252820943 ywjylx F March 22, 2024, 6:40 p.m. OK C++17 (GCC 7-32) TESTS 31 2448 56320000
252811107 Sxy_Limit F March 22, 2024, 5:24 p.m. OK C++17 (GCC 7-32) TESTS 31 2620 92979200
252830677 h_squared F March 22, 2024, 8:22 p.m. OK C++17 (GCC 7-32) TESTS 31 2667 198963200
252825582 youssef_hany F March 22, 2024, 7:28 p.m. OK C++17 (GCC 7-32) TESTS 31 2698 60416000
252815072 Alpha_Q F March 22, 2024, 5:49 p.m. OK C++17 (GCC 7-32) TESTS 31 2714 60723200
252853548 joww F March 23, 2024, 2:40 a.m. OK C++17 (GCC 7-32) TESTS 31 2932 56422400
252846601 Junz_LJL F March 23, 2024, 12:31 a.m. OK C++17 (GCC 7-32) TESTS 31 2978 60416000
252854690 adibur6 F March 23, 2024, 2:58 a.m. OK C++17 (GCC 7-32) TESTS 31 2979 60416000
252849082 zdc123456 F March 23, 2024, 1:24 a.m. OK C++20 (GCC 13-64) TESTS 31 1980 73318400
252836477 irri F March 22, 2024, 9:29 p.m. OK C++20 (GCC 13-64) TESTS 31 2121 72192000
252823042 kotatsugame F March 22, 2024, 7:02 p.m. OK C++20 (GCC 13-64) TESTS 31 2340 182374400
252835198 OLOGY F March 22, 2024, 9:13 p.m. OK C++20 (GCC 13-64) TESTS 31 2432 75366400
252824307 Yuvraj_2004 F March 22, 2024, 7:15 p.m. OK C++20 (GCC 13-64) TESTS 31 2449 80691200
252835744 ibrahimwq F March 22, 2024, 9:19 p.m. OK C++20 (GCC 13-64) TESTS 31 2495 75366400
252809493 dreamoon_love_AA F March 22, 2024, 5:18 p.m. OK C++20 (GCC 13-64) TESTS 31 2511 53350400
252843072 Intellegent F March 22, 2024, 11:18 p.m. OK C++20 (GCC 13-64) TESTS 31 2557 188723200
252815885 Nika_Tamliani F March 22, 2024, 5:55 p.m. OK C++20 (GCC 13-64) TESTS 31 2620 94822400
252822603 USYDLDH F March 22, 2024, 6:57 p.m. OK C++20 (GCC 13-64) TESTS 31 2636 76185600
252842013 dzhi F March 22, 2024, 10:56 p.m. OK Java 21 TESTS 31 3962 269516800
252845006 dzhi F March 22, 2024, 11:57 p.m. OK Java 21 TESTS 31 3977 274944000
252843281 dzhi F March 22, 2024, 11:23 p.m. OK Java 21 TESTS 31 4102 246272000
252850347 sansen F March 23, 2024, 1:49 a.m. OK Rust 2021 TESTS 31 2324 160358400
252843329 n685 F March 22, 2024, 11:24 p.m. OK Rust 2021 TESTS 31 2979 133120000
252801566 ngtkana F March 22, 2024, 4:22 p.m. OK Rust 2021 TESTS 31 4336 313958400

remove filters

Back to search problems