VK Cup 2022 - Отборочный раунд (Engine)

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
1781 VK Cup 2022 - Отборочный раунд (Engine) FINISHED False 10800 58038899 Jan. 15, 2023, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13579 ) B Going to the Cinema PROGRAMMING binary search math sortings two pointers

B'A company of n people is planning a visit to the cinema. Every person can either go to the cinema or not. That depends on how many other people will go. Specifically, every person i said: "I want to go to the cinema if and only if at least a_i other people will go, not counting myself". That means that person i will become sad if: In how many ways can a set of people going to the cinema be chosen so that nobody becomes sad? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). The description of the test cases follows. Each test case consists of two lines. The first line contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of people in the company. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= a_i <= n - 1 ) -- integers from peoples ' claims. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print a single integer -- the number of different ways to choose a set of people going to the cinema so that nobody becomes sad. In the first test case, both people want to go to the cinema if and only if the other person goes. There are two valid options: either both people go, or neither of them goes. However, if just one of them goes, both will be sad. In the second test case, everyone has to go to the cinema. In any other case, someone will be sad. In the third test case, there are three valid options: person number 2 goes to the cinema; or persons with indices 2, 3, 4, 7 go; or all eight people go. '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
189325532 Gassa B Jan. 15, 2023, 12:55 p.m. OK D TESTS 20 109 13516800
189397607 Akash_Ahmed B Jan. 16, 2023, 5:13 a.m. OK GNU C++14 TESTS 21 62 819200
189393409 YeahPotato B Jan. 16, 2023, 3:45 a.m. OK GNU C++14 TESTS 21 62 819200
189388021 pbms_fev B Jan. 16, 2023, 1:29 a.m. OK GNU C++14 TESTS 21 62 819200
189312296 Igor_Parfenov B Jan. 15, 2023, 12:18 p.m. OK GNU C++14 TESTS 20 62 819200
189310908 awoo B Jan. 15, 2023, 12:15 p.m. OK GNU C++14 TESTS 20 62 819200
189310459 TeaPot B Jan. 15, 2023, 12:15 p.m. OK GNU C++14 TESTS 20 62 819200
189386297 sprads B Jan. 16, 2023, 12:19 a.m. OK GNU C++14 TESTS 21 62 1228800
189385857 cqbzhfxzj B Jan. 16, 2023, midnight OK GNU C++14 TESTS 21 62 1638400
189387985 pbms_fev B Jan. 16, 2023, 1:28 a.m. OK GNU C++14 TESTS 21 78 819200
189394733 bnl_orb B Jan. 16, 2023, 4:12 a.m. OK GNU C++14 TESTS 21 249 1638400
189312209 little_misfortune B Jan. 15, 2023, 12:18 p.m. OK GNU C++17 TESTS 20 61 819200
189386864 Tawes B Jan. 16, 2023, 12:43 a.m. OK GNU C++17 TESTS 21 62 819200
189318008 m0t9_ B Jan. 15, 2023, 12:32 p.m. OK GNU C++17 TESTS 20 62 819200
189315228 mrfoxygmfr B Jan. 15, 2023, 12:25 p.m. OK GNU C++17 TESTS 20 62 819200
189314246 ultizet B Jan. 15, 2023, 12:22 p.m. OK GNU C++17 TESTS 20 62 819200
189313398 kuzmichev_dima B Jan. 15, 2023, 12:20 p.m. OK GNU C++17 TESTS 20 62 819200
189311653 -imc- B Jan. 15, 2023, 12:17 p.m. OK GNU C++17 TESTS 20 62 819200
189311500 Loading. B Jan. 15, 2023, 12:16 p.m. OK GNU C++17 TESTS 20 62 819200
189311310 antonis.white B Jan. 15, 2023, 12:16 p.m. OK GNU C++17 TESTS 20 62 819200
189310558 YakutovDmitriy B Jan. 15, 2023, 12:15 p.m. OK GNU C++17 TESTS 20 62 819200
189315353 receed B Jan. 15, 2023, 12:25 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189314411 BlackAnt B Jan. 15, 2023, 12:23 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189313977 bashkort B Jan. 15, 2023, 12:22 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189312233 Andreasyan B Jan. 15, 2023, 12:18 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189311503 74TrAkToR B Jan. 15, 2023, 12:16 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189311324 glebustim B Jan. 15, 2023, 12:16 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189311223 244mhq B Jan. 15, 2023, 12:16 p.m. OK GNU C++17 (64) TESTS 20 46 819200
189311234 miagkov B Jan. 15, 2023, 12:16 p.m. OK GNU C++17 (64) TESTS 20 46 1638400
189310886 Kniaz B Jan. 15, 2023, 12:15 p.m. OK GNU C++17 (64) TESTS 20 46 1638400
189320896 AndreyC B Jan. 15, 2023, 12:40 p.m. OK GNU C++17 (64) TESTS 20 46 2457600
189316955 Damirca B Jan. 15, 2023, 12:29 p.m. OK GNU C++20 (64) TESTS 20 31 819200
189312528 never_giveup B Jan. 15, 2023, 12:18 p.m. OK GNU C++20 (64) TESTS 20 31 819200
189321796 leforelle B Jan. 15, 2023, 12:43 p.m. OK GNU C++20 (64) TESTS 20 31 1638400
189321556 uhtyzmaaa B Jan. 15, 2023, 12:42 p.m. OK GNU C++20 (64) TESTS 20 31 1638400
189316484 Slamur B Jan. 15, 2023, 12:28 p.m. OK GNU C++20 (64) TESTS 20 31 1638400
189331516 kaztaev B Jan. 15, 2023, 1:16 p.m. OK GNU C++20 (64) TESTS 20 46 819200
189323640 dmkozyrev_thinks_slowly B Jan. 15, 2023, 12:49 p.m. OK GNU C++20 (64) TESTS 20 46 819200
189320343 Timonnable B Jan. 15, 2023, 12:39 p.m. OK GNU C++20 (64) TESTS 20 46 819200
189317645 okwedook B Jan. 15, 2023, 12:31 p.m. OK GNU C++20 (64) TESTS 20 46 819200
189317566 AVdovin B Jan. 15, 2023, 12:31 p.m. OK GNU C++20 (64) TESTS 20 46 819200
189316326 mmaxio B Jan. 15, 2023, 12:28 p.m. OK Java 11 TESTS 20 187 0
189313832 knightL B Jan. 15, 2023, 12:21 p.m. OK Java 11 TESTS 20 233 0
189348794 Elinow B Jan. 15, 2023, 2:29 p.m. OK Java 11 TESTS 20 499 102400
189328380 alexyz B Jan. 15, 2023, 1:04 p.m. OK Java 17 TESTS 20 264 716800
189312044 iakovlev.zakhar B Jan. 15, 2023, 12:17 p.m. OK Java 8 TESTS 20 171 2764800
189318934 DarLam B Jan. 15, 2023, 12:34 p.m. OK Java 8 TESTS 20 171 2969600
189346375 aabzac B Jan. 15, 2023, 2:18 p.m. OK Java 8 TESTS 20 436 25804800
189322402 angelina.k B Jan. 15, 2023, 12:45 p.m. OK Kotlin 1.7 TESTS 20 810 62771200
189314514 darnley B Jan. 15, 2023, 12:23 p.m. OK Kotlin 1.7 TESTS 20 1107 62771200
189318453 habibulka B Jan. 15, 2023, 12:33 p.m. OK Kotlin 1.7 TESTS 20 1153 207667200
189336756 batony4 B Jan. 15, 2023, 1:36 p.m. OK Kotlin 1.7 TESTS 20 1372 199475200
189314835 ktropin B Jan. 15, 2023, 12:24 p.m. OK Mono C# TESTS 20 124 21913600
189315933 IlyinAD B Jan. 15, 2023, 12:27 p.m. OK MS C++ 2017 TESTS 20 171 1638400
189335367 Eldies B Jan. 15, 2023, 1:31 p.m. OK MS C++ 2017 TESTS 20 265 8089600
189310308 Arsen4ikVar B Jan. 15, 2023, 12:14 p.m. OK PyPy 3 TESTS 20 389 19353600
189323861 Peterhof1 B Jan. 15, 2023, 12:49 p.m. OK PyPy 3 TESTS 20 405 16179200
189322669 Aksnov B Jan. 15, 2023, 12:46 p.m. OK PyPy 3-64 TESTS 20 202 31129600
189395164 zmonster8 B Jan. 16, 2023, 4:22 a.m. OK PyPy 3-64 TESTS 21 296 22835200
189348978 VitalyKo B Jan. 15, 2023, 2:30 p.m. OK PyPy 3-64 TESTS 20 312 22630400
189385965 Abdusharif B Jan. 16, 2023, 12:06 a.m. OK PyPy 3-64 TESTS 21 342 22835200
189323952 mike_live B Jan. 15, 2023, 12:50 p.m. OK PyPy 3-64 TESTS 20 358 22835200
189322174 wervlad B Jan. 15, 2023, 12:44 p.m. OK PyPy 3-64 TESTS 20 529 27955200
189328895 mandalorichick B Jan. 15, 2023, 1:06 p.m. OK Python 3 TESTS 20 280 14233600
189332071 malik B Jan. 15, 2023, 1:18 p.m. OK Python 3 TESTS 20 296 13926400
189309199 Egor B Jan. 15, 2023, 12:12 p.m. OK Rust 2021 TESTS 20 31 2355200

remove filters

Back to search problems