VK Cup 2017 - Qualification 1

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
769 VK Cup 2017 - Qualification 1 FINISHED False 86400 248896824 March 4, 2017, noon

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2364 ) D k-Interesting Pairs Of Integers PROGRAMMING *special bitmasks brute force meet-in-the-middle 1800

B"Vasya has the sequence consisting of n integers. Vasya consider the pair of integers x and y k-interesting, if their binary representation differs from each other exactly in k bits. For example, if k xe2 x80 x89= xe2 x80 x892, the pair of integers x xe2 x80 x89= xe2 x80 x895 and y xe2 x80 x89= xe2 x80 x893 is k-interesting, because their binary representation x=101 and y=011 differs exactly in two bits. Vasya wants to know how many pairs of indexes (i, j) are in his sequence so that i xe2 x80 x89< xe2 x80 x89j and the pair of integers ai and aj is k-interesting. Your task is to help Vasya and determine this number. The first line contains two integers n and k (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8914) -- the number of integers in Vasya's sequence and the number of bits in which integers in k-interesting pair should differ. The second line contains the sequence a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104), which Vasya has. Print the number of pairs (i, j) so that i xe2 x80 x89< xe2 x80 x89j and the pair of integers ai and aj is k-interesting. In the first test there are 4 k-interesting pairs: In the second test k xe2 x80 x89= xe2 x80 x890. Consequently, integers in any k-interesting pair should be equal to themselves. Thus, for the second test there are 6 k-interesting pairs: "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
54730858 rr_ D May 27, 2019, 11:47 p.m. OK D TESTS 83 529 4198400 1800
64046964 hiddenStudent D Nov. 1, 2019, 7:48 p.m. OK D TESTS 83 670 5120000 1800
25214853 StarScreamOwl ednotdead D March 4, 2017, 1:39 p.m. OK Delphi TESTS 83 140 3174400 1800
25409403 ruban D March 11, 2017, 3:03 p.m. OK Delphi TESTS 83 1684 134860800 1800
25303228 chb19 D March 6, 2017, 9:03 p.m. OK FPC TESTS 83 156 2867200 1800
25308460 nikih.10 D March 7, 2017, 6:16 a.m. OK FPC TESTS 83 171 1945600 1800
25274448 vladKB1 D March 5, 2017, 9:27 p.m. OK FPC TESTS 83 171 1945600 1800
25698001 takdela D March 21, 2017, 6:45 p.m. OK FPC TESTS 83 187 1945600 1800
25274430 vladKB1 D March 5, 2017, 9:26 p.m. OK FPC TESTS 83 187 1945600 1800
25466173 Vadim D March 14, 2017, 5:23 a.m. OK FPC TESTS 83 202 1740800 1800
25238998 Sanja NikNag D March 5, 2017, 9:34 a.m. OK FPC TESTS 83 202 2150400 1800
25356172 KiberGraf D March 9, 2017, 9:03 a.m. OK FPC TESTS 83 249 1945600 1800
25281453 Proximal D March 6, 2017, 5:14 a.m. OK FPC TESTS 83 1122 25702400 1800
25244026 radioegor147 D March 5, 2017, 11:53 a.m. OK FPC TESTS 83 1170 2457600 1800
26229806 ghoshsai5000 D April 9, 2017, 3:57 a.m. OK GNU C TESTS 83 78 2048000 1800
26229975 ghoshsai5000 D April 9, 2017, 4:20 a.m. OK GNU C TESTS 83 93 2048000 1800
26229961 ghoshsai5000 D April 9, 2017, 4:18 a.m. OK GNU C TESTS 83 93 2048000 1800
26229925 ghoshsai5000 D April 9, 2017, 4:12 a.m. OK GNU C TESTS 83 93 2048000 1800
26229700 ghoshsai5000 D April 9, 2017, 3:43 a.m. OK GNU C TESTS 83 93 2048000 1800
26229606 ghoshsai5000 D April 9, 2017, 3:33 a.m. OK GNU C TESTS 83 93 2048000 1800
25298789 foksen D March 6, 2017, 5:39 p.m. OK GNU C TESTS 83 93 2048000 1800
26229655 ghoshsai5000 D April 9, 2017, 3:38 a.m. OK GNU C TESTS 83 93 3993600 1800
26229668 ghoshsai5000 D April 9, 2017, 3:40 a.m. OK GNU C TESTS 83 108 2969600 1800
26229536 ghoshsai5000 D April 9, 2017, 3:26 a.m. OK GNU C TESTS 83 109 2048000 1800
25224989 timgaripov pashkah8 D March 4, 2017, 7:05 p.m. OK GNU C++ TESTS 83 62 2150400 1800
25215292 ditoly FallDream D March 4, 2017, 1:49 p.m. OK GNU C++ TESTS 83 62 2252800 1800
27365720 jiyutian D May 27, 2017, 1:38 a.m. OK GNU C++ TESTS 83 78 614400 1800
25717819 keko37 D March 22, 2017, 5:08 p.m. OK GNU C++ TESTS 83 78 3174400 1800
25237657 mda. Serkov D March 5, 2017, 8:57 a.m. OK GNU C++ TESTS 83 78 6144000 1800
34244814 vjudge1 D Jan. 17, 2018, 9:16 a.m. OK GNU C++ TESTS 83 78 14643200 1800
31851014 Fedya001 D Oct. 28, 2017, 9:09 p.m. OK GNU C++ TESTS 83 93 1024000 1800
25270819 AlexBurkov D March 5, 2017, 6:15 p.m. OK GNU C++ TESTS 83 93 2355200 1800
25270194 volodin D March 5, 2017, 5:51 p.m. OK GNU C++ TESTS 83 109 2150400 1800
25217462 TheConfessor wilcot D March 4, 2017, 2:47 p.m. OK GNU C++ TESTS 83 109 2355200 1800
26049739 rajat1603 D April 1, 2017, 10:24 a.m. OK GNU C++11 TESTS 83 31 2252800 1800
25235817 Memset137 AbstractKangaroo D March 5, 2017, 7:45 a.m. OK GNU C++11 TESTS 83 31 2252800 1800
25218137 Livace SYury D March 4, 2017, 3:07 p.m. OK GNU C++11 TESTS 83 31 2867200 1800
25213548 liyang21 xietutu D March 4, 2017, 1:09 p.m. OK GNU C++11 TESTS 83 31 4198400 1800
45784663 LudwigVanBeethoven D Nov. 15, 2018, 11:38 p.m. OK GNU C++11 TESTS 83 46 409600 1800
40982390 ReaLNero1 D July 30, 2018, 6:24 p.m. OK GNU C++11 TESTS 83 46 819200 1800
25222321 map Babanin_Ivan D March 4, 2017, 5:16 p.m. OK GNU C++11 TESTS 83 46 2662400 1800
25552981 hellman_ D March 16, 2017, 3:07 p.m. OK GNU C++11 TESTS 83 46 4505600 1800
25234273 AntonZ thequickfox D March 5, 2017, 6:31 a.m. OK GNU C++11 TESTS 83 62 2150400 1800
25223322 Copymaster Lilith D March 4, 2017, 5:56 p.m. OK GNU C++11 TESTS 83 62 2150400 1800
28895774 ekzhang D July 26, 2017, 6:33 a.m. OK GNU C++14 TESTS 83 31 2048000 1800
26068963 shubhamgoyal__ D April 2, 2017, 4:13 a.m. OK GNU C++14 TESTS 83 46 2150400 1800
25240490 Zlobober zemen D March 5, 2017, 10:18 a.m. OK GNU C++14 TESTS 83 46 2150400 1800
25228021 _XuMuk_ BigBag D March 4, 2017, 9:40 p.m. OK GNU C++14 TESTS 83 62 1945600 1800
25217381 MStrechen iSlava D March 4, 2017, 2:44 p.m. OK GNU C++14 TESTS 83 62 2150400 1800
25213639 StarOrpheus illarionovam_onu D March 4, 2017, 1:11 p.m. OK GNU C++14 TESTS 83 62 2457600 1800
25212262 .tx Denisson D March 4, 2017, 12:40 p.m. OK GNU C++14 TESTS 83 62 2764800 1800
25269812 TSky.64 D March 5, 2017, 5:39 p.m. OK GNU C++14 TESTS 83 62 3276800 1800
25239065 dzhaba DanLys D March 5, 2017, 9:36 a.m. OK GNU C++14 TESTS 83 62 13926400 1800
30800611 vibhav D Sept. 28, 2017, 9:51 a.m. OK GNU C++14 TESTS 83 62 15564800 1800
61098215 KasugaAyumu D Sept. 23, 2019, 5:04 a.m. OK GNU C++17 TESTS 83 62 102400 1800
61175227 skyhavoc D Sept. 23, 2019, 6:03 p.m. OK GNU C++17 TESTS 83 93 102400 1800
60714791 Nickir D Sept. 17, 2019, 10:06 a.m. OK GNU C++17 TESTS 83 93 102400 1800
54395638 kevinpatel_20 D May 19, 2019, 7:48 p.m. OK GNU C++17 TESTS 83 93 1024000 1800
63689361 vjudge3 D Oct. 29, 2019, 1:18 a.m. OK GNU C++17 TESTS 83 108 102400 1800
52524436 GioChkhaidze D April 9, 2019, 10:45 a.m. OK GNU C++17 TESTS 83 109 819200 1800
63879537 fredtjuyhi D Oct. 30, 2019, 8:13 p.m. OK GNU C++17 TESTS 83 124 204800 1800
55967104 hkyiitd D June 23, 2019, 12:44 p.m. OK GNU C++17 TESTS 83 124 204800 1800
49509925 MADKIRUS D Feb. 5, 2019, 7:38 p.m. OK GNU C++17 TESTS 83 124 409600 1800
37546553 Akikaze D April 23, 2018, 8:41 a.m. OK GNU C++17 TESTS 83 139 3584000 1800
25280527 odomontois D March 6, 2017, 5:07 a.m. OK Haskell TESTS 83 1044 55500800 1800
25271386 odomontois D March 5, 2017, 6:37 p.m. OK Haskell TESTS 83 1045 54476800 1800
25278971 odomontois D March 6, 2017, 5 a.m. OK Haskell TESTS 83 1076 54476800 1800
25278953 odomontois D March 6, 2017, 4:58 a.m. OK Haskell TESTS 83 1528 54476800 1800
25278916 odomontois D March 6, 2017, 4:56 a.m. OK Haskell TESTS 83 1560 54476800 1800
25278926 odomontois D March 6, 2017, 4:56 a.m. OK Haskell TESTS 83 1747 54476800 1800
25723073 JialinOuyang D March 22, 2017, 10:29 p.m. OK Java 8 TESTS 83 202 20582400 1800
25220272 Grand RoyaLKoninA D March 4, 2017, 4:10 p.m. OK Java 8 TESTS 83 218 20377600 1800
25271582 antkhorin D March 5, 2017, 6:45 p.m. OK Java 8 TESTS 83 218 20582400 1800
25224335 Albert1401 antkhorin D March 4, 2017, 6:36 p.m. OK Java 8 TESTS 83 218 20582400 1800
25228297 lenny PolarNick D March 4, 2017, 9:58 p.m. OK Java 8 TESTS 83 249 20377600 1800
25294661 Slamur D March 6, 2017, 2:19 p.m. OK Java 8 TESTS 83 264 21094400 1800
54081603 zhijunlicd D May 14, 2019, 3:45 a.m. OK Java 8 TESTS 83 280 0 1800
25722990 JialinOuyang D March 22, 2017, 10:19 p.m. OK Java 8 TESTS 83 311 20582400 1800
25227089 LeontiBrechko _ED D March 4, 2017, 8:46 p.m. OK Java 8 TESTS 83 311 20684800 1800
25282520 den1107 D March 6, 2017, 5:40 a.m. OK Java 8 TESTS 83 311 59392000 1800
26195006 mbrc D April 7, 2017, 1:52 p.m. OK Kotlin TESTS 83 592 24268800 1800
25224174 Cyber.1 D March 4, 2017, 6:30 p.m. OK Kotlin TESTS 83 748 22016000 1800
25392865 arcanekeeper D March 11, 2017, 4:13 a.m. OK MS C# TESTS 83 733 18124800 1800
25269564 lionvs13 D March 5, 2017, 5:30 p.m. OK MS C# TESTS 83 1248 21708800 1800
25220936 av_life og.kostya D March 4, 2017, 4:31 p.m. OK MS C# TESTS 83 1700 9523200 1800
25375616 Alexandr D March 10, 2017, 9:09 a.m. OK MS C# TESTS 83 1731 18329600 1800
25234549 PolyProgrammist merzgling D March 5, 2017, 6:45 a.m. OK MS C++ TESTS 83 78 2150400 1800
25221449 dolboeb vitux D March 4, 2017, 4:46 p.m. OK MS C++ TESTS 83 93 2560000 1800
25240691 ferc Firen95 D March 5, 2017, 10:24 a.m. OK MS C++ TESTS 83 108 2048000 1800
25321954 Luxy D March 7, 2017, 1:27 p.m. OK MS C++ TESTS 83 109 2150400 1800
25278017 Spolutrean D March 6, 2017, 3:25 a.m. OK MS C++ TESTS 83 109 2150400 1800
25226261 Levshunovma pikmike D March 4, 2017, 8:06 p.m. OK MS C++ TESTS 83 109 2252800 1800
25215782 APowerOfCumis bunos D March 4, 2017, 2 p.m. OK MS C++ TESTS 83 109 2252800 1800
25212409 TonySnark D March 4, 2017, 12:43 p.m. OK MS C++ TESTS 83 109 2355200 1800
35540718 MenOfPassion D Feb. 21, 2018, 7:41 a.m. OK MS C++ TESTS 83 109 2560000 1800
36185875 vjudge4 D March 11, 2018, 5:02 a.m. OK MS C++ TESTS 83 124 2252800 1800
25225008 netman andrew.volchek D March 4, 2017, 7:06 p.m. OK Scala TESTS 83 795 29081600 1800
25271641 WiBk D March 5, 2017, 6:48 p.m. OK Scala TESTS 83 1793 26521600 1800

remove filters

Back to search problems