VK Cup 2016 - Round 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
643 VK Cup 2016 - Round 3 FINISHED False 10800 274978504 May 7, 2016, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1030 ) G Choosing Ads PROGRAMMING data structures 3100

B"One social network developer recently suggested a new algorithm of choosing ads for users. There are n slots which advertisers can buy. It is possible to buy a segment of consecutive slots at once. The more slots you own, the bigger are the chances your ad will be shown to users. Every time it is needed to choose ads to show, some segment of slots is picked by a secret algorithm. Then some advertisers are chosen. The only restriction is that it should be guaranteed for advertisers which own at least p% of slots composing this segment that their ad will be shown. From the other side, users don't like ads. So it was decided to show no more than ads at once. You are asked to develop a system to sell segments of slots and choose ads in accordance with the rules described above. The first line of the input contains three integers n, m and p (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150 xe2 x80 x89000, xe2 x80 x8920 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of slots, the number of queries to your system and threshold for which display of the ad is guaranteed. Next line contains n integers ai (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89150 xe2 x80 x89000), where the i-th number means id of advertiser who currently owns the i-th slot. Next m lines contain queries descriptions. Each description is of one of the following forms: For each query of the second type answer should be printed in a separate line. First integer of the answer should be the number of advertisements that will be shown . Next cnt integers should be advertisers' ids. It is allowed to print one advertiser more than once, but each advertiser that owns at least slots of the segment from l to r should be in your answer. Samples demonstrate that you actually have quite a lot of freedom in choosing advertisers. "...

Tutorials

VK Cup 2016 — Round 3 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
23412950 Jin_Haonan G Dec. 30, 2016, 5:15 a.m. OK GNU C++ TESTS 101 343 31334400 3100
40984835 ReaLNero1 G July 30, 2018, 7:36 p.m. OK GNU C++ TESTS 101 358 29286400 3100
41331463 vjudge2 G Aug. 8, 2018, 8:59 a.m. OK GNU C++ TESTS 101 374 29593600 3100
35887136 ______M______ G March 3, 2018, 1:59 p.m. OK GNU C++ TESTS 101 499 53657600 3100
21309381 jiyutian G Oct. 9, 2016, 4:56 a.m. OK GNU C++ TESTS 101 514 31334400 3100
27723170 apt123 G June 11, 2017, 3:17 p.m. OK GNU C++ TESTS 101 545 31641600 3100
23391586 zhanglexing G Dec. 29, 2016, 6:48 a.m. OK GNU C++ TESTS 101 561 53555200 3100
41331879 vjudge3 G Aug. 8, 2018, 9:14 a.m. OK GNU C++ TESTS 101 577 29593600 3100
27723141 ahwhrky_follower G June 11, 2017, 3:16 p.m. OK GNU C++ TESTS 101 592 34304000 3100
27717991 whfym G June 11, 2017, 9 a.m. OK GNU C++ TESTS 101 623 19660800 3100
63727331 AutumnKite G Oct. 29, 2019, 1:02 p.m. OK GNU C++11 TESTS 101 311 29286400 3100
63719258 luogu_bot1 G Oct. 29, 2019, 10:51 a.m. OK GNU C++11 TESTS 101 327 115507200 3100
63649226 zhaotiensn G Oct. 28, 2019, 10:51 a.m. OK GNU C++11 TESTS 101 358 31846400 3100
63953825 QwQcOrZ G Oct. 31, 2019, 11:38 p.m. OK GNU C++11 TESTS 101 374 34508800 3100
63634951 yasugongshang G Oct. 28, 2019, 7:52 a.m. OK GNU C++11 TESTS 101 389 25190400 3100
57881568 lopare G July 28, 2019, 8:01 a.m. OK GNU C++11 TESTS 101 420 51507200 3100
57896192 nantf G July 28, 2019, 1:40 p.m. OK GNU C++11 TESTS 101 436 27033600 3100
57815737 py_ultron G July 26, 2019, 7:35 p.m. OK GNU C++11 TESTS 101 436 51507200 3100
63022073 newbiechdboom0 G Oct. 20, 2019, 2:54 p.m. OK GNU C++11 TESTS 101 452 29696000 3100
63907553 luogu_bot3 G Oct. 31, 2019, 7:05 a.m. OK GNU C++11 TESTS 101 467 34304000 3100
35730638 Marco_L_T G Feb. 26, 2018, 12:02 p.m. OK GNU C++14 TESTS 101 514 264294400 3100
63907427 AuqaKyz G Oct. 31, 2019, 7:03 a.m. OK GNU C++14 TESTS 101 561 34304000 3100
60151403 idxcalcal G Sept. 6, 2019, 4:16 a.m. OK GNU C++14 TESTS 101 561 39936000 3100
66019213 KeyID G Nov. 30, 2019, 6:43 a.m. OK GNU C++14 TESTS 101 576 27033600 3100
66306152 jiangly G Dec. 5, 2019, 9:27 a.m. OK GNU C++14 TESTS 101 670 27033600 3100
63719205 emoairx G Oct. 29, 2019, 10:50 a.m. OK GNU C++14 TESTS 101 685 115507200 3100
58411650 funer G Aug. 7, 2019, 2:03 a.m. OK GNU C++14 TESTS 101 732 19865600 3100
23392855 Xin-Jie G Dec. 29, 2016, 8:17 a.m. OK GNU C++14 TESTS 101 732 42803200 3100
58411837 funer G Aug. 7, 2019, 2:09 a.m. OK GNU C++14 TESTS 101 733 19865600 3100
51858049 hychyc G March 26, 2019, 12:01 p.m. OK GNU C++14 TESTS 101 748 45670400 3100
60470509 nickluo G Sept. 13, 2019, 5:12 a.m. OK GNU C++17 TESTS 101 623 27750400 3100
57963228 Benq G July 30, 2019, 1:06 a.m. OK GNU C++17 TESTS 101 639 23756800 3100
57890527 Fulisike G July 28, 2019, 11:40 a.m. OK GNU C++17 TESTS 101 764 58368000 3100
66414670 Martin53 G Dec. 6, 2019, 4:36 p.m. OK GNU C++17 TESTS 101 1700 58368000 3100
64863310 Rubbish12345 G Nov. 14, 2019, 4:38 a.m. OK GNU C++17 TESTS 101 1965 20377600 3100
48578657 ismagilov.code Minnakhmetov G Jan. 19, 2019, 3:27 p.m. OK GNU C++17 TESTS 101 2557 79155200 3100
18969847 Los_Angelos_Laycurse G July 8, 2016, 12:52 p.m. OK MS C++ TESTS 101 951 64716800 3100
17798148 JewRaper G May 7, 2016, 7:17 p.m. OK MS C++ TESTS 101 2105 319385600 3100
17796992 LHiC V--o_o--V G May 7, 2016, 6 p.m. OK MS C++ TESTS 101 2807 319385600 3100

remove filters

Back to search problems