Codeforces Round 878 (Div. 3)

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
1840 Codeforces Round 878 (Div. 3) FINISHED False 8100 51204263 June 6, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29877 ) C Ski Resort PROGRAMMING combinatorics math two pointers

B'Dima Vatrushin is a math teacher at school. He was sent on vacation for n days for his good work. Dima has long dreamed of going to a ski resort, so he wants to allocate several consecutive days and go skiing. Since the vacation requires careful preparation, he will only go for at least k days. You are given an array a containing the weather forecast at the resort. That is, on the i -th day, the temperature will be a_i degrees. Dima was born in Siberia, so he can go on vacation only if the temperature does not rise above q degrees throughout the vacation. Unfortunately, Dima was so absorbed in abstract algebra that he forgot how to count. He asks you to help him and count the number of ways to choose vacation dates at the resort. The first line of the input contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then follow the descriptions of the test cases. The first line of each test case contains three integers n , k , q ( 1 <= n <= 2 cdot 10^5 , 1 <= k <= n , -10^9 <= q <= 10^9 ) -- the length of the array a , the minimum number of days at the resort, and the maximum comfortable temperature for Dima. The second line of each test case contains n integers a_1, a_2, a_3, ... , a_n ( -10^9 <= a_i <= 10^9 ) -- the temperature at the ski resort. The sum of all n values over all test cases does not exceed 2 cdot 10^5 . Output t integers, each of which is the answer to the corresponding test case -- the number of ways for Dima to choose vacation dates at the resort. In the first test case of the example, Dima can go on any day, so the suitable dates for him are [1], [2], [3], [1, 2], [2, 3], [1, 2, 3]. In the second and fourth test cases of the example, Dima cannot go on any day due to the high temperature, so there are no suitable dates. In the third test case of the example, Dima can only go on the dates [1, 2, '...

Tutorials

Codeforces Round #878 (Div.3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
208844976 bluemegane C June 7, 2023, 2:29 a.m. OK C# 8 TESTS 6 108 17817600
208845105 bluemegane C June 7, 2023, 2:32 a.m. OK C# 8 TESTS 6 139 17817600
208842961 Dhru008 C June 7, 2023, 1:44 a.m. OK C# 8 TESTS 6 139 18227200
208856457 Sponge__Bob C June 7, 2023, 5:42 a.m. OK Clang++20 Diagnostics TESTS 6 966 1024000
208833479 NenadDapic C June 6, 2023, 8:35 p.m. OK FPC TESTS 6 62 102400
208816731 iffatul_anon C June 6, 2023, 5:14 p.m. OK GNU C11 TESTS 6 46 0
208851752 swayingdream C June 7, 2023, 4:30 a.m. OK GNU C11 TESTS 6 46 819200
208828602 akmeena22 C June 6, 2023, 7:11 p.m. OK GNU C11 TESTS 6 46 2355200
208838177 prattay56 C June 6, 2023, 10:47 p.m. OK GNU C11 TESTS 6 61 409600
208843169 SuperSunShine C June 7, 2023, 1:49 a.m. OK GNU C11 TESTS 6 62 0
208829681 rishit164 C June 6, 2023, 7:28 p.m. OK GNU C11 TESTS 6 62 819200
208815224 Ashwin45 C June 6, 2023, 5:05 p.m. OK GNU C11 TESTS 6 62 2355200
208825254 dragonballwassim01 C June 6, 2023, 6:29 p.m. OK GNU C++14 TESTS 6 46 0
208814907 Fedbxy C June 6, 2023, 5:03 p.m. OK GNU C++14 TESTS 6 46 102400
208814793 Aditya__003 C June 6, 2023, 5:02 p.m. OK GNU C++14 TESTS 6 46 409600
208851174 kkkkkkkit0 C June 7, 2023, 4:20 a.m. OK GNU C++14 TESTS 6 46 409600
208832048 vinayak-0206 C June 6, 2023, 8:07 p.m. OK GNU C++14 TESTS 6 46 409600
208842819 switch_GG C June 7, 2023, 1:41 a.m. OK GNU C++14 TESTS 6 46 819200
208842455 seekluna C June 7, 2023, 1:31 a.m. OK GNU C++14 TESTS 6 46 819200
208828350 sm343 C June 6, 2023, 7:07 p.m. OK GNU C++14 TESTS 6 46 819200
208827459 ArpCoder C June 6, 2023, 6:55 p.m. OK GNU C++14 TESTS 6 46 819200
208838522 og_abryel C June 6, 2023, 11:01 p.m. OK GNU C++14 TESTS 6 46 1638400
208812384 Sherif804 C June 6, 2023, 4:52 p.m. OK GNU C++17 TESTS 6 46 0
208852238 Tanzim_bn C June 7, 2023, 4:38 a.m. OK GNU C++17 TESTS 6 46 0
208843634 Alpaca00 C June 7, 2023, 2:01 a.m. OK GNU C++17 TESTS 6 46 0
208816415 hem2022 C June 6, 2023, 5:12 p.m. OK GNU C++17 TESTS 6 46 102400
208826357 Faangsexual C June 6, 2023, 6:41 p.m. OK GNU C++17 TESTS 6 46 102400
208836360 mohamedhamdy4490 C June 6, 2023, 9:47 p.m. OK GNU C++17 TESTS 6 46 102400
208837887 Cyoan C June 6, 2023, 10:37 p.m. OK GNU C++17 TESTS 6 46 204800
208855669 Scano C June 7, 2023, 5:31 a.m. OK GNU C++17 TESTS 6 46 409600
208856325 yeerxiaoqi C June 7, 2023, 5:40 a.m. OK GNU C++17 TESTS 6 46 409600
208855087 Klaza C June 7, 2023, 5:22 a.m. OK GNU C++17 TESTS 6 46 409600
208824395 Linoed C June 6, 2023, 6:19 p.m. OK GNU C++17 (64) TESTS 6 30 819200
208852744 mentgreen10 C June 7, 2023, 4:46 a.m. OK GNU C++17 (64) TESTS 6 31 0
208813268 Noman_Amin C June 6, 2023, 4:55 p.m. OK GNU C++17 (64) TESTS 6 31 819200
208841123 MaGnsi0 C June 7, 2023, 12:50 a.m. OK GNU C++17 (64) TESTS 6 31 819200
208820145 Mo7amed_Hossam C June 6, 2023, 5:39 p.m. OK GNU C++17 (64) TESTS 6 31 819200
208815580 AKSingh29 C June 6, 2023, 5:07 p.m. OK GNU C++17 (64) TESTS 6 31 819200
208828046 Mohit. C June 6, 2023, 7:03 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
208848911 2000030068 C June 7, 2023, 3:42 a.m. OK GNU C++17 (64) TESTS 6 31 1638400
208829130 The5threich C June 6, 2023, 7:20 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
208817309 timeRise C June 6, 2023, 5:17 p.m. OK GNU C++17 (64) TESTS 6 31 1638400
208834723 Satoru C June 6, 2023, 9:03 p.m. OK GNU C++20 (64) TESTS 6 15 0
208841196 __-Anuj__Kumar-__ C June 7, 2023, 12:53 a.m. OK GNU C++20 (64) TESTS 6 15 1638400
208836678 Elglaly C June 6, 2023, 9:58 p.m. OK GNU C++20 (64) TESTS 6 15 1638400
208840937 Vionia C June 7, 2023, 12:43 a.m. OK GNU C++20 (64) TESTS 6 15 16076800
208834470 Hillers C June 6, 2023, 8:57 p.m. OK GNU C++20 (64) TESTS 6 30 0
208816859 NahidRiaj C June 6, 2023, 5:14 p.m. OK GNU C++20 (64) TESTS 6 30 819200
208842215 CrowdedTunic8 C June 7, 2023, 1:25 a.m. OK GNU C++20 (64) TESTS 6 30 819200
208820290 JustAGhost23 C June 6, 2023, 5:40 p.m. OK GNU C++20 (64) TESTS 6 30 1638400
208846632 1024M C June 7, 2023, 3:02 a.m. OK GNU C++20 (64) TESTS 6 30 1638400
208855556 trialid1 C June 7, 2023, 5:29 a.m. OK GNU C++20 (64) TESTS 6 30 1638400
208819020 ayane C June 6, 2023, 5:30 p.m. OK Go TESTS 6 109 3072000
208843173 cck111 C June 7, 2023, 1:49 a.m. OK Go TESTS 6 109 4403200
208851495 QianCCC C June 7, 2023, 4:25 a.m. OK Java 11 TESTS 6 187 0
208837619 profchi C June 6, 2023, 10:29 p.m. OK Java 11 TESTS 6 187 0
208816302 XIN C June 6, 2023, 5:11 p.m. OK Java 11 TESTS 6 202 0
208819028 faresbadr316 C June 6, 2023, 5:30 p.m. OK Java 11 TESTS 6 218 0
208854983 Samay_Patel C June 7, 2023, 5:21 a.m. OK Java 11 TESTS 6 233 0
208843499 Un_sung C June 7, 2023, 1:57 a.m. OK Java 11 TESTS 6 234 0
208814190 piyush_16 C June 6, 2023, 4:59 p.m. OK Java 11 TESTS 6 248 3379200
208812981 jineshpatel_1103 C June 6, 2023, 4:54 p.m. OK Java 11 TESTS 6 249 0
208850551 achal5623 C June 7, 2023, 4:10 a.m. OK Java 11 TESTS 6 421 0
208853767 Dake04 C June 7, 2023, 5:02 a.m. OK Java 11 TESTS 6 436 0
208854111 not_just_rr C June 7, 2023, 5:08 a.m. OK Java 17 TESTS 6 186 819200
208817836 SuprHUlk C June 6, 2023, 5:21 p.m. OK Java 17 TESTS 6 202 102400
208840726 michaelc592 C June 7, 2023, 12:35 a.m. OK Java 17 TESTS 6 217 0
208846941 kkz666 C June 7, 2023, 3:07 a.m. OK Java 17 TESTS 6 217 307200
208829567 Imatomic C June 6, 2023, 7:26 p.m. OK Java 17 TESTS 6 218 512000
208825742 Sumitsingh7 C June 6, 2023, 6:34 p.m. OK Java 17 TESTS 6 249 8806400
208846549 Asnkkzk C June 7, 2023, 3 a.m. OK Java 17 TESTS 6 265 409600
208814673 quantummaniac609 C June 6, 2023, 5:02 p.m. OK Java 17 TESTS 6 265 716800
208847552 max. C June 7, 2023, 3:18 a.m. OK Java 17 TESTS 6 467 614400
208857662 piyushaggarwal20903 C June 7, 2023, 5:59 a.m. OK Java 17 TESTS 6 467 819200
208824700 Asee C June 6, 2023, 6:22 p.m. OK Java 8 TESTS 6 124 0
208817414 raj_shahh C June 6, 2023, 5:18 p.m. OK Java 8 TESTS 6 140 38297600
208852730 jkslyk C June 7, 2023, 4:45 a.m. OK Java 8 TESTS 6 155 0
208831599 OmarRoka29 C June 6, 2023, 7:59 p.m. OK Java 8 TESTS 6 155 0
208847003 bleach__ C June 7, 2023, 3:08 a.m. OK Java 8 TESTS 6 186 11878400
208823429 Yajat_2021366 C June 6, 2023, 6:10 p.m. OK Java 8 TESTS 6 343 0
208848403 Mmm_D C June 7, 2023, 3:33 a.m. OK Java 8 TESTS 6 358 0
208827173 Toosid C June 6, 2023, 6:51 p.m. OK Java 8 TESTS 6 358 0
208832299 Abhishek.B C June 6, 2023, 8:11 p.m. OK Java 8 TESTS 6 373 0
208855524 zeus_3101 C June 7, 2023, 5:28 a.m. OK Java 8 TESTS 6 374 0
208852897 Hakiobo C June 7, 2023, 4:48 a.m. OK Kotlin 1.7 TESTS 6 358 2355200
208840847 stillnotyet C June 7, 2023, 12:40 a.m. OK Kotlin 1.7 TESTS 6 530 42700800
208811298 payal_27 C June 6, 2023, 4:49 p.m. OK MS C++ 2017 TESTS 6 171 819200
208817647 Venkatesh_jyothula C June 6, 2023, 5:20 p.m. OK MS C++ 2017 TESTS 6 187 1433600
208823496 viku_76429 C June 6, 2023, 6:10 p.m. OK MS C++ 2017 TESTS 6 202 819200
208845138 hefney C June 7, 2023, 2:32 a.m. OK MS C++ 2017 TESTS 6 202 2560000
208855835 Anuvrat_Verma C June 7, 2023, 5:33 a.m. OK MS C++ 2017 TESTS 6 218 2662400
208830409 abeast_1651 C June 6, 2023, 7:39 p.m. OK PyPy 3 TESTS 6 342 13926400
208837640 TimMak C June 6, 2023, 10:29 p.m. OK PyPy 3 TESTS 6 358 13619200
208812289 Nastya_An C June 6, 2023, 4:52 p.m. OK PyPy 3 TESTS 6 358 13824000
208851723 kuanc C June 7, 2023, 4:29 a.m. OK PyPy 3 TESTS 6 358 16179200
208834518 LazyRGuy C June 6, 2023, 8:58 p.m. OK PyPy 3 TESTS 6 374 13824000
208819722 mohak_k C June 6, 2023, 5:36 p.m. OK PyPy 3 TESTS 6 389 12390400
208853584 Ganeev18 C June 7, 2023, 4:59 a.m. OK PyPy 3 TESTS 6 389 13926400
208820097 mohak_k C June 6, 2023, 5:39 p.m. OK PyPy 3 TESTS 6 436 12492800
208826550 Mustela_Erminea C June 6, 2023, 6:44 p.m. OK PyPy 3-64 TESTS 6 93 15872000
208822168 gardengnome C June 6, 2023, 5:57 p.m. OK PyPy 3-64 TESTS 6 108 16179200
208833692 Michael_V C June 6, 2023, 8:40 p.m. OK PyPy 3-64 TESTS 6 108 16588800
208823826 damya C June 6, 2023, 6:14 p.m. OK PyPy 3-64 TESTS 6 108 16998400
208848157 dxulet C June 7, 2023, 3:28 a.m. OK PyPy 3-64 TESTS 6 109 17100800
208817880 kd_kdzu8 C June 6, 2023, 5:21 p.m. OK PyPy 3-64 TESTS 6 124 16998400
208837866 Khaild_Salman C June 6, 2023, 10:36 p.m. OK PyPy 3-64 TESTS 6 124 22835200
208828132 reijnnn C June 6, 2023, 7:04 p.m. OK PyPy 3-64 TESTS 6 139 15974400
208838979 noob_at_programming C June 6, 2023, 11:20 p.m. OK PyPy 3-64 TESTS 6 139 17408000
208815637 flexr C June 6, 2023, 5:07 p.m. OK PyPy 3-64 TESTS 6 140 14745600
208819434 alex_777 C June 6, 2023, 5:33 p.m. OK Python 3 TESTS 6 108 16998400
208820031 mxst3r C June 6, 2023, 5:38 p.m. OK Python 3 TESTS 6 108 17817600
208854079 ismoilmirzouz C June 7, 2023, 5:07 a.m. OK Python 3 TESTS 6 109 18432000
208814970 eugalt C June 6, 2023, 5:03 p.m. OK Python 3 TESTS 6 124 10752000
208828407 shreyanshjaiswal143 C June 6, 2023, 7:08 p.m. OK Python 3 TESTS 6 124 14950400
208837627 kartikeshwar C June 6, 2023, 10:29 p.m. OK Python 3 TESTS 6 124 18227200
208829280 buts C June 6, 2023, 7:22 p.m. OK Python 3 TESTS 6 124 18227200
208826992 HumourouSaint C June 6, 2023, 6:49 p.m. OK Python 3 TESTS 6 124 18432000
208817922 altynbekamirzhanov C June 6, 2023, 5:21 p.m. OK Python 3 TESTS 6 139 18022400
208857269 ashwini_b1 C June 7, 2023, 5:53 a.m. OK Python 3 TESTS 6 139 18432000
208824578 matheusdacach C June 6, 2023, 6:21 p.m. OK Rust 2021 TESTS 6 124 15360000

remove filters

Back to search problems