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 |
---|---|---|---|---|---|---|
1286 | Codeforces Round 612 (Div. 1) | FINISHED | False | 7200 | 159119711 | Jan. 5, 2020, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 8951 ) | A | Garland | PROGRAMMING | dp greedy sortings | 1700 |
B'Vadim loves decorating the Christmas tree, so he got a beautiful garland as a present. It consists of n light bulbs in a single row. Each bulb has a number from 1 to n (in arbitrary order), such that all the numbers are distinct. While Vadim was solving problems, his home Carp removed some light bulbs from the garland. Now Vadim wants to put them back on. Vadim wants to put all bulb back on the garland. Vadim defines complexity of a garland to be the number of pairs of adjacent bulbs with numbers with different parity (remainder of the division by 2 ). For example, the complexity of 1 4 2 3 5 is 2 and the complexity of 1 3 5 7 6 4 2 is 1 . No one likes complexity, so Vadim wants to minimize the number of such pairs. Find the way to put all bulbs back on the garland, such that the complexity is as small as possible. The first line contains a single integer n ( 1 <= n <= 100 ) -- the number of light bulbs on the garland. The second line contains n integers p_1, p_2, ldots, p_n ( 0 <= p_i <= n ) -- the number on the i -th bulb, or 0 if it was removed. Output a single number -- the minimum complexity of the garland. In the first example, one should place light bulbs as 1 5 4 2 3. In that case, the complexity would be equal to 2, because only (5, 4) and (2, 3) are the pairs of adjacent bulbs that have different parity. In the second case, one of the correct answers is 1 7 3 5 6 4 2. '... |
Codeforces Round #612 - Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
68256695 | iica | A | Jan. 5, 2020, 2:38 p.m. | OK | D | TESTS | 63 | 31 | 12083200 | 1700 | |
68255811 | avm | A | Jan. 5, 2020, 2:35 p.m. | OK | D | TESTS | 63 | 31 | 25292800 | 1700 | |
68270684 | hos.lyric | A | Jan. 5, 2020, 3:34 p.m. | OK | D | TESTS | 63 | 46 | 0 | 1700 | |
68488431 | ananaygupta70 | A | Jan. 10, 2020, 10:45 a.m. | OK | GNU C11 | TESTS | 64 | 31 | 0 | 1700 | |
68345313 | lalithya1211 | A | Jan. 7, 2020, 6:52 a.m. | OK | GNU C11 | TESTS | 64 | 31 | 1024000 | 1700 | |
68255089 | physics0523 | A | Jan. 5, 2020, 2:32 p.m. | OK | GNU C11 | TESTS | 63 | 46 | 33587200 | 1700 | |
68918408 | Duke_dyf | A | Jan. 16, 2020, 8:55 a.m. | OK | GNU C++11 | TESTS | 64 | 30 | 102400 | 1700 | |
69390903 | Vanquisher | A | Jan. 23, 2020, 3:38 a.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69214834 | alephzero | A | Jan. 20, 2020, 11:16 p.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69214757 | alephzero | A | Jan. 20, 2020, 11:10 p.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69214747 | alephzero | A | Jan. 20, 2020, 11:09 p.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69214715 | alephzero | A | Jan. 20, 2020, 11:06 p.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69030322 | A.K.E.E. | A | Jan. 18, 2020, 7:59 a.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69459222 | hoiek12 | A | Jan. 24, 2020, 9:57 a.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69390932 | Nyse | A | Jan. 23, 2020, 3:39 a.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
69542537 | jaina | A | Jan. 25, 2020, 10:39 p.m. | OK | GNU C++11 | TESTS | 64 | 31 | 0 | 1700 | |
68317148 | Shrey2809 | A | Jan. 6, 2020, 1:37 p.m. | OK | GNU C++14 | TESTS | 64 | 15 | 102400 | 1700 | |
68383775 | justindcheng | A | Jan. 8, 2020, 4:12 a.m. | OK | GNU C++14 | TESTS | 64 | 30 | 0 | 1700 | |
68291205 | Meowl | A | Jan. 5, 2020, 9:24 p.m. | OK | GNU C++14 | TESTS | 64 | 30 | 0 | 1700 | |
68252684 | kal013 | A | Jan. 5, 2020, 2:25 p.m. | OK | GNU C++14 | TESTS | 63 | 30 | 0 | 1700 | |
68594287 | JMagdalina | A | Jan. 11, 2020, 1:35 p.m. | OK | GNU C++14 | TESTS | 64 | 30 | 0 | 1700 | |
68883144 | tenser | A | Jan. 15, 2020, 7:44 p.m. | OK | GNU C++14 | TESTS | 64 | 30 | 0 | 1700 | |
68858577 | noticeMeSempai | A | Jan. 15, 2020, 11:21 a.m. | OK | GNU C++14 | TESTS | 64 | 30 | 0 | 1700 | |
69074008 | vjudge5 | A | Jan. 19, 2020, 1:26 a.m. | OK | GNU C++14 | TESTS | 64 | 30 | 102400 | 1700 | |
68363284 | tthanhminhlqd1112lqd | A | Jan. 7, 2020, 2:56 p.m. | OK | GNU C++14 | TESTS | 64 | 30 | 102400 | 1700 | |
68363143 | tthanhminhlqd1112lqd | A | Jan. 7, 2020, 2:53 p.m. | OK | GNU C++14 | TESTS | 64 | 30 | 102400 | 1700 | |
68246359 | KADR | A | Jan. 5, 2020, 2:11 p.m. | OK | GNU C++17 | TESTS | 63 | 15 | 102400 | 1700 | |
69085100 | aman06016 | A | Jan. 19, 2020, 7:59 a.m. | OK | GNU C++17 | TESTS | 64 | 15 | 204800 | 1700 | |
68290267 | hearthewsong | A | Jan. 5, 2020, 8:39 p.m. | OK | GNU C++17 | TESTS | 63 | 30 | 0 | 1700 | |
68288863 | pseudonimoX | A | Jan. 5, 2020, 7:51 p.m. | OK | GNU C++17 | TESTS | 63 | 30 | 0 | 1700 | |
68323979 | boody.smile.bs | A | Jan. 6, 2020, 4:05 p.m. | OK | GNU C++17 | TESTS | 64 | 30 | 0 | 1700 | |
68392377 | inin864 | A | Jan. 8, 2020, 9:17 a.m. | OK | GNU C++17 | TESTS | 64 | 30 | 0 | 1700 | |
68714324 | Vayu2.0 | A | Jan. 13, 2020, 1:58 p.m. | OK | GNU C++17 | TESTS | 64 | 30 | 0 | 1700 | |
68772997 | dllp | A | Jan. 14, 2020, 12:32 p.m. | OK | GNU C++17 | TESTS | 64 | 30 | 102400 | 1700 | |
68331562 | Opcode | A | Jan. 6, 2020, 7:04 p.m. | OK | GNU C++17 | TESTS | 64 | 30 | 102400 | 1700 | |
68308384 | twinArmageddons | A | Jan. 6, 2020, 10:01 a.m. | OK | GNU C++17 | TESTS | 64 | 30 | 102400 | 1700 | |
68896468 | cs_office | A | Jan. 16, 2020, 4:38 a.m. | OK | Go | TESTS | 64 | 31 | 0 | 1700 | |
68653219 | JHSN | A | Jan. 12, 2020, 11:25 a.m. | OK | Go | TESTS | 64 | 46 | 0 | 1700 | |
68246530 | ilyakor | A | Jan. 5, 2020, 2:11 p.m. | OK | Java 11 | TESTS | 63 | 202 | 0 | 1700 | |
69082450 | ashanksingh1997 | A | Jan. 19, 2020, 6:59 a.m. | OK | Java 11 | TESTS | 64 | 218 | 5939200 | 1700 | |
68247361 | ZeyadKhattab | A | Jan. 5, 2020, 2:12 p.m. | OK | Java 11 | TESTS | 63 | 233 | 5939200 | 1700 | |
68253831 | mikit | A | Jan. 5, 2020, 2:28 p.m. | OK | Java 11 | TESTS | 63 | 529 | 5836800 | 1700 | |
68834853 | cairui | A | Jan. 15, 2020, 2:20 a.m. | OK | Java 8 | TESTS | 64 | 124 | 0 | 1700 | |
68616016 | Smir | A | Jan. 11, 2020, 5:30 p.m. | OK | Java 8 | TESTS | 64 | 124 | 0 | 1700 | |
68310597 | yaoct | A | Jan. 6, 2020, 11 a.m. | OK | Java 8 | TESTS | 64 | 124 | 0 | 1700 | |
68262221 | SecondThread | A | Jan. 5, 2020, 2:59 p.m. | OK | Java 8 | TESTS | 63 | 124 | 0 | 1700 | |
68259195 | uwi | A | Jan. 5, 2020, 2:47 p.m. | OK | Java 8 | TESTS | 63 | 124 | 0 | 1700 | |
68253650 | iakovlev.zakhar | A | Jan. 5, 2020, 2:28 p.m. | OK | Java 8 | TESTS | 63 | 124 | 0 | 1700 | |
68252619 | alexyz | A | Jan. 5, 2020, 2:25 p.m. | OK | Java 8 | TESTS | 63 | 124 | 0 | 1700 | |
68671171 | jj_9425 | A | Jan. 12, 2020, 4:54 p.m. | OK | Java 8 | TESTS | 64 | 139 | 0 | 1700 | |
68263434 | AnandOza | A | Jan. 5, 2020, 3:04 p.m. | OK | Java 8 | TESTS | 63 | 139 | 0 | 1700 | |
68962470 | cairui | A | Jan. 17, 2020, 2:18 a.m. | OK | Java 8 | TESTS | 64 | 140 | 0 | 1700 | |
68259791 | Tlatoani | A | Jan. 5, 2020, 2:49 p.m. | OK | Kotlin | TESTS | 63 | 155 | 0 | 1700 | |
68251011 | knightL | A | Jan. 5, 2020, 2:20 p.m. | OK | Kotlin | TESTS | 63 | 156 | 102400 | 1700 | |
68292461 | magdi | A | Jan. 5, 2020, 10:34 p.m. | OK | Kotlin | TESTS | 64 | 295 | 43520000 | 1700 | |
68472272 | tycyd | A | Jan. 10, 2020, 2:49 a.m. | OK | Mono C# | TESTS | 64 | 46 | 0 | 1700 | |
68947856 | Taiber009 | A | Jan. 16, 2020, 4:51 p.m. | OK | Mono C# | TESTS | 64 | 62 | 1638400 | 1700 | |
68573086 | Taiber009 | A | Jan. 11, 2020, 3:30 a.m. | OK | Mono C# | TESTS | 64 | 62 | 1638400 | 1700 | |
68382280 | camypaper | A | Jan. 8, 2020, 2:38 a.m. | OK | Mono C# | TESTS | 64 | 62 | 53760000 | 1700 | |
68251630 | mban259 | A | Jan. 5, 2020, 2:22 p.m. | OK | Mono C# | TESTS | 63 | 77 | 1945600 | 1700 | |
68255716 | tarattata1 | A | Jan. 5, 2020, 2:34 p.m. | OK | MS C++ | TESTS | 63 | 46 | 102400 | 1700 | |
68261229 | math957963 | A | Jan. 5, 2020, 2:55 p.m. | OK | MS C++ | TESTS | 63 | 46 | 921600 | 1700 | |
68253691 | pichulia | A | Jan. 5, 2020, 2:28 p.m. | OK | MS C++ 2017 | TESTS | 63 | 31 | 0 | 1700 | |
68265842 | EgorShibaev | A | Jan. 5, 2020, 3:14 p.m. | OK | MS C++ 2017 | TESTS | 63 | 31 | 0 | 1700 | |
68263427 | vpike | A | Jan. 5, 2020, 3:04 p.m. | OK | MS C++ 2017 | TESTS | 63 | 31 | 307200 | 1700 | |
69197858 | fwg4 | A | Jan. 20, 2020, 3:30 p.m. | OK | MS C++ 2017 | TESTS | 64 | 31 | 307200 | 1700 | |
68373250 | Rudovich | A | Jan. 7, 2020, 6:32 p.m. | OK | MS C++ 2017 | TESTS | 64 | 31 | 307200 | 1700 | |
68265837 | AlexanderL | A | Jan. 5, 2020, 3:14 p.m. | OK | MS C++ 2017 | TESTS | 63 | 31 | 307200 | 1700 | |
68258059 | Baharevim | A | Jan. 5, 2020, 2:42 p.m. | OK | MS C++ 2017 | TESTS | 63 | 31 | 307200 | 1700 | |
68256830 | alanM | A | Jan. 5, 2020, 2:38 p.m. | OK | MS C++ 2017 | TESTS | 63 | 31 | 307200 | 1700 | |
68949666 | amrKh | A | Jan. 16, 2020, 5:29 p.m. | OK | MS C++ 2017 | TESTS | 64 | 31 | 8294400 | 1700 | |
68412103 | CygneNoir | A | Jan. 8, 2020, 5:24 p.m. | OK | MS C++ 2017 | TESTS | 64 | 31 | 9523200 | 1700 | |
68282610 | MVP | A | Jan. 5, 2020, 5:27 p.m. | OK | PyPy 2 | TESTS | 63 | 124 | 0 | 1700 | |
69085516 | thuutin | A | Jan. 19, 2020, 8:08 a.m. | OK | PyPy 2 | TESTS | 64 | 171 | 3072000 | 1700 | |
69095622 | thuutin | A | Jan. 19, 2020, 11:55 a.m. | OK | PyPy 2 | TESTS | 64 | 202 | 0 | 1700 | |
68921977 | shivam_hbtu | A | Jan. 16, 2020, 9:35 a.m. | OK | PyPy 3 | TESTS | 64 | 140 | 0 | 1700 | |
68667960 | thefighter | A | Jan. 12, 2020, 3:48 p.m. | OK | PyPy 3 | TESTS | 64 | 140 | 0 | 1700 | |
68317149 | xiema | A | Jan. 6, 2020, 1:37 p.m. | OK | PyPy 3 | TESTS | 64 | 140 | 0 | 1700 | |
69197797 | InfiniteDescent | A | Jan. 20, 2020, 3:29 p.m. | OK | PyPy 3 | TESTS | 64 | 155 | 0 | 1700 | |
68262022 | SPD_9X2 | A | Jan. 5, 2020, 2:58 p.m. | OK | PyPy 3 | TESTS | 63 | 155 | 0 | 1700 | |
68394153 | SMMaster | A | Jan. 8, 2020, 10:11 a.m. | OK | PyPy 3 | TESTS | 64 | 155 | 2252800 | 1700 | |
68259733 | Kiri8128 | A | Jan. 5, 2020, 2:49 p.m. | OK | PyPy 3 | TESTS | 63 | 170 | 2252800 | 1700 | |
68253830 | cftt | A | Jan. 5, 2020, 2:28 p.m. | OK | PyPy 3 | TESTS | 63 | 171 | 2355200 | 1700 | |
68253934 | hanamaki | A | Jan. 5, 2020, 2:29 p.m. | OK | PyPy 3 | TESTS | 63 | 171 | 2867200 | 1700 | |
68251874 | neterukun | A | Jan. 5, 2020, 2:23 p.m. | OK | PyPy 3 | TESTS | 63 | 187 | 3276800 | 1700 | |
68251773 | nwi | A | Jan. 5, 2020, 2:22 p.m. | OK | Python 2 | TESTS | 63 | 202 | 0 | 1700 | |
69581127 | UR5ANO | A | Jan. 26, 2020, 5:26 p.m. | OK | Python 3 | TESTS | 64 | 109 | 512000 | 1700 | |
69052947 | a2315903293 | A | Jan. 18, 2020, 1:22 p.m. | OK | Python 3 | TESTS | 64 | 109 | 819200 | 1700 | |
68418806 | titia | A | Jan. 8, 2020, 8:22 p.m. | OK | Python 3 | TESTS | 64 | 124 | 307200 | 1700 | |
68718732 | sherlock8696 | A | Jan. 13, 2020, 3:26 p.m. | OK | Python 3 | TESTS | 64 | 124 | 512000 | 1700 | |
68410272 | xuanji | A | Jan. 8, 2020, 4:43 p.m. | OK | Python 3 | TESTS | 64 | 139 | 819200 | 1700 | |
68258013 | r57shell | A | Jan. 5, 2020, 2:42 p.m. | OK | Python 3 | TESTS | 63 | 140 | 512000 | 1700 | |
68257152 | Dart-Xeyter | A | Jan. 5, 2020, 2:39 p.m. | OK | Python 3 | TESTS | 63 | 140 | 512000 | 1700 | |
69574195 | Brahma_Thigathathigan | A | Jan. 26, 2020, 3:01 p.m. | OK | Python 3 | TESTS | 64 | 155 | 512000 | 1700 | |
68388360 | orailly | A | Jan. 8, 2020, 7:16 a.m. | OK | Python 3 | TESTS | 64 | 155 | 819200 | 1700 | |
69087240 | sansen | A | Jan. 19, 2020, 8:47 a.m. | OK | Rust | TESTS | 64 | 46 | 0 | 1700 | |
68249546 | ichyo | A | Jan. 5, 2020, 2:17 p.m. | OK | Rust | TESTS | 63 | 46 | 8294400 | 1700 | |
68342460 | reldan | A | Jan. 7, 2020, 4:59 a.m. | OK | Scala | TESTS | 64 | 530 | 204800 | 1700 |
Back to search problems