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 |
---|---|---|---|---|---|---|
1471 | Codeforces Round 694 (Div. 2) | FINISHED | False | 7200 | 127409063 | Jan. 5, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 27454 ) | A | Strange Partition | PROGRAMMING | greedy math number theory |
B'You are given an array a of length n , and an integer x . You can perform the following operation as many times as you would like (possibly zero): replace two adjacent elements of the array by their sum. For example, if the initial array was [3, 6, 9] , in a single operation one can replace the last two elements by their sum, yielding an array [3, 15] , or replace the first two elements to get an array [9, 9] . Note that the size of the array decreases after each operation. The beauty of an array b=[b_1, ldots, b_k] is defined as sum_{i=1}^k <= ft lceil frac{b_i}{x} right rceil , which means that we divide each element by x , round it up to the nearest integer, and sum up the resulting values. For example, if x = 3 , and the array is [4, 11, 6] , the beauty of the array is equal to <= ft lceil frac{4}{3} right rceil + <= ft lceil frac{11}{3} right rceil + <= ft lceil frac{6}{3} right rceil = 2 + 4 + 2 = 8 . Please determine the minimum and the maximum beauty you can get by performing some operations on the original array. The first input line contains a single integer t -- the number of test cases ( 1 <= t <= 1000 ). The first line of each test case contains two integers n and x ( 1 <= q n <= q 10^5 , 1 <= q x <= q 10^9 ). The next line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^9 ), the elements of the array a . It is guaranteed that the sum of values of n over all test cases does not exceed 10^5 . For each test case output two integers -- the minimal and the maximal possible beauty. In the first test case the beauty of the array does not change if we perform any operations. In the second example we can leave the array unchanged to attain the maximum beauty, and to get the minimum beauty one can replace two elements 4 and 11 with their sum, yielding an array [6, 15] , which has i'... |
Codeforces Round #694 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
103498428 | Ayurelife | A | Jan. 6, 2021, 3:57 a.m. | OK | GNU C11 | TESTS | 24 | 46 | 0 | ||
103481137 | nizojamanshohan | A | Jan. 5, 2021, 8:39 p.m. | OK | GNU C11 | TESTS | 24 | 46 | 0 | ||
103502921 | chowdhuryshashwoto | A | Jan. 6, 2021, 5:10 a.m. | OK | GNU C11 | TESTS | 24 | 46 | 409600 | ||
103465551 | mohan7575 | A | Jan. 5, 2021, 5:49 p.m. | OK | GNU C11 | TESTS | 24 | 46 | 409600 | ||
103457578 | friendAlbert | A | Jan. 5, 2021, 4:27 p.m. | OK | GNU C11 | TESTS | 24 | 46 | 819200 | ||
103467928 | namanbhatia11111 | A | Jan. 5, 2021, 6:04 p.m. | OK | GNU C11 | TESTS | 24 | 46 | 819200 | ||
103495272 | iterater | A | Jan. 6, 2021, 2:51 a.m. | OK | GNU C++11 | TESTS | 24 | 15 | 409600 | ||
103498616 | vectorwyx | A | Jan. 6, 2021, 4 a.m. | OK | GNU C++11 | TESTS | 24 | 30 | 409600 | ||
103469212 | niveton | A | Jan. 5, 2021, 6:13 p.m. | OK | GNU C++11 | TESTS | 24 | 31 | 0 | ||
103491103 | LengYun | A | Jan. 6, 2021, 1:06 a.m. | OK | GNU C++11 | TESTS | 24 | 31 | 0 | ||
103495919 | Lu_Anlai | A | Jan. 6, 2021, 3:06 a.m. | OK | GNU C++11 | TESTS | 24 | 31 | 102400 | ||
103502909 | GSHgsh | A | Jan. 6, 2021, 5:10 a.m. | OK | GNU C++11 | TESTS | 24 | 31 | 409600 | ||
103497625 | Welsh-corgi | A | Jan. 6, 2021, 3:41 a.m. | OK | GNU C++11 | TESTS | 24 | 31 | 1638400 | ||
103494108 | Celtic | A | Jan. 6, 2021, 2:25 a.m. | OK | GNU C++11 | TESTS | 24 | 31 | 1638400 | ||
103502295 | mikechan | A | Jan. 6, 2021, 5:01 a.m. | OK | GNU C++11 | TESTS | 24 | 46 | 0 | ||
103496525 | Leaving_ | A | Jan. 6, 2021, 3:18 a.m. | OK | GNU C++11 | TESTS | 24 | 46 | 0 | ||
103492332 | nandonathaniel | A | Jan. 6, 2021, 1:38 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103491276 | _greymatter | A | Jan. 6, 2021, 1:11 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103490166 | pinku_boss | A | Jan. 6, 2021, 12:37 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103479885 | ArminAzimi | A | Jan. 5, 2021, 8:18 p.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103500648 | Newplayers12 | A | Jan. 6, 2021, 4:35 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103501832 | mahir_314 | A | Jan. 6, 2021, 4:54 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103503593 | Shenpai_Sharma | A | Jan. 6, 2021, 5:20 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103506091 | Anuj12499 | A | Jan. 6, 2021, 5:54 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103499725 | zwu_2018010337 | A | Jan. 6, 2021, 4:19 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103497085 | chocotruffle | A | Jan. 6, 2021, 3:30 a.m. | OK | GNU C++14 | TESTS | 24 | 46 | 0 | ||
103495495 | Naseem17 | A | Jan. 6, 2021, 2:56 a.m. | OK | GNU C++17 | TESTS | 24 | 31 | 409600 | ||
103504852 | Hemant_Kumar79 | A | Jan. 6, 2021, 5:38 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103503578 | SmiteshP | A | Jan. 6, 2021, 5:19 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103503031 | ar7L | A | Jan. 6, 2021, 5:12 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103502496 | codespeed | A | Jan. 6, 2021, 5:04 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103501117 | Fau818 | A | Jan. 6, 2021, 4:42 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103500365 | Beyond_ay | A | Jan. 6, 2021, 4:30 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103500328 | Protector_2131 | A | Jan. 6, 2021, 4:29 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103500257 | divyn | A | Jan. 6, 2021, 4:28 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103499875 | imprakarsh | A | Jan. 6, 2021, 4:22 a.m. | OK | GNU C++17 | TESTS | 24 | 46 | 0 | ||
103503851 | makshat1234 | A | Jan. 6, 2021, 5:23 a.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103469587 | june_waves | A | Jan. 5, 2021, 6:17 p.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103469054 | Dahiya27 | A | Jan. 5, 2021, 6:12 p.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103474460 | Emaneru | A | Jan. 5, 2021, 7:06 p.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103493456 | mahesh_193 | A | Jan. 6, 2021, 2:07 a.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103494928 | chctxdy68 | A | Jan. 6, 2021, 2:44 a.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103500059 | Coder_Bhavansh | A | Jan. 6, 2021, 4:25 a.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103500679 | Parikh_P | A | Jan. 6, 2021, 4:36 a.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103503822 | alif_cse_ju | A | Jan. 6, 2021, 5:23 a.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 0 | ||
103468724 | the_hyp0cr1t3 | A | Jan. 5, 2021, 6:09 p.m. | OK | GNU C++17 (64) | TESTS | 24 | 31 | 409600 | ||
103500609 | 0x3F | A | Jan. 6, 2021, 4:34 a.m. | OK | Go | TESTS | 24 | 93 | 102400 | ||
103477202 | Jepbar_Asgarov | A | Jan. 5, 2021, 7:39 p.m. | OK | Go | TESTS | 24 | 108 | 409600 | ||
103469982 | clyring | A | Jan. 5, 2021, 6:20 p.m. | OK | Haskell | TESTS | 24 | 373 | 23142400 | ||
103501366 | Aayush.007 | A | Jan. 6, 2021, 4:46 a.m. | OK | Java 11 | TESTS | 24 | 187 | 0 | ||
103501139 | Aayush.007 | A | Jan. 6, 2021, 4:43 a.m. | OK | Java 11 | TESTS | 24 | 202 | 0 | ||
103488289 | mphillotry | A | Jan. 5, 2021, 11:36 p.m. | OK | Java 11 | TESTS | 24 | 202 | 0 | ||
103475745 | Toinfinity | A | Jan. 5, 2021, 7:20 p.m. | OK | Java 11 | TESTS | 24 | 217 | 0 | ||
103459561 | Aayush.007 | A | Jan. 5, 2021, 4:32 p.m. | OK | Java 11 | TESTS | 24 | 217 | 0 | ||
103504782 | anshum_it_is | A | Jan. 6, 2021, 5:37 a.m. | OK | Java 11 | TESTS | 24 | 218 | 0 | ||
103493946 | pikachu_pika_pika | A | Jan. 6, 2021, 2:20 a.m. | OK | Java 11 | TESTS | 24 | 218 | 0 | ||
103476560 | KhanhNguyenn | A | Jan. 5, 2021, 7:31 p.m. | OK | Java 11 | TESTS | 24 | 218 | 0 | ||
103498921 | area__51 | A | Jan. 6, 2021, 4:06 a.m. | OK | Java 11 | TESTS | 24 | 233 | 0 | ||
103504500 | mass29 | A | Jan. 6, 2021, 5:33 a.m. | OK | Java 11 | TESTS | 24 | 233 | 0 | ||
103497722 | kamal_20 | A | Jan. 6, 2021, 3:43 a.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103495350 | 3434194755HaiTQ | A | Jan. 6, 2021, 2:53 a.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103494793 | kbadrinath | A | Jan. 6, 2021, 2:41 a.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103479118 | deepaksach | A | Jan. 5, 2021, 8:06 p.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103478904 | _Sourav_ | A | Jan. 5, 2021, 8:03 p.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103464607 | Vaibhav_patel19 | A | Jan. 5, 2021, 5:45 p.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103461307 | iam3iamnothing | A | Jan. 5, 2021, 4:34 p.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103458392 | tarun_sm | A | Jan. 5, 2021, 4:29 p.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103506355 | mananparmar | A | Jan. 6, 2021, 5:58 a.m. | OK | Java 8 | TESTS | 24 | 124 | 0 | ||
103470694 | Ahmed.Hany2727 | A | Jan. 5, 2021, 6:26 p.m. | OK | Java 8 | TESTS | 24 | 124 | 1843200 | ||
103501072 | kabden.a | A | Jan. 6, 2021, 4:42 a.m. | OK | JavaScript | TESTS | 24 | 62 | 14540800 | ||
103500872 | kabden.a | A | Jan. 6, 2021, 4:39 a.m. | OK | JavaScript | TESTS | 24 | 78 | 14643200 | ||
103499067 | Spheniscine | A | Jan. 6, 2021, 4:08 a.m. | OK | Kotlin | TESTS | 24 | 139 | 0 | ||
103504897 | ThinkingDobby | A | Jan. 6, 2021, 5:39 a.m. | OK | Kotlin | TESTS | 24 | 139 | 307200 | ||
103501540 | a1000 | A | Jan. 6, 2021, 4:50 a.m. | OK | Kotlin | TESTS | 24 | 202 | 5427200 | ||
103458871 | vladisov | A | Jan. 5, 2021, 4:30 p.m. | OK | Kotlin | TESTS | 24 | 217 | 5222400 | ||
103468642 | pallav12 | A | Jan. 5, 2021, 6:09 p.m. | OK | Kotlin | TESTS | 24 | 218 | 4710400 | ||
103467060 | Tlatoani | A | Jan. 5, 2021, 5:58 p.m. | OK | Kotlin | TESTS | 24 | 218 | 5222400 | ||
103468230 | CepGamer | A | Jan. 5, 2021, 6:06 p.m. | OK | Kotlin | TESTS | 24 | 265 | 0 | ||
103465738 | BIT | A | Jan. 5, 2021, 5:50 p.m. | OK | Mono C# | TESTS | 24 | 93 | 16281600 | ||
103497729 | Keenan2114 | A | Jan. 6, 2021, 3:43 a.m. | OK | MS C++ | TESTS | 24 | 31 | 0 | ||
103466230 | Zzerro | A | Jan. 5, 2021, 5:53 p.m. | OK | MS C++ | TESTS | 24 | 93 | 0 | ||
103501839 | Amigos20 | A | Jan. 6, 2021, 4:54 a.m. | OK | MS C++ 2017 | TESTS | 24 | 62 | 819200 | ||
103477531 | strop | A | Jan. 5, 2021, 7:43 p.m. | OK | MS C++ 2017 | TESTS | 24 | 108 | 1024000 | ||
103465956 | Vitazzz | A | Jan. 5, 2021, 5:51 p.m. | OK | MS C++ 2017 | TESTS | 24 | 109 | 0 | ||
103466154 | poulaatef | A | Jan. 5, 2021, 5:52 p.m. | OK | MS C++ 2017 | TESTS | 24 | 109 | 0 | ||
103465335 | stepus53 | A | Jan. 5, 2021, 5:48 p.m. | OK | MS C++ 2017 | TESTS | 24 | 109 | 819200 | ||
103473174 | gever_gever | A | Jan. 5, 2021, 6:53 p.m. | OK | MS C++ 2017 | TESTS | 24 | 109 | 2252800 | ||
103477091 | fatvlad_ | A | Jan. 5, 2021, 7:37 p.m. | OK | MS C++ 2017 | TESTS | 24 | 124 | 409600 | ||
103468657 | ustaritz | A | Jan. 5, 2021, 6:09 p.m. | OK | MS C++ 2017 | TESTS | 24 | 124 | 409600 | ||
103497679 | dheerajd5 | A | Jan. 6, 2021, 3:42 a.m. | OK | MS C++ 2017 | TESTS | 24 | 124 | 819200 | ||
103465086 | stepus53 | A | Jan. 5, 2021, 5:47 p.m. | OK | MS C++ 2017 | TESTS | 24 | 124 | 819200 | ||
103502950 | batyrbek.zhunis | A | Jan. 6, 2021, 5:11 a.m. | OK | PHP | TESTS | 24 | 733 | 7987200 | ||
103486593 | whaleee | A | Jan. 5, 2021, 10:44 p.m. | OK | PyPy 2 | TESTS | 24 | 124 | 8089600 | ||
103472481 | realnimish | A | Jan. 5, 2021, 6:45 p.m. | OK | PyPy 2 | TESTS | 24 | 155 | 9523200 | ||
103479078 | TheVan | A | Jan. 5, 2021, 8:06 p.m. | OK | PyPy 3 | TESTS | 24 | 171 | 9830400 | ||
103467677 | otajonov_sherzod | A | Jan. 5, 2021, 6:02 p.m. | OK | PyPy 3 | TESTS | 24 | 186 | 7987200 | ||
103472719 | Anuranjan_Pandey | A | Jan. 5, 2021, 6:48 p.m. | OK | PyPy 3 | TESTS | 24 | 186 | 9932800 | ||
103485225 | experimental | A | Jan. 5, 2021, 10:07 p.m. | OK | PyPy 3 | TESTS | 24 | 187 | 10035200 | ||
103478541 | at_f | A | Jan. 5, 2021, 7:58 p.m. | OK | PyPy 3 | TESTS | 24 | 202 | 9318400 | ||
103499503 | rajbit | A | Jan. 6, 2021, 4:16 a.m. | OK | PyPy 3 | TESTS | 24 | 202 | 10240000 | ||
103467648 | bravotango | A | Jan. 5, 2021, 6:02 p.m. | OK | PyPy 3 | TESTS | 24 | 202 | 10240000 | ||
103467455 | bravotango | A | Jan. 5, 2021, 6:01 p.m. | OK | PyPy 3 | TESTS | 24 | 202 | 10240000 | ||
103468483 | bravotango | A | Jan. 5, 2021, 6:08 p.m. | OK | PyPy 3 | TESTS | 24 | 202 | 12083200 | ||
103492691 | Pneumokogur8 | A | Jan. 6, 2021, 1:47 a.m. | OK | PyPy 3 | TESTS | 24 | 217 | 10956800 | ||
103477572 | _icy | A | Jan. 5, 2021, 7:43 p.m. | OK | Python 2 | TESTS | 24 | 233 | 5836800 | ||
103471532 | kaxi1993 | A | Jan. 5, 2021, 6:35 p.m. | OK | Python 3 | TESTS | 24 | 155 | 8908800 | ||
103473124 | sh1194 | A | Jan. 5, 2021, 6:52 p.m. | OK | Python 3 | TESTS | 24 | 155 | 9216000 | ||
103490576 | saiprasadjnv | A | Jan. 6, 2021, 12:50 a.m. | OK | Python 3 | TESTS | 24 | 170 | 8908800 | ||
103502232 | manmohan1105 | A | Jan. 6, 2021, 5 a.m. | OK | Python 3 | TESTS | 24 | 170 | 9113600 | ||
103497078 | phuocchubeo | A | Jan. 6, 2021, 3:30 a.m. | OK | Python 3 | TESTS | 24 | 171 | 7475200 | ||
103456055 | adkosmos | A | Jan. 5, 2021, 4:24 p.m. | OK | Python 3 | TESTS | 24 | 171 | 8294400 | ||
103489619 | codencode | A | Jan. 6, 2021, 12:20 a.m. | OK | Python 3 | TESTS | 24 | 171 | 8908800 | ||
103499506 | orazbek | A | Jan. 6, 2021, 4:16 a.m. | OK | Python 3 | TESTS | 24 | 171 | 9113600 | ||
103477578 | raj__aryan_ | A | Jan. 5, 2021, 7:44 p.m. | OK | Python 3 | TESTS | 24 | 171 | 9113600 | ||
103498777 | batyrbek.zhunis | A | Jan. 6, 2021, 4:03 a.m. | OK | Python 3 | TESTS | 24 | 171 | 9216000 | ||
103506784 | jaydeepmaddipati | A | Jan. 6, 2021, 6:03 a.m. | OK | Rust | TESTS | 24 | 46 | 3174400 | ||
103495109 | sigma_g | A | Jan. 6, 2021, 2:47 a.m. | OK | Rust | TESTS | 24 | 46 | 3891200 |
Back to search problems