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 |
---|---|---|---|---|---|---|
1348 | Codeforces Round 638 (Div. 2) | FINISHED | False | 9000 | 143479499 | May 1, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 39768 ) | A | Phoenix and Balance | PROGRAMMING | greedy math | 800 |
B'Phoenix has n coins with weights 2^1, 2^2, ... , 2^n . He knows that n is even. He wants to split the coins into two piles such that each pile has exactly frac{n}{2} coins and the difference of weights between the two piles is minimized. Formally, let a denote the sum of weights in the first pile, and b denote the sum of weights in the second pile. Help Phoenix minimize |a-b| , the absolute value of a-b . The input consists of multiple test cases. The first line contains an integer t ( 1 <= t <= 100 ) -- the number of test cases. The first line of each test case contains an integer n ( 2 <= n <= 30 ; n is even) -- the number of coins that Phoenix has. For each test case, output one integer -- the minimum possible difference of weights between the two piles. In the first test case, Phoenix has two coins with weights 2 and 4 . No matter how he divides the coins, the difference will be 4-2=2 . In the second test case, Phoenix has four coins of weight 2 , 4 , 8 , and 16 . It is optimal for Phoenix to place coins with weights 2 and 16 in one pile, and coins with weights 4 and 8 in another pile. The difference is (2+16)-(4+8)=6 . '... |
Codeforces Round #638 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
78768513 | flayer_hunter | A | May 1, 2020, 11:10 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78763202 | msakib | A | May 1, 2020, 9:04 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78762228 | Rahin31 | A | May 1, 2020, 8:46 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78761305 | Partha_sarothi | A | May 1, 2020, 8:32 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78760912 | 08coder23 | A | May 1, 2020, 8:26 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78759693 | Shadhin08 | A | May 1, 2020, 8:07 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78758404 | Dihu | A | May 1, 2020, 7:48 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78757196 | zeus_mmmut | A | May 1, 2020, 7:33 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78757025 | The_philomath | A | May 1, 2020, 7:30 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78751679 | lovekv4321 | A | May 1, 2020, 6:30 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | 800 | |
78760704 | _the_ripper_ | A | May 1, 2020, 8:23 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78768086 | alipervaiz | A | May 1, 2020, 10:57 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78768719 | rian_ahmed_rony | A | May 1, 2020, 11:16 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78765344 | _kira_1008 | A | May 1, 2020, 9:46 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78765026 | AzmayenSabil | A | May 1, 2020, 9:39 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78764838 | DiegoGarcia | A | May 1, 2020, 9:35 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78764562 | juanbrau.or | A | May 1, 2020, 9:30 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78762749 | mostafa_zahran | A | May 1, 2020, 8:55 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78768563 | zlt1117 | A | May 1, 2020, 11:11 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78762078 | Tonoy1010x | A | May 1, 2020, 8:43 p.m. | OK | GNU C++11 | TESTS | 5 | 15 | 0 | 800 | |
78766257 | jkhandhara | A | May 1, 2020, 10:06 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78768903 | R1F4 | A | May 1, 2020, 11:21 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78768901 | orton | A | May 1, 2020, 11:21 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78768794 | Biswas8927 | A | May 1, 2020, 11:18 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78767650 | manarmanar44 | A | May 1, 2020, 10:44 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78767582 | say_no_to_stalking | A | May 1, 2020, 10:42 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78767469 | cs18b062 | A | May 1, 2020, 10:38 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78767434 | akjnfake | A | May 1, 2020, 10:38 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78767040 | younissda63 | A | May 1, 2020, 10:26 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78766557 | quake0 | A | May 1, 2020, 10:13 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | 800 | |
78769000 | timish_04 | A | May 1, 2020, 11:24 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78768689 | Hello_world08 | A | May 1, 2020, 11:16 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78768639 | abhishekgautam011 | A | May 1, 2020, 11:14 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78768488 | _AhmedGamal_ | A | May 1, 2020, 11:09 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78768261 | DaMiraCode | A | May 1, 2020, 11:02 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78768132 | irafi | A | May 1, 2020, 10:58 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78767830 | InshaAllah | A | May 1, 2020, 10:50 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78767826 | SSaken | A | May 1, 2020, 10:50 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78767796 | lrvideckis | A | May 1, 2020, 10:49 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78767792 | ahmad.magdy | A | May 1, 2020, 10:49 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | 800 | |
78755760 | Md_Al_Siam | A | May 1, 2020, 7:13 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78767627 | Ameliorate | A | May 1, 2020, 10:43 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78766656 | Anisur_rahaman | A | May 1, 2020, 10:16 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78766313 | Anus1373 | A | May 1, 2020, 10:08 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78762725 | Hamoudi | A | May 1, 2020, 8:55 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78760617 | sarthakdb343 | A | May 1, 2020, 8:21 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78758312 | trafalgar_ | A | May 1, 2020, 7:47 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78757047 | KG_1910 | A | May 1, 2020, 7:31 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78755418 | legion_geek | A | May 1, 2020, 7:09 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78753695 | pseuda | A | May 1, 2020, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | 800 | |
78743294 | sucanbykep | A | May 1, 2020, 5:01 p.m. | OK | Go | TESTS | 5 | 31 | 0 | 800 | |
78720909 | Warren_Wei | A | May 1, 2020, 4:07 p.m. | OK | Go | TESTS | 5 | 31 | 0 | 800 | |
78765675 | Ko3i | A | May 1, 2020, 9:54 p.m. | OK | Haskell | TESTS | 5 | 30 | 0 | 800 | |
78762605 | dgcnz | A | May 1, 2020, 8:53 p.m. | OK | Haskell | TESTS | 5 | 31 | 0 | 800 | |
78758413 | mr___hacker____ | A | May 1, 2020, 7:49 p.m. | OK | Java 11 | TESTS | 5 | 155 | 0 | 800 | |
78752146 | pennyIsLove | A | May 1, 2020, 6:35 p.m. | OK | Java 11 | TESTS | 5 | 155 | 0 | 800 | |
78750926 | codiinggeek | A | May 1, 2020, 6:24 p.m. | OK | Java 11 | TESTS | 5 | 155 | 0 | 800 | |
78768597 | shivamnarware | A | May 1, 2020, 11:12 p.m. | OK | Java 11 | TESTS | 5 | 156 | 0 | 800 | |
78707301 | its_aks_ulure | A | May 1, 2020, 3:40 p.m. | OK | Java 11 | TESTS | 5 | 156 | 0 | 800 | |
78751435 | harm007 | A | May 1, 2020, 6:28 p.m. | OK | Java 11 | TESTS | 5 | 170 | 0 | 800 | |
78742251 | rashmitpankhania | A | May 1, 2020, 4:58 p.m. | OK | Java 11 | TESTS | 5 | 170 | 0 | 800 | |
78729991 | RGOEWEDKY | A | May 1, 2020, 4:27 p.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | 800 | |
78767299 | hady199 | A | May 1, 2020, 10:34 p.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | 800 | |
78754265 | Dukkha | A | May 1, 2020, 6:56 p.m. | OK | Java 11 | TESTS | 5 | 171 | 0 | 800 | |
78766404 | huapito | A | May 1, 2020, 10:09 p.m. | OK | Java 8 | TESTS | 5 | 92 | 0 | 800 | |
78756304 | prem_cse | A | May 1, 2020, 7:20 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | 800 | |
78762726 | nidhigoel | A | May 1, 2020, 8:55 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78760258 | Nirav412000 | A | May 1, 2020, 8:16 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78757575 | aswad2 | A | May 1, 2020, 7:38 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78757547 | harshitContest | A | May 1, 2020, 7:37 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78753302 | javasoul | A | May 1, 2020, 6:46 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78752668 | 05deepz | A | May 1, 2020, 6:40 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78735738 | thelastho | A | May 1, 2020, 4:42 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78734813 | Milo_Murphy | A | May 1, 2020, 4:40 p.m. | OK | Java 8 | TESTS | 5 | 108 | 0 | 800 | |
78704771 | MikasaAckermann | A | May 1, 2020, 3:35 p.m. | OK | Kotlin | TESTS | 5 | 108 | 0 | 800 | |
78758732 | bohuss | A | May 1, 2020, 7:53 p.m. | OK | Kotlin | TESTS | 5 | 109 | 0 | 800 | |
78731165 | abdukodir | A | May 1, 2020, 4:30 p.m. | OK | Kotlin | TESTS | 5 | 109 | 0 | 800 | |
78713646 | Geraldi | A | May 1, 2020, 3:52 p.m. | OK | Mono C# | TESTS | 5 | 46 | 0 | 800 | |
78767848 | nghiapd | A | May 1, 2020, 10:50 p.m. | OK | Mono C# | TESTS | 5 | 46 | 0 | 800 | |
78719833 | rst.coder | A | May 1, 2020, 4:05 p.m. | OK | Mono C# | TESTS | 5 | 46 | 0 | 800 | |
78707680 | alice310ch | A | May 1, 2020, 3:40 p.m. | OK | MS C++ | TESTS | 5 | 15 | 0 | 800 | |
78749316 | parkagnomish2 | A | May 1, 2020, 6:11 p.m. | OK | MS C++ | TESTS | 5 | 30 | 0 | 800 | |
78702265 | Autumns | A | May 1, 2020, 3:31 p.m. | OK | MS C++ | TESTS | 5 | 31 | 0 | 800 | |
78742319 | Egoryu | A | May 1, 2020, 4:58 p.m. | OK | MS C++ | TESTS | 5 | 31 | 0 | 800 | |
78714935 | __qwerty__ | A | May 1, 2020, 3:54 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78714111 | _Dinasour_Po | A | May 1, 2020, 3:53 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78710801 | wens | A | May 1, 2020, 3:46 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78708336 | mrsn | A | May 1, 2020, 3:42 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78708027 | KYAron | A | May 1, 2020, 3:41 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78707040 | ken_liu | A | May 1, 2020, 3:39 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78706551 | A_dumpling | A | May 1, 2020, 3:38 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78721652 | Assassin2020 | A | May 1, 2020, 4:09 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78732405 | Hugh_W | A | May 1, 2020, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78756043 | invisible07 | A | May 1, 2020, 7:17 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | 800 | |
78749525 | arpit2438735 | A | May 1, 2020, 6:13 p.m. | OK | Node.js | TESTS | 5 | 155 | 1126400 | 800 | |
78723133 | rsFalse | A | May 1, 2020, 4:12 p.m. | OK | Perl | TESTS | 5 | 31 | 0 | 800 | |
78721016 | KFan | A | May 1, 2020, 4:07 p.m. | OK | PHP | TESTS | 5 | 62 | 0 | 800 | |
78750411 | realnimish | A | May 1, 2020, 6:19 p.m. | OK | PyPy 2 | TESTS | 5 | 109 | 0 | 800 | |
78747961 | kit.shiron | A | May 1, 2020, 6:01 p.m. | OK | PyPy 2 | TESTS | 5 | 124 | 102400 | 800 | |
78756908 | sasha6991123 | A | May 1, 2020, 7:29 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 0 | 800 | |
78756857 | sasha6991123 | A | May 1, 2020, 7:28 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 0 | 800 | |
78755799 | sasha6991123 | A | May 1, 2020, 7:14 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 0 | 800 | |
78752309 | youness.amhaouch | A | May 1, 2020, 6:36 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1126400 | 800 | |
78764321 | Aestroix | A | May 1, 2020, 9:25 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1228800 | 800 | |
78733958 | preethi001 | A | May 1, 2020, 4:37 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1228800 | 800 | |
78702420 | TPrime | A | May 1, 2020, 3:31 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1228800 | 800 | |
78752954 | vivix_123 | A | May 1, 2020, 6:43 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1433600 | 800 | |
78734053 | Tanmayy | A | May 1, 2020, 4:38 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1433600 | 800 | |
78726933 | Mahdi_Mattout | A | May 1, 2020, 4:20 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 1433600 | 800 | |
78754733 | monster2k | A | May 1, 2020, 7:01 p.m. | OK | Python 2 | TESTS | 5 | 171 | 0 | 800 | |
78733485 | mokshasood06 | A | May 1, 2020, 4:36 p.m. | OK | Python 2 | TESTS | 5 | 171 | 0 | 800 | |
78725217 | crapplet | A | May 1, 2020, 4:17 p.m. | OK | Python 2 | TESTS | 5 | 187 | 0 | 800 | |
78748225 | nocreative1 | A | May 1, 2020, 6:03 p.m. | OK | Python 3 | TESTS | 5 | 78 | 0 | 800 | |
78763198 | xuey | A | May 1, 2020, 9:03 p.m. | OK | Python 3 | TESTS | 5 | 92 | 0 | 800 | |
78766642 | Palashbajpai | A | May 1, 2020, 10:15 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78766564 | mdemonp10 | A | May 1, 2020, 10:13 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78762520 | ERRSSELL | A | May 1, 2020, 8:51 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78760889 | Carduelis55 | A | May 1, 2020, 8:25 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78758735 | walterwhitebb08 | A | May 1, 2020, 7:53 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78756373 | toohellish | A | May 1, 2020, 7:21 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78752698 | LintuStorm | A | May 1, 2020, 6:40 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78750644 | perDAYTwo_A | A | May 1, 2020, 6:21 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | 800 | |
78756691 | sebasjimenezv | A | May 1, 2020, 7:26 p.m. | OK | Ruby | TESTS | 5 | 46 | 0 | 800 | |
78740706 | dduqueti | A | May 1, 2020, 4:55 p.m. | OK | Ruby | TESTS | 5 | 77 | 0 | 800 | |
78768153 | Bassel | A | May 1, 2020, 10:59 p.m. | OK | Rust | TESTS | 5 | 31 | 0 | 800 | |
78705434 | rpinoit | A | May 1, 2020, 3:36 p.m. | OK | Rust | TESTS | 5 | 31 | 0 | 800 | |
78753269 | mt0 | A | May 1, 2020, 6:45 p.m. | OK | Scala | TESTS | 5 | 374 | 0 | 800 |
Back to search problems