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 |
---|---|---|---|---|---|---|
1436 | Codeforces Round 678 (Div. 2) | FINISHED | False | 7800 | 133804511 | Oct. 24, 2020, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 10991 ) | C | Binary Search | PROGRAMMING | binary search combinatorics |
B"Andrey thinks he is truly a successful developer, but in reality he didn't know about the binary search algorithm until recently. After reading some literature Andrey understood that this algorithm allows to quickly find a certain number x in an array. For an array a indexed from zero, and an integer x the pseudocode of the algorithm is as follows: Note that the elements of the array are indexed from zero, and the division is done in integers (rounding down). Andrey read that the algorithm only works if the array is sorted. However, he found this statement untrue, because there certainly exist unsorted arrays for which the algorithm find x ! Andrey wants to write a letter to the book authors, but before doing that he must consider the permutations of size n such that the algorithm finds x in them. A permutation of size n is an array consisting of n distinct integers between 1 and n in arbitrary order. Help Andrey and find the number of permutations of size n which contain x at position pos and for which the given implementation of the binary search algorithm finds x (returns true). As the result may be extremely large, print the remainder of its division by 10^9+7 . The only line of input contains integers n , x and pos ( 1 <= x <= n <= 1000 , 0 <= pos <= n - 1 ) -- the required length of the permutation, the number to search, and the required position of that number, respectively. Print a single number -- the remainder of the division of the number of valid permutations by 10^9+7 . All possible permutations in the first test case: (2, 3, 1, 4) , (2, 4, 1, 3) , (3, 2, 1, 4) , (3, 4, 1, 2) , (4, 2, 1, 3) , (4, 3, 1, 2) . "... |
Codeforces Round #678 (Div. 2). Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
96644257 | abhi_149209 | C | Oct. 25, 2020, 10:05 a.m. | OK | Clang++17 Diagnostics | TESTS | 80 | 46 | 0 | ||
96622798 | scheung | C | Oct. 25, 2020, 2:40 a.m. | OK | GNU C11 | TESTS | 80 | 31 | 0 | ||
96631446 | midnightsfse | C | Oct. 25, 2020, 6:52 a.m. | OK | GNU C++11 | TESTS | 80 | 30 | 0 | ||
96620361 | Chufengtiku | C | Oct. 25, 2020, 1:09 a.m. | OK | GNU C++11 | TESTS | 80 | 30 | 0 | ||
96607025 | xwn | C | Oct. 24, 2020, 6:59 p.m. | OK | GNU C++11 | TESTS | 80 | 30 | 0 | ||
96705723 | keephappy | C | Oct. 25, 2020, 2:14 p.m. | OK | GNU C++11 | TESTS | 80 | 30 | 0 | ||
96637301 | vectorwyx | C | Oct. 25, 2020, 8:30 a.m. | OK | GNU C++11 | TESTS | 80 | 30 | 0 | ||
96736229 | te5555 | C | Oct. 25, 2020, 11:50 p.m. | OK | GNU C++11 | TESTS | 80 | 30 | 102400 | ||
96747803 | boogeyman10 | C | Oct. 26, 2020, 5:32 a.m. | OK | GNU C++11 | TESTS | 80 | 31 | 0 | ||
96749023 | boogeyman10 | C | Oct. 26, 2020, 5:55 a.m. | OK | GNU C++11 | TESTS | 80 | 31 | 0 | ||
96746735 | Ritalc | C | Oct. 26, 2020, 5:11 a.m. | OK | GNU C++11 | TESTS | 80 | 31 | 0 | ||
96748052 | tulerfeng | C | Oct. 26, 2020, 5:37 a.m. | OK | GNU C++11 | TESTS | 80 | 31 | 0 | ||
96748185 | codeforces_Ays | C | Oct. 26, 2020, 5:39 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96748054 | fyter_112 | C | Oct. 26, 2020, 5:37 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96747722 | ehasan302 | C | Oct. 26, 2020, 5:30 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96747056 | shubham_n | C | Oct. 26, 2020, 5:18 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96746012 | astronomia | C | Oct. 26, 2020, 4:55 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96745518 | amrit7 | C | Oct. 26, 2020, 4:45 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96745164 | Saber8877 | C | Oct. 26, 2020, 4:36 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96744987 | shashi_trent | C | Oct. 26, 2020, 4:31 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96744041 | garima_19 | C | Oct. 26, 2020, 4:05 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96749177 | hyperion_1724 | C | Oct. 26, 2020, 5:58 a.m. | OK | GNU C++14 | TESTS | 80 | 31 | 0 | ||
96749225 | notarmen | C | Oct. 26, 2020, 5:59 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96749101 | viraat_noob | C | Oct. 26, 2020, 5:57 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96748622 | bandiaoz | C | Oct. 26, 2020, 5:48 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96748296 | coder_vk | C | Oct. 26, 2020, 5:42 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96747509 | goyalktushar | C | Oct. 26, 2020, 5:27 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96747215 | CHCode | C | Oct. 26, 2020, 5:21 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96746994 | aman005 | C | Oct. 26, 2020, 5:17 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96746925 | aman005 | C | Oct. 26, 2020, 5:15 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96746535 | dastan200507 | C | Oct. 26, 2020, 5:07 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96746523 | Kharanshu31 | C | Oct. 26, 2020, 5:07 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 0 | ||
96745416 | fake_name | C | Oct. 26, 2020, 4:43 a.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96743669 | Soumya11111 | C | Oct. 26, 2020, 3:54 a.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96739784 | Jayshao | C | Oct. 26, 2020, 2 a.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96730238 | dcordb | C | Oct. 25, 2020, 8:42 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96729922 | alex_73 | C | Oct. 25, 2020, 8:34 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96724604 | g_one15 | C | Oct. 25, 2020, 6:47 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96723342 | g_one15 | C | Oct. 25, 2020, 6:24 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96723191 | modestas_ | C | Oct. 25, 2020, 6:21 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96720176 | CosminMorar | C | Oct. 25, 2020, 5:30 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96748666 | Bhumika_2001 | C | Oct. 26, 2020, 5:49 a.m. | OK | GNU C++17 (64) | TESTS | 80 | 31 | 0 | ||
96620271 | synapse | C | Oct. 25, 2020, 1:04 a.m. | OK | Go | TESTS | 80 | 46 | 102400 | ||
96619944 | synapse | C | Oct. 25, 2020, 12:50 a.m. | OK | Go | TESTS | 80 | 46 | 102400 | ||
96620624 | yuzee | C | Oct. 25, 2020, 1:18 a.m. | OK | Java 11 | TESTS | 80 | 171 | 0 | ||
96646737 | gssakash | C | Oct. 25, 2020, 10:42 a.m. | OK | Java 11 | TESTS | 80 | 186 | 0 | ||
96631311 | akman10 | C | Oct. 25, 2020, 6:48 a.m. | OK | Java 11 | TESTS | 80 | 186 | 0 | ||
96620023 | hakr_2104 | C | Oct. 25, 2020, 12:53 a.m. | OK | Java 11 | TESTS | 80 | 186 | 0 | ||
96745552 | nirvana_rsc | C | Oct. 26, 2020, 4:46 a.m. | OK | Java 11 | TESTS | 80 | 187 | 0 | ||
96633060 | vaishnav_firebolt | C | Oct. 25, 2020, 7:29 a.m. | OK | Java 11 | TESTS | 80 | 187 | 0 | ||
96604489 | Kshitij_NSIT_45 | C | Oct. 24, 2020, 6:28 p.m. | OK | Java 11 | TESTS | 80 | 187 | 0 | ||
96598525 | saikaushik | C | Oct. 24, 2020, 5:52 p.m. | OK | Java 11 | TESTS | 80 | 187 | 0 | ||
96702450 | anshum_it_is | C | Oct. 25, 2020, 1:44 p.m. | OK | Java 11 | TESTS | 80 | 202 | 0 | ||
96642725 | markus_v666 | C | Oct. 25, 2020, 9:44 a.m. | OK | Java 11 | TESTS | 80 | 202 | 0 | ||
96746620 | sandy3355 | C | Oct. 26, 2020, 5:09 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96743745 | godxpunk | C | Oct. 26, 2020, 3:56 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96647187 | amansingh-52 | C | Oct. 25, 2020, 10:48 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96645254 | antonskubiiev | C | Oct. 25, 2020, 10:21 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96643005 | mjay4 | C | Oct. 25, 2020, 9:48 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96640147 | TheDarkKnight03 | C | Oct. 25, 2020, 9:08 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96629239 | sudhanshu_lucky | C | Oct. 25, 2020, 5:43 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96623244 | pulkit14 | C | Oct. 25, 2020, 2:59 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96622002 | Extends | C | Oct. 25, 2020, 2:05 a.m. | OK | Java 8 | TESTS | 80 | 109 | 0 | ||
96711543 | kalzor | C | Oct. 25, 2020, 3:24 p.m. | OK | Java 8 | TESTS | 80 | 124 | 0 | ||
96629977 | Spheniscine | C | Oct. 25, 2020, 6:09 a.m. | OK | Kotlin | TESTS | 80 | 124 | 0 | ||
96629131 | Spheniscine | C | Oct. 25, 2020, 5:40 a.m. | OK | Kotlin | TESTS | 80 | 124 | 0 | ||
96627316 | Spheniscine | C | Oct. 25, 2020, 5:27 a.m. | OK | Kotlin | TESTS | 80 | 140 | 0 | ||
96626125 | Spheniscine | C | Oct. 25, 2020, 5:11 a.m. | OK | Kotlin | TESTS | 80 | 156 | 1228800 | ||
96706537 | Ivan_Dunko | C | Oct. 25, 2020, 2:23 p.m. | OK | MS C++ 2017 | TESTS | 80 | 31 | 0 | ||
96642771 | Snoudin | C | Oct. 25, 2020, 9:44 a.m. | OK | MS C++ 2017 | TESTS | 80 | 31 | 0 | ||
96637417 | ZiweiMo | C | Oct. 25, 2020, 8:31 a.m. | OK | MS C++ 2017 | TESTS | 80 | 31 | 0 | ||
96621991 | lingke | C | Oct. 25, 2020, 2:04 a.m. | OK | MS C++ 2017 | TESTS | 80 | 31 | 0 | ||
96607296 | ustaritz | C | Oct. 24, 2020, 7:03 p.m. | OK | MS C++ 2017 | TESTS | 80 | 31 | 0 | ||
96646301 | niki.c2014 | C | Oct. 25, 2020, 10:36 a.m. | OK | MS C++ 2017 | TESTS | 80 | 46 | 0 | ||
96636526 | chenzehao | C | Oct. 25, 2020, 8:21 a.m. | OK | MS C++ 2017 | TESTS | 80 | 46 | 0 | ||
96621588 | 17658592801 | C | Oct. 25, 2020, 1:51 a.m. | OK | MS C++ 2017 | TESTS | 80 | 46 | 0 | ||
96604141 | Pathlessbark8 | C | Oct. 24, 2020, 6:24 p.m. | OK | MS C++ 2017 | TESTS | 80 | 46 | 0 | ||
96603157 | AnnSuperstar | C | Oct. 24, 2020, 6:19 p.m. | OK | MS C++ 2017 | TESTS | 80 | 46 | 0 | ||
96643619 | bazzyadb | C | Oct. 25, 2020, 9:56 a.m. | OK | PyPy 2 | TESTS | 80 | 109 | 0 | ||
96606147 | sequence | C | Oct. 24, 2020, 6:48 p.m. | OK | PyPy 2 | TESTS | 80 | 124 | 307200 | ||
96617365 | yumtam | C | Oct. 24, 2020, 10:53 p.m. | OK | PyPy 2 | TESTS | 80 | 140 | 0 | ||
96644819 | chaudhary_19 | C | Oct. 25, 2020, 10:14 a.m. | OK | PyPy 2 | TESTS | 80 | 140 | 1536000 | ||
96633281 | mo-hit | C | Oct. 25, 2020, 7:32 a.m. | OK | PyPy 2 | TESTS | 80 | 233 | 9318400 | ||
96747648 | sourabhgol1999 | C | Oct. 26, 2020, 5:29 a.m. | OK | PyPy 2 | TESTS | 80 | 280 | 8294400 | ||
96621038 | wwwCielllwww | C | Oct. 25, 2020, 1:34 a.m. | OK | PyPy 3 | TESTS | 80 | 140 | 204800 | ||
96736578 | khkris99 | C | Oct. 26, 2020, 12:06 a.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96679301 | R.Anwar | C | Oct. 25, 2020, 12:10 p.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96639340 | DhurBaal | C | Oct. 25, 2020, 8:57 a.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96620999 | YMSeah | C | Oct. 25, 2020, 1:32 a.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96620072 | 510030805voidf | C | Oct. 25, 2020, 12:55 a.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96619926 | 510030805voidf | C | Oct. 25, 2020, 12:49 a.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96598941 | gourav2001k | C | Oct. 24, 2020, 5:55 p.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96598264 | Coki628 | C | Oct. 24, 2020, 5:50 p.m. | OK | PyPy 3 | TESTS | 80 | 155 | 0 | ||
96626147 | Anshuman2043 | C | Oct. 25, 2020, 5:12 a.m. | OK | PyPy 3 | TESTS | 80 | 155 | 204800 | ||
96621881 | ComptineDunAutreEte | C | Oct. 25, 2020, 2 a.m. | OK | Python 2 | TESTS | 80 | 171 | 0 | ||
96623931 | srijan.sarkar | C | Oct. 25, 2020, 3:32 a.m. | OK | Python 3 | TESTS | 80 | 108 | 307200 | ||
96645014 | moriarty1992 | C | Oct. 25, 2020, 10:17 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96635527 | MightyMoin | C | Oct. 25, 2020, 8:04 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96635456 | REDVED | C | Oct. 25, 2020, 8:03 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96632002 | rajbit | C | Oct. 25, 2020, 7:07 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96625208 | ujjwalavishek | C | Oct. 25, 2020, 4:31 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96623167 | anumolu_sriharsha | C | Oct. 25, 2020, 2:55 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96621299 | kidoil | C | Oct. 25, 2020, 1:42 a.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96601435 | bimbat_yuri | C | Oct. 24, 2020, 6:07 p.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96599803 | TheGreenhorner | C | Oct. 24, 2020, 6:02 p.m. | OK | Python 3 | TESTS | 80 | 109 | 307200 | ||
96611449 | zheland | C | Oct. 24, 2020, 8:12 p.m. | OK | Rust | TESTS | 80 | 31 | 0 | ||
96598863 | aberent | C | Oct. 24, 2020, 5:54 p.m. | OK | Rust | TESTS | 80 | 31 | 0 | ||
96675310 | arturas | C | Oct. 25, 2020, 11:59 a.m. | OK | Rust | TESTS | 80 | 46 | 0 | ||
96619482 | GeoffreyY | C | Oct. 25, 2020, 12:27 a.m. | OK | Rust | TESTS | 80 | 46 | 0 |
Back to search problems