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 |
---|---|---|---|---|---|---|
1788 | Codeforces Round 851 (Div. 2) | FINISHED | False | 7200 | 55869899 | Feb. 9, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 31683 ) | A | One and Two | PROGRAMMING | brute force math |
B'You are given a sequence a_1, a_2, ldots, a_n . Each element of a is 1 or 2 . Find out if an integer k exists so that the following conditions are met. If there exist multiple k that satisfy the given condition, print the smallest. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). Description of the test cases follows. The first line of each test case contains one integer n ( 2 <= q n <= q 1000 ). The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 2 ). For each test case, if there is no such k , print -1 . Otherwise, print the smallest possible k . For the first test case, k=2 satisfies the condition since a_1 cdot a_2 = a_3 cdot a_4 cdot a_5 cdot a_6 = 4 . k=3 also satisfies the given condition, but the smallest should be printed. For the second test case, there is no k that satisfies a_1 cdot a_2 cdot ldots cdot a_k = a_{k+1} cdot a_{k+2} cdot ldots cdot a_n For the third test case, k=1 , 2 , and 3 satisfy the given condition, so the answer is 1 . '... |
Codeforces Round #851 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
192978546 | PavolKoman | A | Feb. 9, 2023, 6:44 p.m. | OK | C# 10 | TESTS | 5 | 62 | 3481600 | ||
192995969 | bluemegane | A | Feb. 9, 2023, 10:23 p.m. | OK | C# 8 | TESTS | 5 | 62 | 3072000 | ||
192995467 | bluemegane | A | Feb. 9, 2023, 10:14 p.m. | OK | C# 8 | TESTS | 5 | 93 | 2969600 | ||
192967865 | Vinayak13Oct | A | Feb. 9, 2023, 5:28 p.m. | OK | Clang++20 Diagnostics | TESTS | 5 | 327 | 0 | ||
193001827 | Awesome3.14 | A | Feb. 10, 2023, 12:55 a.m. | OK | D | TESTS | 5 | 46 | 4403200 | ||
192970307 | NenadDapic | A | Feb. 9, 2023, 5:42 p.m. | OK | FPC | TESTS | 5 | 31 | 0 | ||
192982367 | ahsanhabibsadik123 | A | Feb. 9, 2023, 7:19 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
193013007 | pppengpeng | A | Feb. 10, 2023, 4:28 a.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
193013665 | rf_104 | A | Feb. 10, 2023, 4:37 a.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
193018405 | sahilkumar_1 | A | Feb. 10, 2023, 5:36 a.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
193020374 | soumithradebnath2003 | A | Feb. 10, 2023, 5:58 a.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192961532 | 2210040007 | A | Feb. 9, 2023, 4:34 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192972791 | rushil21_ | A | Feb. 9, 2023, 5:59 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192984140 | nickuuu | A | Feb. 9, 2023, 7:37 p.m. | OK | GNU C11 | TESTS | 5 | 15 | 0 | ||
192972435 | neel_18 | A | Feb. 9, 2023, 5:56 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
192984849 | Buzzzer | A | Feb. 9, 2023, 7:44 p.m. | OK | GNU C11 | TESTS | 5 | 30 | 0 | ||
193012972 | Tom66 | A | Feb. 10, 2023, 4:27 a.m. | OK | GNU C++14 | TESTS | 5 | 0 | 102400 | ||
193005576 | zhouxp | A | Feb. 10, 2023, 2:27 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
193005177 | Pengzt | A | Feb. 10, 2023, 2:18 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
193001246 | liuhengyu | A | Feb. 10, 2023, 12:38 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
192991462 | piyush_beegala | A | Feb. 9, 2023, 9:06 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
192961662 | CoderKrish1 | A | Feb. 9, 2023, 4:34 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 0 | ||
193011785 | yuanruiqi | A | Feb. 10, 2023, 4:10 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 102400 | ||
193014454 | _Amit_Raj_ | A | Feb. 10, 2023, 4:47 a.m. | OK | GNU C++14 | TESTS | 5 | 15 | 102400 | ||
192973408 | _Scorpion | A | Feb. 9, 2023, 6:03 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 102400 | ||
192975839 | singhabhishek6 | A | Feb. 9, 2023, 6:21 p.m. | OK | GNU C++14 | TESTS | 5 | 15 | 102400 | ||
193015651 | Khushi_8 | A | Feb. 10, 2023, 5:03 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193015813 | gulshan2052 | A | Feb. 10, 2023, 5:06 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193001897 | Shereeen | A | Feb. 10, 2023, 12:57 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193007704 | amirrrr | A | Feb. 10, 2023, 3:05 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
192996127 | ievins | A | Feb. 9, 2023, 10:26 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
192995084 | Plabs | A | Feb. 9, 2023, 10:07 p.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193013759 | Jobair_uddin | A | Feb. 10, 2023, 4:38 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193014037 | ffish | A | Feb. 10, 2023, 4:42 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193014927 | Anand.iitr | A | Feb. 10, 2023, 4:54 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
193015504 | Dikshant2004 | A | Feb. 10, 2023, 5:02 a.m. | OK | GNU C++17 | TESTS | 5 | 15 | 0 | ||
192971500 | Omar_mabrouk | A | Feb. 9, 2023, 5:50 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 0 | ||
193004135 | Colblue | A | Feb. 10, 2023, 1:55 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 0 | 409600 | ||
192982893 | serialcomder | A | Feb. 9, 2023, 7:25 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
193007753 | babyS1mpleFromCStoCF | A | Feb. 10, 2023, 3:05 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
193005575 | rijuyuezhu | A | Feb. 10, 2023, 2:27 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
193000061 | Ztone_Master78 | A | Feb. 10, 2023, 12:05 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
192992033 | Agamenon | A | Feb. 9, 2023, 9:15 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
193017899 | whatisthis132 | A | Feb. 10, 2023, 5:30 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
193016153 | jisanahmed10667 | A | Feb. 10, 2023, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
193010107 | scotchtape13 | A | Feb. 10, 2023, 3:44 a.m. | OK | GNU C++17 (64) | TESTS | 5 | 15 | 0 | ||
192982021 | yousehussien998 | A | Feb. 9, 2023, 7:16 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
193005776 | SO_NIK | A | Feb. 10, 2023, 2:30 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 0 | ||
192984458 | lucifer223 | A | Feb. 9, 2023, 7:40 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 102400 | ||
192998618 | tredsused70 | A | Feb. 9, 2023, 11:24 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 0 | 8704000 | ||
193020471 | durgcoder | A | Feb. 10, 2023, 5:59 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
193020700 | sharmaharisam | A | Feb. 10, 2023, 6:02 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
193020463 | utshab1618 | A | Feb. 10, 2023, 5:59 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
193020346 | vedant_2 | A | Feb. 10, 2023, 5:57 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
193019725 | alaminXpro | A | Feb. 10, 2023, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
193019463 | Pratik_Srivastava_ | A | Feb. 10, 2023, 5:48 a.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 0 | ||
193018459 | mohito22 | A | Feb. 10, 2023, 5:37 a.m. | OK | Go | TESTS | 5 | 15 | 4403200 | ||
192989258 | MrNelt | A | Feb. 9, 2023, 8:36 p.m. | OK | Go | TESTS | 5 | 546 | 4300800 | ||
192989468 | MrNelt | A | Feb. 9, 2023, 8:39 p.m. | OK | Go | TESTS | 5 | 576 | 4300800 | ||
193011915 | newaz420 | A | Feb. 10, 2023, 4:12 a.m. | OK | Java 11 | TESTS | 5 | 156 | 0 | ||
193002048 | HMETAO | A | Feb. 10, 2023, 1:01 a.m. | OK | Java 11 | TESTS | 5 | 186 | 0 | ||
192988266 | Hinnawi24 | A | Feb. 9, 2023, 8:23 p.m. | OK | Java 11 | TESTS | 5 | 187 | 0 | ||
193001093 | s945958 | A | Feb. 10, 2023, 12:34 a.m. | OK | Java 11 | TESTS | 5 | 202 | 0 | ||
192968231 | LoudSilence | A | Feb. 9, 2023, 5:30 p.m. | OK | Java 11 | TESTS | 5 | 217 | 0 | ||
192965686 | Darcy__ | A | Feb. 9, 2023, 5:18 p.m. | OK | Java 11 | TESTS | 5 | 217 | 0 | ||
193000960 | etian6795 | A | Feb. 10, 2023, 12:29 a.m. | OK | Java 11 | TESTS | 5 | 249 | 0 | ||
192972940 | ArifHoque | A | Feb. 9, 2023, 6 p.m. | OK | Java 11 | TESTS | 5 | 249 | 0 | ||
192985291 | fester_pro | A | Feb. 9, 2023, 7:49 p.m. | OK | Java 11 | TESTS | 5 | 265 | 0 | ||
192983904 | nvnreddynaini | A | Feb. 9, 2023, 7:34 p.m. | OK | Java 11 | TESTS | 5 | 265 | 0 | ||
192993377 | sarvesh_bawari | A | Feb. 9, 2023, 9:37 p.m. | OK | Java 17 | TESTS | 5 | 139 | 0 | ||
192986344 | luci9868 | A | Feb. 9, 2023, 8 p.m. | OK | Java 17 | TESTS | 5 | 155 | 204800 | ||
192971274 | Mawina | A | Feb. 9, 2023, 5:49 p.m. | OK | Java 17 | TESTS | 5 | 171 | 204800 | ||
193002848 | Jatinydv17 | A | Feb. 10, 2023, 1:21 a.m. | OK | Java 17 | TESTS | 5 | 186 | 0 | ||
192984038 | coder0687 | A | Feb. 9, 2023, 7:36 p.m. | OK | Java 17 | TESTS | 5 | 187 | 614400 | ||
192971269 | HappyLittleTree | A | Feb. 9, 2023, 5:49 p.m. | OK | Java 17 | TESTS | 5 | 202 | 409600 | ||
193018049 | gautam_st | A | Feb. 10, 2023, 5:32 a.m. | OK | Java 17 | TESTS | 5 | 202 | 512000 | ||
192995422 | arpurush | A | Feb. 9, 2023, 10:13 p.m. | OK | Java 17 | TESTS | 5 | 218 | 0 | ||
192993282 | BucketOfNubbins | A | Feb. 9, 2023, 9:35 p.m. | OK | Java 17 | TESTS | 5 | 249 | 204800 | ||
192980389 | S_daqqa | A | Feb. 9, 2023, 7:01 p.m. | OK | Java 17 | TESTS | 5 | 265 | 819200 | ||
192997644 | megaspazz | A | Feb. 9, 2023, 11 p.m. | OK | Java 8 | TESTS | 5 | 77 | 0 | ||
192996783 | megaspazz | A | Feb. 9, 2023, 10:40 p.m. | OK | Java 8 | TESTS | 5 | 77 | 0 | ||
192974311 | AIT-RAMI | A | Feb. 9, 2023, 6:10 p.m. | OK | Java 8 | TESTS | 5 | 77 | 0 | ||
192997680 | megaspazz | A | Feb. 9, 2023, 11:01 p.m. | OK | Java 8 | TESTS | 5 | 78 | 0 | ||
192996794 | megaspazz | A | Feb. 9, 2023, 10:40 p.m. | OK | Java 8 | TESTS | 5 | 92 | 0 | ||
193018767 | Divyanshuverma21 | A | Feb. 10, 2023, 5:40 a.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
193009125 | reputation_tv | A | Feb. 10, 2023, 3:27 a.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
193006974 | one_line | A | Feb. 10, 2023, 2:51 a.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
192997726 | megaspazz | A | Feb. 9, 2023, 11:02 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
192996805 | megaspazz | A | Feb. 9, 2023, 10:40 p.m. | OK | Java 8 | TESTS | 5 | 93 | 0 | ||
193017308 | Mysticode | A | Feb. 10, 2023, 5:23 a.m. | OK | MS C++ 2017 | TESTS | 5 | 62 | 0 | ||
192973049 | linus2525 | A | Feb. 9, 2023, 6:01 p.m. | OK | MS C++ 2017 | TESTS | 5 | 62 | 0 | ||
192971875 | Ncato_Del_Gormo7 | A | Feb. 9, 2023, 5:53 p.m. | OK | MS C++ 2017 | TESTS | 5 | 62 | 0 | ||
193008510 | Wanderkind | A | Feb. 10, 2023, 3:18 a.m. | OK | Ocaml | TESTS | 5 | 93 | 409600 | ||
192969330 | rsFalse | A | Feb. 9, 2023, 5:36 p.m. | OK | Perl | TESTS | 5 | 46 | 204800 | ||
192991336 | davichano | A | Feb. 9, 2023, 9:04 p.m. | OK | PHP | TESTS | 5 | 30 | 0 | ||
192970526 | tobby125 | A | Feb. 9, 2023, 5:43 p.m. | OK | PyPy 3 | TESTS | 5 | 93 | 2662400 | ||
192965885 | shobonvip | A | Feb. 9, 2023, 5:19 p.m. | OK | PyPy 3 | TESTS | 5 | 108 | 2355200 | ||
192981191 | moizahmedbss303 | A | Feb. 9, 2023, 7:08 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 2662400 | ||
192989855 | _milkcoffee_ | A | Feb. 9, 2023, 8:44 p.m. | OK | PyPy 3 | TESTS | 5 | 124 | 3276800 | ||
192969514 | shauryajain1204 | A | Feb. 9, 2023, 5:37 p.m. | OK | PyPy 3 | TESTS | 5 | 187 | 3584000 | ||
192967134 | acceleracter | A | Feb. 9, 2023, 5:24 p.m. | OK | PyPy 3 | TESTS | 5 | 217 | 9420800 | ||
193000355 | plevande | A | Feb. 10, 2023, 12:13 a.m. | OK | PyPy 3-64 | TESTS | 5 | 46 | 2560000 | ||
192988299 | gardengnome | A | Feb. 9, 2023, 8:24 p.m. | OK | PyPy 3-64 | TESTS | 5 | 61 | 3174400 | ||
192968695 | VibhorS | A | Feb. 9, 2023, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 5 | 61 | 3584000 | ||
192998291 | crapcode | A | Feb. 9, 2023, 11:16 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 2969600 | ||
193012800 | kaiser7lu | A | Feb. 10, 2023, 4:25 a.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 3072000 | ||
192979330 | AwesomeAws. | A | Feb. 9, 2023, 6:51 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 3379200 | ||
193005791 | hkwu6013 | A | Feb. 10, 2023, 2:30 a.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 3584000 | ||
192973432 | AhmdJabr | A | Feb. 9, 2023, 6:03 p.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 3584000 | ||
193008096 | liangfrank39 | A | Feb. 10, 2023, 3:11 a.m. | OK | PyPy 3-64 | TESTS | 5 | 62 | 3686400 | ||
192974437 | saini.laxman2002 | A | Feb. 9, 2023, 6:11 p.m. | OK | PyPy 3-64 | TESTS | 5 | 77 | 3174400 | ||
193015140 | Lwchicky0 | A | Feb. 10, 2023, 4:57 a.m. | OK | Python 3 | TESTS | 5 | 46 | 102400 | ||
192970260 | shreyasjain0912 | A | Feb. 9, 2023, 5:42 p.m. | OK | Python 3 | TESTS | 5 | 46 | 204800 | ||
193010524 | samishahbaz321 | A | Feb. 10, 2023, 3:51 a.m. | OK | Python 3 | TESTS | 5 | 61 | 204800 | ||
192981841 | Ratery | A | Feb. 9, 2023, 7:14 p.m. | OK | Python 3 | TESTS | 5 | 61 | 204800 | ||
192960473 | shreyansh.verma | A | Feb. 9, 2023, 4:32 p.m. | OK | Python 3 | TESTS | 5 | 61 | 204800 | ||
192970144 | tariq05 | A | Feb. 9, 2023, 5:41 p.m. | OK | Python 3 | TESTS | 5 | 62 | 0 | ||
193011040 | RayZhang | A | Feb. 10, 2023, 3:59 a.m. | OK | Python 3 | TESTS | 5 | 62 | 204800 | ||
192969806 | Greninja_2004 | A | Feb. 9, 2023, 5:39 p.m. | OK | Python 3 | TESTS | 5 | 62 | 204800 | ||
193019430 | jayPreak | A | Feb. 10, 2023, 5:47 a.m. | OK | Python 3 | TESTS | 5 | 62 | 409600 | ||
193010608 | devkudawla | A | Feb. 10, 2023, 3:52 a.m. | OK | Python 3 | TESTS | 5 | 62 | 409600 | ||
192967518 | teak | A | Feb. 9, 2023, 5:26 p.m. | OK | Rust 2021 | TESTS | 5 | 15 | 307200 |
Back to search problems