VK Cup 2017 - Round 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
771 VK Cup 2017 - Round 1 FINISHED False 7200 247674323 March 18, 2017, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1364 ) D Bear and Company PROGRAMMING dp 2800

B'Bear Limak prepares problems for a programming competition. Of course, it would be unprofessional to mention the sponsor name in the statement. Limak takes it seriously and he is going to change some words. To make it still possible to read, he will try to modify each word as little as possible. Limak has a string s that consists of uppercase English letters. In one move he can swap two adjacent letters of the string. For example, he can transform a string "ABBC" into "BABC" or "ABCB" in one move. Limak wants to obtain a string without a substring "VK" (i.e. there should be no letter 'V ' immediately followed by letter 'K '). It can be easily proved that it 's possible for any initial string s. What is the minimum possible number of moves Limak can do? The first line of the input contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8975) -- the length of the string. The second line contains a string s, consisting of uppercase English letters. The length of the string is equal to n. Print one integer, denoting the minimum possible number of moves Limak can do, in order to obtain a string without a substring "VK". In the first sample, the initial string is "VKVK". The minimum possible number of moves is 3. One optimal sequence of moves is: In the second sample, there are two optimal sequences of moves. One is "BVVKV" xe2 x80 x89 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 xe2 x80 x89"VBVKV" xe2 x80 x89 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 xe2 x80 x89"VVBKV". The other is "BVVKV" xe2 x80 x89 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 xe2 x80 x89"BVKVV" xe2 x80 x89 xe2 x80 x89 xe2 x86 x92 xe2 x80 x89 xe2 x80 x89"BKVVV". In the fifth sample, no swaps are necessary. '...

Tutorials

VK Cup 2017 Round 1 and CF Round 405 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
26082320 nguyen83 D April 2, 2017, 4:47 p.m. OK FPC TESTS 73 15 8192000 2800
26088865 nguyen83 D April 3, 2017, 1:46 a.m. OK FPC TESTS 73 30 8192000 2800
30720768 vjudge3 D Sept. 25, 2017, 12:21 p.m. OK GNU C++ TESTS 73 15 4096000 2800
30716931 Magolor D Sept. 25, 2017, 11:55 a.m. OK GNU C++ TESTS 73 15 4096000 2800
26968196 unicornt D May 9, 2017, 6:07 a.m. OK GNU C++ TESTS 73 15 4096000 2800
26957785 zqh_wz D May 8, 2017, 1:35 p.m. OK GNU C++ TESTS 73 15 4096000 2800
26956394 Leefir D May 8, 2017, 12:22 p.m. OK GNU C++ TESTS 73 15 4096000 2800
31968003 vjudge4 D Nov. 2, 2017, 4:44 a.m. OK GNU C++ TESTS 73 15 4198400 2800
30306937 CSHwang D Sept. 13, 2017, 12:35 p.m. OK GNU C++ TESTS 73 15 4710400 2800
31965819 vjudge3 D Nov. 2, 2017, 1:25 a.m. OK GNU C++ TESTS 73 15 4915200 2800
27437980 jiyutian D May 30, 2017, 1:20 a.m. OK GNU C++ TESTS 73 15 5324800 2800
26955254 Spylft D May 8, 2017, 11:25 a.m. OK GNU C++ TESTS 73 15 5529600 2800
26200253 danya090699 D April 7, 2017, 5:31 p.m. OK GNU C++11 TESTS 73 15 2969600 2800
26827393 blutrex D May 4, 2017, 3:09 a.m. OK GNU C++11 TESTS 73 15 3379200 2800
31969128 vjudge2 D Nov. 2, 2017, 6:02 a.m. OK GNU C++11 TESTS 73 15 4096000 2800
31966688 vjudge4 D Nov. 2, 2017, 2:48 a.m. OK GNU C++11 TESTS 73 15 4096000 2800
26958054 bblss135 D May 8, 2017, 1:51 p.m. OK GNU C++11 TESTS 73 15 4096000 2800
31965808 fangbo D Nov. 2, 2017, 1:24 a.m. OK GNU C++11 TESTS 73 15 4915200 2800
28727908 petil777 D July 20, 2017, 2:52 p.m. OK GNU C++11 TESTS 73 15 5632000 2800
26460726 Rox D April 17, 2017, 5:14 p.m. OK GNU C++11 TESTS 73 15 5632000 2800
25768185 SegmentationRight D March 24, 2017, 9:42 a.m. OK GNU C++11 TESTS 73 15 5632000 2800
25707715 PlayfulPanda D March 22, 2017, 9:49 a.m. OK GNU C++11 TESTS 73 15 5632000 2800
25670259 Romanchenko D March 20, 2017, 3:47 p.m. OK GNU C++14 TESTS 73 15 2048000 2800
25630153 DmitryGrigorev D March 18, 2017, 9:29 p.m. OK GNU C++14 TESTS 73 15 2048000 2800
25644856 Jakube D March 19, 2017, 11:55 a.m. OK GNU C++14 TESTS 73 15 2560000 2800
31967810 vjudge3 D Nov. 2, 2017, 4:32 a.m. OK GNU C++14 TESTS 73 15 4096000 2800
31967150 timber_wanglu D Nov. 2, 2017, 3:30 a.m. OK GNU C++14 TESTS 73 15 4096000 2800
31965833 vjudge5 D Nov. 2, 2017, 1:27 a.m. OK GNU C++14 TESTS 73 15 4096000 2800
31971470 vjudge5 D Nov. 2, 2017, 7:58 a.m. OK GNU C++14 TESTS 73 15 4300800 2800
31971449 zhzh2001 D Nov. 2, 2017, 7:57 a.m. OK GNU C++14 TESTS 73 15 4300800 2800
31176543 hell_hacker D Oct. 9, 2017, 7:46 p.m. OK GNU C++14 TESTS 73 15 4300800 2800
27742581 cabinfever D June 12, 2017, 5:44 p.m. OK GNU C++14 TESTS 73 15 4300800 2800
44151729 crathva D Oct. 11, 2018, 4:51 p.m. OK GNU C++17 TESTS 73 31 4198400 2800
40700426 err0r D July 24, 2018, 10:29 a.m. OK GNU C++17 TESTS 73 31 4198400 2800
49543710 CaNDidaTE_FaSTer D Feb. 6, 2019, 8:10 p.m. OK GNU C++17 TESTS 73 31 4403200 2800
57807358 al24242 D July 26, 2019, 3:43 p.m. OK GNU C++17 TESTS 73 31 5529600 2800
56612493 hjk1030 D July 6, 2019, 8:01 a.m. OK GNU C++17 TESTS 73 31 6144000 2800
46570883 YenSean D Dec. 4, 2018, 5:39 a.m. OK GNU C++17 TESTS 73 31 6144000 2800
46570852 YenSean D Dec. 4, 2018, 5:37 a.m. OK GNU C++17 TESTS 73 31 6144000 2800
51298585 square1001 D March 14, 2019, 1:24 p.m. OK GNU C++17 TESTS 73 31 7372800 2800
51288506 vjudge1 D March 14, 2019, 8:45 a.m. OK GNU C++17 TESTS 73 31 7372800 2800
38312275 pseudo D May 16, 2018, 7:19 a.m. OK GNU C++17 TESTS 73 31 9830400 2800
25630251 pitfall D March 18, 2017, 9:35 p.m. OK Java 8 TESTS 73 124 20582400 2800
35323517 MathAlgo D Feb. 16, 2018, 12:01 a.m. OK Java 8 TESTS 73 140 21094400 2800
25622276 VArtem Aksenov239 D March 18, 2017, 5:15 p.m. OK Java 8 TESTS 73 155 20582400 2800
26142282 eriksuenderhauf D April 5, 2017, 12:05 p.m. OK Java 8 TESTS 73 218 39116800 2800
25689434 Yurik D March 21, 2017, 1:25 p.m. OK MS C++ TESTS 73 15 2457600 2800
25621687 I_love_MikhailRubinchik KungA D March 18, 2017, 5:10 p.m. OK MS C++ TESTS 73 31 7577600 2800
25699674 TheConfessor D March 21, 2017, 8:24 p.m. OK MS C++ TESTS 73 46 5836800 2800
25617946 NVAL khadaev D March 18, 2017, 4:40 p.m. OK MS C++ TESTS 73 46 20275200 2800
25662926 Roms D March 20, 2017, 10:04 a.m. OK MS C++ TESTS 73 77 7987200 2800
25817617 Anusing1337 D March 26, 2017, 11:32 a.m. OK Python 2 TESTS 73 451 8396800 2800
25723053 m4tt.kerin D March 22, 2017, 10:26 p.m. OK Python 3 TESTS 73 358 6451200 2800

remove filters

Back to search problems