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 |
---|---|---|---|---|---|---|
1786 | Codeforces Round 850 (Div. 2, based on VK Cup 2022 - Final Round) | FINISHED | False | 10800 | 56224499 | Feb. 5, 2023, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 11463 ) | A2 | Alternating Deck (hard version) | PROGRAMMING | implementation |
B"This is a hard version of the problem. In this version, there are two colors of the cards. Alice has n cards, each card is either black or white. The cards are stacked in a deck in such a way that the card colors alternate, starting from a white card. Alice deals the cards to herself and to Bob, dealing at once several cards from the top of the deck in the following order: one card to herself, two cards to Bob, three cards to Bob, four cards to herself, five cards to herself, six cards to Bob, seven cards to Bob, eight cards to herself, and so on. In other words, on the i -th step, Alice deals i top cards from the deck to one of the players; on the first step, she deals the cards to herself and then alternates the players every two steps. When there aren't enough cards at some step, Alice deals all the remaining cards to the current player, and the process stops. How many cards of each color will Alice and Bob have at the end? Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 200 ). The description of the test cases follows The only line of each test case contains a single integer n ( 1 <= n <= 10^6 ) -- the number of cards. For each test case print four integers -- the number of cards in the end for each player -- in this order: white cards Alice has, black cards Alice has, white cards Bob has, black cards Bob has. "... |
Codeforces Round #850 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
192385098 | NenadDapic | A2 | Feb. 5, 2023, 7:03 p.m. | OK | FPC | TESTS | 5 | 15 | 102400 | ||
192393684 | 1419__ | A2 | Feb. 5, 2023, 8:37 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192381779 | SP2003 | A2 | Feb. 5, 2023, 6:32 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192379719 | under_cover_ | A2 | Feb. 5, 2023, 6:15 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192351065 | Nazmul12636 | A2 | Feb. 5, 2023, 3:03 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192342835 | mdadnan | A2 | Feb. 5, 2023, 2:32 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192339042 | xiaojiaozi | A2 | Feb. 5, 2023, 2:17 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192338243 | asm_rayhan | A2 | Feb. 5, 2023, 2:14 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192337385 | mohitjakhar | A2 | Feb. 5, 2023, 2:11 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192414937 | nimaiparsa | A2 | Feb. 6, 2023, 3:05 a.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192397406 | iffatul_anon | A2 | Feb. 5, 2023, 9:26 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192405701 | luogu_bot3 | A2 | Feb. 5, 2023, 11:47 p.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192404935 | 2021tysc0190 | A2 | Feb. 5, 2023, 11:30 p.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192422829 | Mohithkk | A2 | Feb. 6, 2023, 5:17 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192421606 | DXGdaxigua | A2 | Feb. 6, 2023, 5 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192417842 | yuanruiqi | A2 | Feb. 6, 2023, 3:56 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192416367 | adannklgdnglk | A2 | Feb. 6, 2023, 3:30 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192415859 | aditya0610 | A2 | Feb. 6, 2023, 3:21 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192415454 | BC_driver | A2 | Feb. 6, 2023, 3:14 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192414697 | Micro_Sun | A2 | Feb. 6, 2023, 3:01 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192408573 | Leminhtuan123 | A2 | Feb. 6, 2023, 12:52 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 0 | ||
192421624 | LeoMinor | A2 | Feb. 6, 2023, 5 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192426292 | Beginner343 | A2 | Feb. 6, 2023, 6:01 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192425432 | hibye1217 | A2 | Feb. 6, 2023, 5:51 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192425169 | Nitesh_NITK | A2 | Feb. 6, 2023, 5:48 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192423604 | devanshmishra111 | A2 | Feb. 6, 2023, 5:28 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192423452 | _xor | A2 | Feb. 6, 2023, 5:25 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192422809 | shivangnegi01 | A2 | Feb. 6, 2023, 5:17 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192422508 | Mehedi_34 | A2 | Feb. 6, 2023, 5:12 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192422158 | Anurag_20 | A2 | Feb. 6, 2023, 5:08 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192421634 | Swadhinta | A2 | Feb. 6, 2023, 5 a.m. | OK | GNU C++17 | TESTS | 5 | 0 | 0 | ||
192425458 | GudeGude | A2 | Feb. 6, 2023, 5:51 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192420645 | Physics212303 | A2 | Feb. 6, 2023, 4:43 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192419956 | Elza_York | A2 | Feb. 6, 2023, 4:32 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192417517 | iamone | A2 | Feb. 6, 2023, 3:50 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192417330 | EotUL8d7 | A2 | Feb. 6, 2023, 3:48 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192416457 | LuckyRoo | A2 | Feb. 6, 2023, 3:32 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192414227 | 1706993560 | A2 | Feb. 6, 2023, 2:52 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192414069 | yemuzhe | A2 | Feb. 6, 2023, 2:49 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192411065 | Once_I_Liked_AGirl | A2 | Feb. 6, 2023, 1:50 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192409738 | enslaved | A2 | Feb. 6, 2023, 1:19 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
192423192 | DippleThree | A2 | Feb. 6, 2023, 5:22 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192426216 | a_yong | A2 | Feb. 6, 2023, 6 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192425528 | c1120231020 | A2 | Feb. 6, 2023, 5:52 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192424929 | dhruvjha | A2 | Feb. 6, 2023, 5:45 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192424857 | Tuwodabhinav | A2 | Feb. 6, 2023, 5:44 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192424688 | Ngeces | A2 | Feb. 6, 2023, 5:42 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192424364 | yingluosanqian | A2 | Feb. 6, 2023, 5:37 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192423637 | SabihaLithi | A2 | Feb. 6, 2023, 5:28 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192423019 | tanvir03 | A2 | Feb. 6, 2023, 5:20 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192423015 | zwu2021016689 | A2 | Feb. 6, 2023, 5:20 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192413760 | july_tang | A2 | Feb. 6, 2023, 2:44 a.m. | OK | Go | TESTS | 5 | 15 | 0 | ||
192396105 | as9274 | A2 | Feb. 5, 2023, 9:08 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
192386100 | shahpppp | A2 | Feb. 5, 2023, 7:12 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
192379788 | rajgupta77540 | A2 | Feb. 5, 2023, 6:15 p.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
192415983 | amanraj01 | A2 | Feb. 6, 2023, 3:23 a.m. | OK | Java 11 | TESTS | 5 | 202 | 41062400 | ||
192366396 | vijender_8601 | A2 | Feb. 5, 2023, 4:32 p.m. | OK | Java 11 | TESTS | 5 | 217 | 0 | ||
192351224 | Lior | A2 | Feb. 5, 2023, 3:04 p.m. | OK | Java 11 | TESTS | 5 | 217 | 16486400 | ||
192388403 | wat2 | A2 | Feb. 5, 2023, 7:35 p.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
192367015 | aryangupta1604 | A2 | Feb. 5, 2023, 4:37 p.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
192332832 | sduMamytbekov | A2 | Feb. 5, 2023, 1:57 p.m. | OK | Java 11 | TESTS | 5 | 218 | 0 | ||
192386272 | i_am_aayush | A2 | Feb. 5, 2023, 7:14 p.m. | OK | Java 11 | TESTS | 5 | 218 | 102400 | ||
192383237 | PrudhviRao15 | A2 | Feb. 5, 2023, 6:45 p.m. | OK | Java 17 | TESTS | 5 | 202 | 0 | ||
192364965 | Abdelrahman.M.3 | A2 | Feb. 5, 2023, 4:23 p.m. | OK | Java 17 | TESTS | 5 | 202 | 614400 | ||
192347911 | beka001 | A2 | Feb. 5, 2023, 2:52 p.m. | OK | Java 17 | TESTS | 5 | 202 | 716800 | ||
192400424 | sarvesh_bawari | A2 | Feb. 5, 2023, 10:10 p.m. | OK | Java 17 | TESTS | 5 | 217 | 204800 | ||
192385291 | PrudhviRao15 | A2 | Feb. 5, 2023, 7:04 p.m. | OK | Java 17 | TESTS | 5 | 217 | 512000 | ||
192337743 | shadowpr1est | A2 | Feb. 5, 2023, 2:12 p.m. | OK | Java 17 | TESTS | 5 | 233 | 1126400 | ||
192334205 | the_narcissistic_coder | A2 | Feb. 5, 2023, 2:01 p.m. | OK | Java 17 | TESTS | 5 | 248 | 1024000 | ||
192404280 | AdamElmadani | A2 | Feb. 5, 2023, 11:15 p.m. | OK | Java 17 | TESTS | 5 | 249 | 819200 | ||
192335305 | baten005 | A2 | Feb. 5, 2023, 2:04 p.m. | OK | Java 17 | TESTS | 5 | 264 | 1228800 | ||
192346514 | john9999911 | A2 | Feb. 5, 2023, 2:46 p.m. | OK | Java 17 | TESTS | 5 | 265 | 921600 | ||
192424948 | lpychemistry | A2 | Feb. 6, 2023, 5:45 a.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
192382967 | ak_ankit | A2 | Feb. 5, 2023, 6:42 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
192375619 | soyebsarkar | A2 | Feb. 5, 2023, 5:42 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
192426172 | r1cky | A2 | Feb. 6, 2023, 6 a.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
192373812 | upal2021214 | A2 | Feb. 5, 2023, 5:27 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
192349265 | anuraxx | A2 | Feb. 5, 2023, 2:57 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
192346409 | ankit_0207 | A2 | Feb. 5, 2023, 2:46 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
192345659 | Divyanshuverma21 | A2 | Feb. 5, 2023, 2:43 p.m. | OK | Java 8 | TESTS | 5 | 124 | 0 | ||
192373658 | Koka | A2 | Feb. 5, 2023, 5:25 p.m. | OK | Java 8 | TESTS | 5 | 124 | 307200 | ||
192373630 | handle007 | A2 | Feb. 5, 2023, 5:25 p.m. | OK | Java 8 | TESTS | 5 | 124 | 307200 | ||
192378204 | soykan_ozcan | A2 | Feb. 5, 2023, 6:02 p.m. | OK | MS C++ 2017 | TESTS | 5 | 0 | 0 | ||
192407456 | lqj | A2 | Feb. 6, 2023, 12:26 a.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192395975 | waleedalaa511 | A2 | Feb. 5, 2023, 9:06 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192379217 | Yychen | A2 | Feb. 5, 2023, 6:10 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192350024 | WhyYes | A2 | Feb. 5, 2023, 3 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192348280 | dykhanovaa | A2 | Feb. 5, 2023, 2:53 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192347549 | shreshthsudhir5555 | A2 | Feb. 5, 2023, 2:50 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192341150 | photon-x | A2 | Feb. 5, 2023, 2:26 p.m. | OK | MS C++ 2017 | TESTS | 5 | 15 | 0 | ||
192333851 | tdawawd | A2 | Feb. 5, 2023, 2 p.m. | OK | MS C++ 2017 | TESTS | 5 | 31 | 32051200 | ||
192363586 | t.o.halo | A2 | Feb. 5, 2023, 4:15 p.m. | OK | MS C++ 2017 | TESTS | 5 | 468 | 0 | ||
192365409 | AhsanHabib | A2 | Feb. 5, 2023, 4:26 p.m. | OK | PyPy 3 | TESTS | 5 | 93 | 1843200 | ||
192395940 | hxu10 | A2 | Feb. 5, 2023, 9:06 p.m. | OK | PyPy 3 | TESTS | 5 | 93 | 2048000 | ||
192357409 | hxu10 | A2 | Feb. 5, 2023, 4:10 p.m. | OK | PyPy 3 | TESTS | 5 | 93 | 2048000 | ||
192371910 | misorin | A2 | Feb. 5, 2023, 5:12 p.m. | OK | PyPy 3 | TESTS | 5 | 108 | 1638400 | ||
192341519 | khoiduong2913 | A2 | Feb. 5, 2023, 2:27 p.m. | OK | PyPy 3 | TESTS | 5 | 108 | 1843200 | ||
192336660 | _magnus_carlsen_ | A2 | Feb. 5, 2023, 2:08 p.m. | OK | PyPy 3 | TESTS | 5 | 108 | 1843200 | ||
192350981 | LazyRGuy | A2 | Feb. 5, 2023, 3:03 p.m. | OK | PyPy 3 | TESTS | 5 | 108 | 2150400 | ||
192412625 | bpdolson | A2 | Feb. 6, 2023, 2:23 a.m. | OK | PyPy 3 | TESTS | 5 | 124 | 2457600 | ||
192350874 | single_braincell | A2 | Feb. 5, 2023, 3:03 p.m. | OK | PyPy 3 | TESTS | 5 | 140 | 2048000 | ||
192370770 | ankitesh | A2 | Feb. 5, 2023, 5:03 p.m. | OK | PyPy 3 | TESTS | 5 | 233 | 35532800 | ||
192370350 | hkwu6013 | A2 | Feb. 5, 2023, 5 p.m. | OK | PyPy 3-64 | TESTS | 5 | 61 | 1638400 | ||
192363502 | rmr | A2 | Feb. 5, 2023, 4:15 p.m. | OK | PyPy 3-64 | TESTS | 5 | 61 | 1638400 | ||
192391185 | gardengnome | A2 | Feb. 5, 2023, 8:07 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 0 | ||
192344060 | ilvfruits | A2 | Feb. 5, 2023, 2:37 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 0 | ||
192377364 | SophieHatter | A2 | Feb. 5, 2023, 5:56 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 1536000 | ||
192363733 | AndreiZherder | A2 | Feb. 5, 2023, 4:16 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 1536000 | ||
192351636 | nnger | A2 | Feb. 5, 2023, 3:04 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 1536000 | ||
192424621 | eugalt | A2 | Feb. 6, 2023, 5:41 a.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 1740800 | ||
192415940 | eugalt | A2 | Feb. 6, 2023, 3:22 a.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 1740800 | ||
192382673 | mkvazowski | A2 | Feb. 5, 2023, 6:39 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 1843200 | ||
192378901 | vivek_.kumar | A2 | Feb. 5, 2023, 6:08 p.m. | OK | Python 3 | TESTS | 5 | 46 | 0 | ||
192345965 | vedantmishra69 | A2 | Feb. 5, 2023, 2:44 p.m. | OK | Python 3 | TESTS | 5 | 46 | 0 | ||
192341622 | JustTheory | A2 | Feb. 5, 2023, 2:27 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
192343460 | Kwh123 | A2 | Feb. 5, 2023, 2:34 p.m. | OK | Python 3 | TESTS | 5 | 93 | 0 | ||
192332993 | julian.fortin | A2 | Feb. 5, 2023, 1:58 p.m. | OK | Python 3 | TESTS | 5 | 124 | 0 | ||
192392295 | nik_enjoy | A2 | Feb. 5, 2023, 8:20 p.m. | OK | Python 3 | TESTS | 5 | 140 | 0 | ||
192373376 | gremos1 | A2 | Feb. 5, 2023, 5:23 p.m. | OK | Python 3 | TESTS | 5 | 155 | 0 | ||
192395642 | nora_swift | A2 | Feb. 5, 2023, 9:01 p.m. | OK | Python 3 | TESTS | 5 | 187 | 0 | ||
192334243 | sanimish1511 | A2 | Feb. 5, 2023, 2:01 p.m. | OK | Python 3 | TESTS | 5 | 202 | 0 | ||
192335512 | not_found404 | A2 | Feb. 5, 2023, 2:04 p.m. | OK | Python 3 | TESTS | 5 | 233 | 0 | ||
192366315 | p-a-t | A2 | Feb. 5, 2023, 4:32 p.m. | OK | Rust 2021 | TESTS | 5 | 0 | 0 | ||
192347783 | SathemBite | A2 | Feb. 5, 2023, 2:51 p.m. | OK | Rust 2021 | TESTS | 5 | 15 | 0 |
Back to search problems