Technocup 2020 - Elimination Round 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
1225 Technocup 2020 - Elimination Round 2 FINISHED False 7200 165351287 Oct. 26, 2019, 11:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10974 ) B2 TV Subscriptions (Hard Version) PROGRAMMING implementation two pointers 1300

B'The only difference between easy and hard versions is constraints. The BerTV channel every day broadcasts one episode of one of the k TV shows. You know the schedule for the next n days: a sequence of integers a_1, a_2, ... , a_n ( 1 <= a_i <= k ), where a_i is the show, the episode of which will be shown in i -th day. The subscription to the show is bought for the entire show (i.e. for all its episodes), for each show the subscription is bought separately. How many minimum subscriptions do you need to buy in order to have the opportunity to watch episodes of purchased shows d ( 1 <= d <= n ) days in a row? In other words, you want to buy the minimum number of TV shows so that there is some segment of d consecutive days in which all episodes belong to the purchased shows. The first line contains an integer t ( 1 <= t <= 10000 ) -- the number of test cases in the input. Then t test case descriptions follow. The first line of each test case contains three integers n, k and d ( 1 <= n <= 2 cdot10^5 , 1 <= k <= 10^6 , 1 <= d <= n ). The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= k ), where a_i is the show that is broadcasted on the i -th day. It is guaranteed that the sum of the values xe2 x80 x8b xe2 x80 x8bof n for all test cases in the input does not exceed 2 cdot10^5 . Print t integers -- the answers to the test cases in the input in the order they follow. The answer to a test case is the minimum number of TV shows for which you need to purchase a subscription so that you can watch episodes of the purchased TV shows on BerTV for d consecutive days. Please note that it is permissible that you will be able to watch more than d days in a row. In the first test case to have an opportunity to watch shows for two consecutive days, you need to buy a subscription on show 1 and on show 2$'...

Tutorials

70898

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
63499255 Grizzzly B2 Oct. 26, 2019, 4:37 p.m. OK Delphi TESTS 24 62 7987200 1300
63499218 Grizzzly B2 Oct. 26, 2019, 4:36 p.m. OK Delphi TESTS 24 62 7987200 1300
63457465 Craspedacusta B2 Oct. 26, 2019, 11:34 a.m. OK FPC TESTS 24 77 7987200 1300
63474759 ZhavaFrog B2 Oct. 26, 2019, 12:23 p.m. OK FPC TESTS 24 77 25292800 1300
63524299 huanggs B2 Oct. 27, 2019, 4:47 a.m. OK GNU C11 TESTS 24 62 5324800 1300
67324177 Piccacu B2 Dec. 21, 2019, 9:09 a.m. OK GNU C11 TESTS 24 77 4812800 1300
67441368 akshatdalton B2 Dec. 22, 2019, 7:29 p.m. OK GNU C11 TESTS 24 919 19251200 1300
67324079 BugLeave B2 Dec. 21, 2019, 9:07 a.m. OK GNU C11 TESTS 24 1201 4812800 1300
67323589 BugLeave B2 Dec. 21, 2019, 8:57 a.m. OK GNU C11 TESTS 24 1716 4812800 1300
63525296 xgzc B2 Oct. 27, 2019, 5:04 a.m. OK GNU C++11 TESTS 24 31 4608000 1300
65467038 Heartbeat666 B2 Nov. 21, 2019, 6:34 a.m. OK GNU C++11 TESTS 24 31 4812800 1300
63554043 EmptySoulist B2 Oct. 27, 2019, 12:23 p.m. OK GNU C++11 TESTS 24 31 4812800 1300
63546934 robin12138 B2 Oct. 27, 2019, 10:45 a.m. OK GNU C++11 TESTS 24 31 4812800 1300
64139339 BeNoble B2 Nov. 3, 2019, 8:04 a.m. OK GNU C++11 TESTS 24 31 7065600 1300
63552486 Sweetlemon B2 Oct. 27, 2019, 12:01 p.m. OK GNU C++11 TESTS 24 31 7884800 1300
67074221 vjudge1 B2 Dec. 17, 2019, 1:52 p.m. OK GNU C++11 TESTS 24 31 7987200 1300
63525792 w616561153 B2 Oct. 27, 2019, 5:12 a.m. OK GNU C++11 TESTS 24 31 7987200 1300
63931284 Anthem B2 Oct. 31, 2019, 2:22 p.m. OK GNU C++11 TESTS 24 31 24064000 1300
64343314 countercurrent-time B2 Nov. 6, 2019, 4:31 a.m. OK GNU C++11 TESTS 24 46 4608000 1300
63492893 BeNoble B2 Oct. 26, 2019, 2:48 p.m. OK GNU C++14 TESTS 24 46 7065600 1300
63503086 lollihunter B2 Oct. 26, 2019, 5:51 p.m. OK GNU C++14 TESTS 24 62 4812800 1300
63462367 romasimperm B2 Oct. 26, 2019, 11:45 a.m. OK GNU C++14 TESTS 24 62 4812800 1300
63520543 juggernaut B2 Oct. 27, 2019, 3:35 a.m. OK GNU C++14 TESTS 24 62 4812800 1300
63627414 rabbita B2 Oct. 28, 2019, 4:41 a.m. OK GNU C++14 TESTS 24 62 4812800 1300
63721002 brown_toad B2 Oct. 29, 2019, 11:22 a.m. OK GNU C++14 TESTS 24 62 4812800 1300
68957543 OIQ_ B2 Jan. 16, 2020, 9:08 p.m. OK GNU C++14 TESTS 24 62 4812800 1300
63536648 VladKov B2 Oct. 27, 2019, 8:17 a.m. OK GNU C++14 TESTS 24 62 4812800 1300
64145832 1486867978 B2 Nov. 3, 2019, 9:50 a.m. OK GNU C++14 TESTS 24 62 7987200 1300
64701448 Luzivanlt B2 Nov. 11, 2019, 2:57 p.m. OK GNU C++14 TESTS 24 62 7987200 1300
65259889 ioyeoa B2 Nov. 17, 2019, 2:41 p.m. OK GNU C++17 TESTS 24 31 5324800 1300
63676357 ipaljak B2 Oct. 28, 2019, 6:29 p.m. OK GNU C++17 TESTS 24 62 4812800 1300
64464938 Bombers B2 Nov. 7, 2019, 11:29 a.m. OK GNU C++17 TESTS 24 62 4812800 1300
63665738 Shinbai B2 Oct. 28, 2019, 3:15 p.m. OK GNU C++17 TESTS 24 62 4812800 1300
63548296 jiangly B2 Oct. 27, 2019, 11:04 a.m. OK GNU C++17 TESTS 24 62 4812800 1300
63501830 andrei2003 B2 Oct. 26, 2019, 5:28 p.m. OK GNU C++17 TESTS 24 62 4812800 1300
63444877 Gashintare B2 Oct. 26, 2019, 11:15 a.m. OK GNU C++17 TESTS 24 62 4812800 1300
63518710 revolIA B2 Oct. 27, 2019, 2:30 a.m. OK GNU C++17 TESTS 24 62 5222400 1300
66260480 vinhhien323 B2 Dec. 4, 2019, 8:10 a.m. OK GNU C++17 TESTS 24 62 7987200 1300
67491418 thienlongtpct B2 Dec. 23, 2019, 7:36 p.m. OK GNU C++17 TESTS 24 62 7987200 1300
63863036 Tardimgg B2 Oct. 30, 2019, 5 p.m. OK Java 11 TESTS 24 296 10956800 1300
68663650 StEpAn_123 B2 Jan. 12, 2020, 2:25 p.m. OK Java 11 TESTS 24 404 15257600 1300
63551698 enricogi B2 Oct. 27, 2019, 11:50 a.m. OK Java 11 TESTS 24 577 13414400 1300
63740406 ZeroAmbition B2 Oct. 29, 2019, 4:44 p.m. OK Java 11 TESTS 24 623 14131200 1300
63957045 mikee478 B2 Nov. 1, 2019, 2:35 a.m. OK Java 11 TESTS 24 670 11878400 1300
64461410 di_halt B2 Nov. 7, 2019, 10:30 a.m. OK Java 8 TESTS 24 155 8192000 1300
64433098 4mda4mda B2 Nov. 6, 2019, 10:49 p.m. OK Java 8 TESTS 24 155 8396800 1300
63950108 fetetriste B2 Oct. 31, 2019, 8:45 p.m. OK Java 8 TESTS 24 155 11571200 1300
63455387 rentacat45 B2 Oct. 26, 2019, 11:30 a.m. OK Java 8 TESTS 24 186 8192000 1300
63660301 aditya314 B2 Oct. 28, 2019, 1:52 p.m. OK Java 8 TESTS 24 202 10547200 1300
64460539 di_halt B2 Nov. 7, 2019, 10:12 a.m. OK Java 8 TESTS 24 202 13721600 1300
63616020 mayankarora21 B2 Oct. 27, 2019, 7:32 p.m. OK Java 8 TESTS 24 233 10342400 1300
63512015 abdelrahman.ismail B2 Oct. 26, 2019, 9:05 p.m. OK Java 8 TESTS 24 233 12288000 1300
68623512 GiantTornado B2 Jan. 11, 2020, 8:10 p.m. OK Java 8 TESTS 24 233 13107200 1300
64429397 mikhaylov_boris B2 Nov. 6, 2019, 8:32 p.m. OK Java 8 TESTS 24 233 13312000 1300
63663903 mrAppleXZ B2 Oct. 28, 2019, 2:40 p.m. OK Kotlin TESTS 24 218 15769600 1300
63683164 vitaly_megabyte B2 Oct. 28, 2019, 8:54 p.m. OK Mono C# TESTS 24 155 22016000 1300
63959390 Tema255 B2 Nov. 1, 2019, 4:14 a.m. OK Mono C# TESTS 24 842 32563200 1300
63459461 hooin B2 Oct. 26, 2019, 11:38 a.m. OK Mono C# TESTS 24 873 25600000 1300
63726983 Mo_maek B2 Oct. 29, 2019, 12:56 p.m. OK MS C++ TESTS 24 61 4812800 1300
63727294 vjudge1 B2 Oct. 29, 2019, 1:01 p.m. OK MS C++ TESTS 24 62 4812800 1300
63458184 Victor_Morozov B2 Oct. 26, 2019, 11:35 a.m. OK MS C++ TESTS 24 186 16076800 1300
63954922 vjudge4 B2 Nov. 1, 2019, 12:34 a.m. OK MS C++ TESTS 24 280 7270400 1300
63647058 Bujhm B2 Oct. 28, 2019, 10:05 a.m. OK MS C++ TESTS 24 1091 5427200 1300
63836253 vjudge4 B2 Oct. 30, 2019, 1:55 p.m. OK MS C++ TESTS 24 1341 8089600 1300
66443742 vjudge1 B2 Dec. 7, 2019, 8:52 a.m. OK MS C++ TESTS 24 1356 11980800 1300
63706772 joyguru55 B2 Oct. 29, 2019, 8:40 a.m. OK MS C++ TESTS 24 1388 8806400 1300
63476428 PavelBr B2 Oct. 26, 2019, 12:29 p.m. OK MS C++ TESTS 24 1512 4812800 1300
66443537 vjudge5 B2 Dec. 7, 2019, 8:47 a.m. OK MS C++ TESTS 24 1731 11980800 1300
63946129 Slamur B2 Oct. 31, 2019, 7:01 p.m. OK MS C++ 2017 TESTS 24 171 4812800 1300
65725745 WoodMachine B2 Nov. 25, 2019, 10:47 p.m. OK MS C++ 2017 TESTS 24 171 4812800 1300
63643598 dbelov B2 Oct. 28, 2019, 8:54 a.m. OK MS C++ 2017 TESTS 24 171 5120000 1300
65608342 Qwerty1232 B2 Nov. 23, 2019, 10:32 p.m. OK MS C++ 2017 TESTS 24 202 16281600 1300
63658828 Mad112233 B2 Oct. 28, 2019, 1:30 p.m. OK MS C++ 2017 TESTS 24 217 5120000 1300
65715174 griv B2 Nov. 25, 2019, 4:13 p.m. OK MS C++ 2017 TESTS 24 218 4915200 1300
63451836 Pechalka B2 Oct. 26, 2019, 11:24 a.m. OK MS C++ 2017 TESTS 24 218 8806400 1300
63500551 Koropok B2 Oct. 26, 2019, 5:02 p.m. OK MS C++ 2017 TESTS 24 249 7270400 1300
63446805 GandarfGamer B2 Oct. 26, 2019, 11:17 a.m. OK MS C++ 2017 TESTS 24 265 11264000 1300
65943339 kurs B2 Nov. 29, 2019, 7:28 a.m. OK MS C++ 2017 TESTS 24 280 7270400 1300
63495235 Pocepko B2 Oct. 26, 2019, 3:22 p.m. OK PascalABC.NET TESTS 24 655 3379200 1300
64539840 mayakin B2 Nov. 8, 2019, 6:13 p.m. OK PHP TESTS 24 218 26931200 1300
67045066 Kurisu__ B2 Dec. 16, 2019, 9:29 p.m. OK PyPy 2 TESTS 24 639 71065600 1300
67045114 Kurisu__ B2 Dec. 16, 2019, 9:31 p.m. OK PyPy 2 TESTS 24 655 71065600 1300
67044998 Kurisu__ B2 Dec. 16, 2019, 9:25 p.m. OK PyPy 2 TESTS 24 795 70553600 1300
63497373 rmyak B2 Oct. 26, 2019, 3:59 p.m. OK PyPy 3 TESTS 24 358 22835200 1300
63456567 koptev B2 Oct. 26, 2019, 11:32 a.m. OK PyPy 3 TESTS 24 389 19865600 1300
63678996 erachanzZ B2 Oct. 28, 2019, 7:16 p.m. OK PyPy 3 TESTS 24 498 24371200 1300
63505564 Vladithur B2 Oct. 26, 2019, 6:35 p.m. OK PyPy 3 TESTS 24 514 23756800 1300
66672891 sruthi_1729 B2 Dec. 12, 2019, 10:07 a.m. OK PyPy 3 TESTS 24 529 20377600 1300
64154818 Holy_ogre B2 Nov. 3, 2019, 12:29 p.m. OK PyPy 3 TESTS 24 529 23142400 1300
66784654 23sergey03 B2 Dec. 13, 2019, 1:14 p.m. OK PyPy 3 TESTS 24 530 22220800 1300
63471215 MrPeso4ko B2 Oct. 26, 2019, 12:11 p.m. OK PyPy 3 TESTS 24 545 20582400 1300
63498959 kshitij_sodani B2 Oct. 26, 2019, 4:31 p.m. OK PyPy 3 TESTS 24 545 22016000 1300
63933556 SinKing B2 Oct. 31, 2019, 3 p.m. OK PyPy 3 TESTS 24 545 28876800 1300
63445525 Dart-Xeyter B2 Oct. 26, 2019, 11:16 a.m. OK Python 3 TESTS 24 467 15769600 1300
65545182 coproizvedenie B2 Nov. 22, 2019, 4:54 p.m. OK Python 3 TESTS 24 467 15974400 1300
63485295 Arsen4ikVar B2 Oct. 26, 2019, 1:03 p.m. OK Python 3 TESTS 24 482 15974400 1300
63472910 Sevastian B2 Oct. 26, 2019, 12:17 p.m. OK Python 3 TESTS 24 483 15769600 1300
63654871 Vladislav_Z B2 Oct. 28, 2019, 12:24 p.m. OK Python 3 TESTS 24 483 16076800 1300
63464200 Samolyotik B2 Oct. 26, 2019, 11:49 a.m. OK Python 3 TESTS 24 498 16076800 1300
63465568 arseniyx92 B2 Oct. 26, 2019, 11:53 a.m. OK Python 3 TESTS 24 498 16691200 1300
63641724 dasha.maksimova B2 Oct. 28, 2019, 8:17 a.m. OK Python 3 TESTS 24 499 15974400 1300
63476487 Nikonet B2 Oct. 26, 2019, 12:30 p.m. OK Python 3 TESTS 24 499 15974400 1300
63559509 fazeel B2 Oct. 27, 2019, 1:50 p.m. OK Python 3 TESTS 24 514 16076800 1300
63624937 Black_Fregat B2 Oct. 28, 2019, 2:54 a.m. OK Rust TESTS 24 561 5632000 1300

remove filters

Back to search problems