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 |
---|---|---|---|---|---|---|
1268 | Codeforces Round 609 (Div. 1) | FINISHED | False | 7200 | 154896899 | Dec. 21, 2019, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1758 ) | C | K Integers | PROGRAMMING | binary search data structures | 2300 |
B'You are given a permutation p_1, p_2, ldots, p_n . In one move you can swap two adjacent values. You want to perform a minimum number of moves, such that in the end there will exist a subsegment 1,2, ldots, k , in other words in the end there should be an integer i , 1 <= q i <= q n-k+1 such that p_i = 1, p_{i+1} = 2, ldots, p_{i+k-1}=k . Let f(k) be the minimum number of moves that you need to make a subsegment with values 1,2, ldots,k appear in the permutation. You need to find f(1), f(2), ldots, f(n) . The first line of input contains one integer n ( 1 <= q n <= q 200 ,000 ): the number of elements in the permutation. The next line of input contains n integers p_1, p_2, ldots, p_n : given permutation ( 1 <= q p_i <= q n ). Print n integers, the minimum number of moves that you need to make a subsegment with values 1,2, ldots,k appear in the permutation, for k=1, 2, ldots, n . '... |
Codeforces Round #609 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
67343323 | hos.lyric | C | Dec. 21, 2019, 11:38 a.m. | OK | D | TESTS | 13 | 312 | 36659200 | 2300 | |
68007620 | fluffyowl | C | Dec. 31, 2019, 2:02 p.m. | OK | D | TESTS | 13 | 483 | 25088000 | 2300 | |
67399979 | snowflake | C | Dec. 22, 2019, 2:59 a.m. | OK | GNU C++11 | TESTS | 13 | 93 | 14028800 | 2300 | |
67399840 | Flower_pks | C | Dec. 22, 2019, 2:53 a.m. | OK | GNU C++11 | TESTS | 13 | 109 | 4812800 | 2300 | |
67577116 | cjy2003 | C | Dec. 25, 2019, 3:25 a.m. | OK | GNU C++11 | TESTS | 13 | 109 | 5427200 | 2300 | |
67360402 | cwystc | C | Dec. 21, 2019, 12:36 p.m. | OK | GNU C++11 | TESTS | 13 | 109 | 14028800 | 2300 | |
68444675 | eatingmore | C | Jan. 9, 2020, 12:14 p.m. | OK | GNU C++11 | TESTS | 13 | 124 | 3993600 | 2300 | |
67612268 | CQUzbx | C | Dec. 25, 2019, 3:50 p.m. | OK | GNU C++11 | TESTS | 13 | 124 | 3993600 | 2300 | |
67612196 | Phantasy | C | Dec. 25, 2019, 3:49 p.m. | OK | GNU C++11 | TESTS | 13 | 124 | 3993600 | 2300 | |
67346220 | LiWenHaoTianXiaDiYi | C | Dec. 21, 2019, 11:47 a.m. | OK | GNU C++11 | TESTS | 13 | 124 | 3993600 | 2300 | |
67849133 | guanhuai04 | C | Dec. 29, 2019, 12:59 a.m. | OK | GNU C++11 | TESTS | 13 | 124 | 4812800 | 2300 | |
67392426 | I_love_simplespy | C | Dec. 21, 2019, 8:29 p.m. | OK | GNU C++11 | TESTS | 13 | 124 | 4812800 | 2300 | |
67579541 | Nhan_1309 | C | Dec. 25, 2019, 5:12 a.m. | OK | GNU C++14 | TESTS | 13 | 124 | 3993600 | 2300 | |
67351643 | scli_weapon | C | Dec. 21, 2019, 12:05 p.m. | OK | GNU C++14 | TESTS | 13 | 124 | 3993600 | 2300 | |
67802787 | leanil | C | Dec. 28, 2019, 5:12 p.m. | OK | GNU C++14 | TESTS | 13 | 124 | 4505600 | 2300 | |
67352784 | _LeMur_ | C | Dec. 21, 2019, 12:09 p.m. | OK | GNU C++14 | TESTS | 13 | 124 | 8396800 | 2300 | |
69080431 | dr.ken | C | Jan. 19, 2020, 6:08 a.m. | OK | GNU C++14 | TESTS | 13 | 124 | 9420800 | 2300 | |
69075023 | dr.ken | C | Jan. 19, 2020, 2:20 a.m. | OK | GNU C++14 | TESTS | 13 | 124 | 9420800 | 2300 | |
67468725 | Scut82 | C | Dec. 23, 2019, 12:01 p.m. | OK | GNU C++14 | TESTS | 13 | 139 | 7270400 | 2300 | |
68778776 | chenyisan | C | Jan. 14, 2020, 2:18 p.m. | OK | GNU C++14 | TESTS | 13 | 139 | 23040000 | 2300 | |
67456388 | koikotya | C | Dec. 23, 2019, 7:05 a.m. | OK | GNU C++14 | TESTS | 13 | 140 | 1638400 | 2300 | |
67395894 | silxi | C | Dec. 21, 2019, 10:55 p.m. | OK | GNU C++14 | TESTS | 13 | 140 | 3993600 | 2300 | |
67399962 | __Orchidany | C | Dec. 22, 2019, 2:58 a.m. | OK | GNU C++17 | TESTS | 13 | 124 | 4812800 | 2300 | |
67340773 | HIR180 | C | Dec. 21, 2019, 11:30 a.m. | OK | GNU C++17 | TESTS | 13 | 124 | 7065600 | 2300 | |
67352122 | emthrm | C | Dec. 21, 2019, 12:07 p.m. | OK | GNU C++17 | TESTS | 13 | 139 | 1638400 | 2300 | |
67347427 | Alex_2oo8 | C | Dec. 21, 2019, 11:51 a.m. | OK | GNU C++17 | TESTS | 13 | 139 | 1638400 | 2300 | |
67396759 | toi333 | C | Dec. 21, 2019, 11:58 p.m. | OK | GNU C++17 | TESTS | 13 | 139 | 3072000 | 2300 | |
68011187 | Lucina | C | Dec. 31, 2019, 3:52 p.m. | OK | GNU C++17 | TESTS | 13 | 139 | 3174400 | 2300 | |
67434476 | KZNS | C | Dec. 22, 2019, 4:33 p.m. | OK | GNU C++17 | TESTS | 13 | 139 | 3584000 | 2300 | |
67771947 | spencer | C | Dec. 28, 2019, 7:11 a.m. | OK | GNU C++17 | TESTS | 13 | 139 | 7782400 | 2300 | |
67569219 | Thuleanx | C | Dec. 24, 2019, 8:54 p.m. | OK | GNU C++17 | TESTS | 13 | 139 | 10240000 | 2300 | |
67365050 | _SW | C | Dec. 21, 2019, 12:53 p.m. | OK | GNU C++17 | TESTS | 13 | 140 | 1638400 | 2300 | |
68992587 | ZeyadKhattab | C | Jan. 17, 2020, 3:51 p.m. | OK | Java 11 | TESTS | 13 | 841 | 48537600 | 2300 | |
67350439 | uwi | C | Dec. 21, 2019, 12:02 p.m. | OK | Java 8 | TESTS | 13 | 265 | 3174400 | 2300 | |
68253132 | dyhu083 | C | Jan. 5, 2020, 2:26 p.m. | OK | Java 8 | TESTS | 13 | 280 | 0 | 2300 | |
67688127 | BaZ_ | C | Dec. 27, 2019, 9:50 a.m. | OK | Java 8 | TESTS | 13 | 280 | 13824000 | 2300 | |
67388842 | Suzukaze | C | Dec. 21, 2019, 6:51 p.m. | OK | Java 8 | TESTS | 13 | 311 | 12902400 | 2300 | |
67494751 | beroul | C | Dec. 23, 2019, 9:38 p.m. | OK | Java 8 | TESTS | 13 | 358 | 15257600 | 2300 | |
67342664 | cwise | C | Dec. 21, 2019, 11:36 a.m. | OK | Java 8 | TESTS | 13 | 389 | 48128000 | 2300 | |
67366203 | AnandOza | C | Dec. 21, 2019, 12:57 p.m. | OK | Java 8 | TESTS | 13 | 420 | 14950400 | 2300 | |
67678995 | Ahmad | C | Dec. 27, 2019, 5:03 a.m. | OK | Java 8 | TESTS | 13 | 436 | 2355200 | 2300 | |
67377378 | dusty.and.rusty | C | Dec. 21, 2019, 3:24 p.m. | OK | Java 8 | TESTS | 13 | 545 | 20582400 | 2300 | |
67436535 | DarLam | C | Dec. 22, 2019, 5:24 p.m. | OK | Java 8 | TESTS | 13 | 904 | 16998400 | 2300 | |
67359267 | knightL | C | Dec. 21, 2019, 12:32 p.m. | OK | Kotlin | TESTS | 13 | 748 | 24268800 | 2300 | |
67354315 | EmK | C | Dec. 21, 2019, 12:14 p.m. | OK | Mono C# | TESTS | 13 | 202 | 23756800 | 2300 | |
67859842 | EmK | C | Dec. 29, 2019, 7:42 a.m. | OK | Mono C# | TESTS | 13 | 234 | 23756800 | 2300 | |
67392074 | r57shell | C | Dec. 21, 2019, 8:18 p.m. | OK | MS C++ | TESTS | 13 | 171 | 3993600 | 2300 | |
67774678 | vjudge3 | C | Dec. 28, 2019, 8:28 a.m. | OK | MS C++ | TESTS | 13 | 171 | 8806400 | 2300 | |
67358453 | math957963 | C | Dec. 21, 2019, 12:29 p.m. | OK | MS C++ | TESTS | 13 | 249 | 24883200 | 2300 | |
67455555 | pichulia | C | Dec. 23, 2019, 6:42 a.m. | OK | MS C++ 2017 | TESTS | 13 | 249 | 10035200 | 2300 | |
67499531 | Jane_Eye | C | Dec. 24, 2019, 3:18 a.m. | OK | MS C++ 2017 | TESTS | 13 | 312 | 16793600 | 2300 | |
67988236 | AlexanderL | C | Dec. 31, 2019, 1:41 a.m. | OK | MS C++ 2017 | TESTS | 13 | 373 | 1638400 | 2300 | |
67364027 | neterukun | C | Dec. 21, 2019, 12:49 p.m. | OK | PyPy 3 | TESTS | 13 | 1107 | 43929600 | 2300 | |
67353462 | cftt | C | Dec. 21, 2019, 12:12 p.m. | OK | PyPy 3 | TESTS | 13 | 1372 | 44646400 | 2300 |
Back to search problems