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 |
---|---|---|---|---|---|---|
1455 | Educational Codeforces Round 99 (Rated for Div. 2) | FINISHED | False | 7200 | 130605911 | Nov. 30, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12460 ) | D | Sequence and Swaps | PROGRAMMING | dp greedy sortings |
B'You are given a sequence a consisting of n integers a_1, a_2, ... , a_n , and an integer x . Your task is to make the sequence a sorted (it is considered sorted if the condition a_1 <= a_2 <= a_3 <= ... <= a_n holds). To make the sequence sorted, you may perform the following operation any number of times you want (possibly zero): choose an integer i such that 1 <= i <= n and a_i > x , and swap the values of a_i and x . For example, if a = [0, 2, 3, 5, 4] , x = 1 , the following sequence of operations is possible: Calculate the minimum number of operations you have to perform so that a becomes sorted, or report that it is impossible. The first line contains one integer t ( 1 <= t <= 500 ) -- the number of test cases. Each test case consists of two lines. The first line contains two integers n and x ( 1 <= n <= 500 , 0 <= x <= 500 ) -- the number of elements in the sequence and the initial value of x . The second line contains n integers a_1 , a_2 , ..., a_n ( 0 <= a_i <= 500 ). The sum of values of n over all test cases in the input does not exceed 500 . For each test case, print one integer -- the minimum number of operations you have to perform to make a sorted, or -1 , if it is impossible. '... |
85186 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
100060578 | om_patel | D | Nov. 30, 2020, 6:06 p.m. | OK | Clang++17 Diagnostics | TESTS | 47 | 62 | 0 | ||
100049422 | Gassa | D | Nov. 30, 2020, 4:29 p.m. | OK | D | TESTS | 46 | 31 | 0 | ||
100074541 | myotra | D | Dec. 1, 2020, 2:04 a.m. | OK | GNU C11 | TESTS | 47 | 30 | 0 | ||
100061773 | rainboy | D | Nov. 30, 2020, 6:26 p.m. | OK | GNU C11 | TESTS | 47 | 31 | 0 | ||
100074098 | myotra | D | Dec. 1, 2020, 1:43 a.m. | OK | GNU C11 | TESTS | 47 | 31 | 0 | ||
100074468 | myotra | D | Dec. 1, 2020, 2 a.m. | OK | GNU C11 | TESTS | 47 | 31 | 0 | ||
100082101 | GoldenSteelPig | D | Dec. 1, 2020, 5:20 a.m. | OK | GNU C11 | TESTS | 48 | 31 | 0 | ||
100059870 | babaiserror | D | Nov. 30, 2020, 5:54 p.m. | OK | GNU C11 | TESTS | 47 | 31 | 0 | ||
100052695 | 1435730 | D | Nov. 30, 2020, 4:37 p.m. | OK | GNU C11 | TESTS | 46 | 31 | 0 | ||
100054866 | babaiserror | D | Nov. 30, 2020, 4:52 p.m. | OK | GNU C11 | TESTS | 46 | 31 | 0 | ||
100051612 | toxic4u | D | Nov. 30, 2020, 4:34 p.m. | OK | GNU C++11 | TESTS | 46 | 30 | 0 | ||
100060676 | i_love_Lisa | D | Nov. 30, 2020, 6:07 p.m. | OK | GNU C++11 | TESTS | 47 | 30 | 0 | ||
100049615 | rabs00 | D | Nov. 30, 2020, 4:30 p.m. | OK | GNU C++11 | TESTS | 46 | 30 | 0 | ||
100073191 | do_while_true | D | Dec. 1, 2020, 1:03 a.m. | OK | GNU C++11 | TESTS | 47 | 30 | 512000 | ||
100082336 | oyqy1203 | D | Dec. 1, 2020, 5:25 a.m. | OK | GNU C++11 | TESTS | 48 | 30 | 1843200 | ||
100043674 | IanKlein | D | Nov. 30, 2020, 4:15 p.m. | OK | GNU C++11 | TESTS | 46 | 30 | 2048000 | ||
100084352 | 142 | D | Dec. 1, 2020, 6:02 a.m. | OK | GNU C++11 | TESTS | 48 | 31 | 0 | ||
100082386 | kevinwinatamichael | D | Dec. 1, 2020, 5:25 a.m. | OK | GNU C++11 | TESTS | 48 | 31 | 0 | ||
100082663 | meenal_27 | D | Dec. 1, 2020, 5:30 a.m. | OK | GNU C++11 | TESTS | 48 | 31 | 0 | ||
100084205 | Cleanblue | D | Dec. 1, 2020, 5:59 a.m. | OK | GNU C++11 | TESTS | 48 | 31 | 0 | ||
100083360 | p_pradhan | D | Dec. 1, 2020, 5:44 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100083298 | shivyyy_21 | D | Dec. 1, 2020, 5:42 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100083229 | abufarhad | D | Dec. 1, 2020, 5:41 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100084520 | totorro | D | Dec. 1, 2020, 6:05 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100084529 | index.js | D | Dec. 1, 2020, 6:05 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100084376 | Dark_Lord_ | D | Dec. 1, 2020, 6:02 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100083866 | mrmayur | D | Dec. 1, 2020, 5:53 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100083683 | krunal2209 | D | Dec. 1, 2020, 5:50 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100083576 | deepakrikhari2 | D | Dec. 1, 2020, 5:48 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100083482 | purvadua | D | Dec. 1, 2020, 5:46 a.m. | OK | GNU C++14 | TESTS | 48 | 31 | 0 | ||
100065515 | 6602 | D | Nov. 30, 2020, 7:43 p.m. | OK | GNU C++17 | TESTS | 47 | 30 | 102400 | ||
100057968 | slayer_noob | D | Nov. 30, 2020, 5:28 p.m. | OK | GNU C++17 | TESTS | 47 | 30 | 204800 | ||
100083993 | suman_buie | D | Dec. 1, 2020, 5:55 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100084248 | Ommivorous | D | Dec. 1, 2020, 5:59 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100084128 | the_crazy_programmer404 | D | Dec. 1, 2020, 5:57 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100084115 | Ignite_X | D | Dec. 1, 2020, 5:57 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100083842 | sakuryu | D | Dec. 1, 2020, 5:52 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100083714 | Sajjad_fc13 | D | Dec. 1, 2020, 5:50 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100083600 | Acacac_ple | D | Dec. 1, 2020, 5:48 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100083467 | Schwarzenegger | D | Dec. 1, 2020, 5:46 a.m. | OK | GNU C++17 | TESTS | 48 | 31 | 0 | ||
100053645 | phensedyl | D | Nov. 30, 2020, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 15 | 0 | ||
100055636 | anshulsaraf | D | Nov. 30, 2020, 4:59 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 15 | 0 | ||
100052953 | I_Love_Trott | D | Nov. 30, 2020, 4:38 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 30 | 0 | ||
100056861 | Rezaul_Karim | D | Nov. 30, 2020, 5:13 p.m. | OK | GNU C++17 (64) | TESTS | 47 | 30 | 0 | ||
100059765 | jdvoid_44 | D | Nov. 30, 2020, 5:53 p.m. | OK | GNU C++17 (64) | TESTS | 47 | 30 | 0 | ||
100047377 | ayanavd | D | Nov. 30, 2020, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 30 | 0 | ||
100061826 | tejpratapp468 | D | Nov. 30, 2020, 6:27 p.m. | OK | GNU C++17 (64) | TESTS | 47 | 30 | 0 | ||
100084167 | tanya_0205 | D | Dec. 1, 2020, 5:58 a.m. | OK | GNU C++17 (64) | TESTS | 48 | 31 | 0 | ||
100083279 | Darshan_Darji | D | Dec. 1, 2020, 5:42 a.m. | OK | GNU C++17 (64) | TESTS | 48 | 31 | 0 | ||
100082827 | Darshan_Darji | D | Dec. 1, 2020, 5:33 a.m. | OK | GNU C++17 (64) | TESTS | 48 | 31 | 0 | ||
100044801 | maguroguma | D | Nov. 30, 2020, 4:18 p.m. | OK | Go | TESTS | 46 | 46 | 0 | ||
100050091 | byorgey | D | Nov. 30, 2020, 4:31 p.m. | OK | Haskell | TESTS | 46 | 31 | 102400 | ||
100063154 | bittubittu | D | Nov. 30, 2020, 6:53 p.m. | OK | Java 11 | TESTS | 47 | 171 | 0 | ||
100061845 | mphillotry | D | Nov. 30, 2020, 6:28 p.m. | OK | Java 11 | TESTS | 47 | 171 | 0 | ||
100043859 | b0bl0blaw | D | Nov. 30, 2020, 4:15 p.m. | OK | Java 11 | TESTS | 46 | 171 | 0 | ||
100054270 | kp_863 | D | Nov. 30, 2020, 4:47 p.m. | OK | Java 11 | TESTS | 46 | 171 | 102400 | ||
100051039 | Mhmmd.itani | D | Nov. 30, 2020, 4:33 p.m. | OK | Java 11 | TESTS | 46 | 186 | 0 | ||
100058065 | DreamInfinite | D | Nov. 30, 2020, 5:29 p.m. | OK | Java 11 | TESTS | 47 | 186 | 0 | ||
100058004 | Changeble | D | Nov. 30, 2020, 5:28 p.m. | OK | Java 11 | TESTS | 47 | 186 | 0 | ||
100057000 | Mhmmd.itani | D | Nov. 30, 2020, 5:15 p.m. | OK | Java 11 | TESTS | 47 | 186 | 0 | ||
100061469 | typewriter999 | D | Nov. 30, 2020, 6:21 p.m. | OK | Java 11 | TESTS | 47 | 187 | 0 | ||
100080790 | Sanju_250406 | D | Dec. 1, 2020, 4:53 a.m. | OK | Java 11 | TESTS | 47 | 187 | 0 | ||
100064830 | desp__beginner | D | Nov. 30, 2020, 7:28 p.m. | OK | Java 8 | TESTS | 47 | 108 | 0 | ||
100068810 | desp__beginner | D | Nov. 30, 2020, 9:10 p.m. | OK | Java 8 | TESTS | 47 | 109 | 0 | ||
100046243 | Adi_786 | D | Nov. 30, 2020, 4:21 p.m. | OK | Java 8 | TESTS | 46 | 109 | 0 | ||
100064260 | Uttam007 | D | Nov. 30, 2020, 7:15 p.m. | OK | Java 8 | TESTS | 47 | 109 | 0 | ||
100083856 | prasoon006 | D | Dec. 1, 2020, 5:53 a.m. | OK | Java 8 | TESTS | 48 | 109 | 0 | ||
100068934 | desp__beginner | D | Nov. 30, 2020, 9:14 p.m. | OK | Java 8 | TESTS | 47 | 109 | 0 | ||
100068494 | desp__beginner | D | Nov. 30, 2020, 8:58 p.m. | OK | Java 8 | TESTS | 47 | 124 | 0 | ||
100084351 | rachitpts.2454 | D | Dec. 1, 2020, 6:02 a.m. | OK | Java 8 | TESTS | 48 | 124 | 0 | ||
100073733 | bwang1008 | D | Dec. 1, 2020, 1:26 a.m. | OK | Java 8 | TESTS | 47 | 124 | 0 | ||
100068474 | desp__beginner | D | Nov. 30, 2020, 8:58 p.m. | OK | Java 8 | TESTS | 47 | 124 | 0 | ||
100044632 | sid9406 | D | Nov. 30, 2020, 4:17 p.m. | OK | Kotlin | TESTS | 46 | 124 | 0 | ||
100059106 | AryssonFigueiredo | D | Nov. 30, 2020, 5:43 p.m. | OK | Kotlin | TESTS | 47 | 124 | 0 | ||
100045725 | zornlemma | D | Nov. 30, 2020, 4:20 p.m. | OK | Kotlin | TESTS | 46 | 140 | 614400 | ||
100047320 | Scotty_pwnz | D | Nov. 30, 2020, 4:24 p.m. | OK | Kotlin | TESTS | 46 | 155 | 614400 | ||
100067731 | tscha | D | Nov. 30, 2020, 8:34 p.m. | OK | Kotlin | TESTS | 47 | 171 | 2355200 | ||
100043860 | youx | D | Nov. 30, 2020, 4:15 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100080874 | Pratham_Kumar | D | Dec. 1, 2020, 4:55 a.m. | OK | MS C++ 2017 | TESTS | 47 | 31 | 0 | ||
100078054 | SnowChildren | D | Dec. 1, 2020, 3:52 a.m. | OK | MS C++ 2017 | TESTS | 47 | 31 | 0 | ||
100055256 | phcdream | D | Nov. 30, 2020, 4:56 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100054702 | Toryu | D | Nov. 30, 2020, 4:51 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100046381 | -Tarantula | D | Nov. 30, 2020, 4:22 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100046049 | AntonKozhevnikov | D | Nov. 30, 2020, 4:21 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100045898 | rafle | D | Nov. 30, 2020, 4:20 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100045533 | Bullbas | D | Nov. 30, 2020, 4:20 p.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 0 | ||
100050046 | JackieLee | D | Nov. 30, 2020, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 46 | 46 | 0 | ||
100060451 | thetansquared | D | Nov. 30, 2020, 6:04 p.m. | OK | .NET Core C# | TESTS | 47 | 109 | 102400 | ||
100057543 | tsp67 | D | Nov. 30, 2020, 5:22 p.m. | OK | Node.js | TESTS | 47 | 77 | 204800 | ||
100057519 | tsp67 | D | Nov. 30, 2020, 5:21 p.m. | OK | Node.js | TESTS | 47 | 78 | 204800 | ||
100057224 | explorer_sifat | D | Nov. 30, 2020, 5:18 p.m. | OK | Node.js | TESTS | 47 | 92 | 1126400 | ||
100061781 | L89 | D | Nov. 30, 2020, 6:27 p.m. | OK | Node.js | TESTS | 47 | 93 | 1126400 | ||
100044765 | python_pundit | D | Nov. 30, 2020, 4:18 p.m. | OK | PyPy 2 | TESTS | 46 | 186 | 9113600 | ||
100057684 | aberent | D | Nov. 30, 2020, 5:23 p.m. | OK | PyPy 3 | TESTS | 47 | 140 | 0 | ||
100072412 | myotra | D | Dec. 1, 2020, 12:24 a.m. | OK | PyPy 3 | TESTS | 47 | 140 | 1331200 | ||
100051577 | safal.gupta001 | D | Nov. 30, 2020, 4:34 p.m. | OK | PyPy 3 | TESTS | 46 | 140 | 1331200 | ||
100059423 | uttharapally.chandra | D | Nov. 30, 2020, 5:48 p.m. | OK | PyPy 3 | TESTS | 47 | 140 | 1433600 | ||
100056146 | shiv_99 | D | Nov. 30, 2020, 5:05 p.m. | OK | PyPy 3 | TESTS | 46 | 140 | 1433600 | ||
100077918 | Nishant_Rao | D | Dec. 1, 2020, 3:49 a.m. | OK | PyPy 3 | TESTS | 47 | 155 | 1228800 | ||
100064577 | _abhay809 | D | Nov. 30, 2020, 7:22 p.m. | OK | PyPy 3 | TESTS | 47 | 155 | 1228800 | ||
100084232 | DebRC | D | Dec. 1, 2020, 5:59 a.m. | OK | PyPy 3 | TESTS | 48 | 155 | 1331200 | ||
100050220 | i_am_trigger | D | Nov. 30, 2020, 4:31 p.m. | OK | PyPy 3 | TESTS | 46 | 155 | 1331200 | ||
100048650 | aparna_agrawal | D | Nov. 30, 2020, 4:27 p.m. | OK | PyPy 3 | TESTS | 46 | 155 | 1433600 | ||
100081748 | anonymous0314 | D | Dec. 1, 2020, 5:13 a.m. | OK | Python 2 | TESTS | 48 | 156 | 102400 | ||
100081796 | anonymous0314 | D | Dec. 1, 2020, 5:14 a.m. | OK | Python 2 | TESTS | 48 | 171 | 0 | ||
100079234 | ComptineDunAutreEte | D | Dec. 1, 2020, 4:17 a.m. | OK | Python 2 | TESTS | 47 | 186 | 0 | ||
100079768 | ComptineDunAutreEte | D | Dec. 1, 2020, 4:31 a.m. | OK | Python 2 | TESTS | 47 | 187 | 0 | ||
100047753 | Amit_01 | D | Nov. 30, 2020, 4:25 p.m. | OK | Python 3 | TESTS | 46 | 93 | 307200 | ||
100082200 | mananjagani145 | D | Dec. 1, 2020, 5:22 a.m. | OK | Python 3 | TESTS | 48 | 108 | 307200 | ||
100080927 | madhav154 | D | Dec. 1, 2020, 4:56 a.m. | OK | Python 3 | TESTS | 47 | 108 | 307200 | ||
100061878 | Lithosphere | D | Nov. 30, 2020, 6:28 p.m. | OK | Python 3 | TESTS | 47 | 109 | 0 | ||
100057234 | sh1194 | D | Nov. 30, 2020, 5:18 p.m. | OK | Python 3 | TESTS | 47 | 109 | 0 | ||
100084231 | the100thGod | D | Dec. 1, 2020, 5:59 a.m. | OK | Python 3 | TESTS | 48 | 109 | 307200 | ||
100084214 | nobita26 | D | Dec. 1, 2020, 5:59 a.m. | OK | Python 3 | TESTS | 48 | 109 | 307200 | ||
100069085 | gaintfrog | D | Nov. 30, 2020, 9:20 p.m. | OK | Python 3 | TESTS | 47 | 109 | 307200 | ||
100067061 | sushmanth.dampur8780 | D | Nov. 30, 2020, 8:16 p.m. | OK | Python 3 | TESTS | 47 | 109 | 307200 | ||
100059691 | arvas123 | D | Nov. 30, 2020, 5:52 p.m. | OK | Python 3 | TESTS | 47 | 109 | 307200 | ||
100046426 | cotton100pc | D | Nov. 30, 2020, 4:22 p.m. | OK | Rust | TESTS | 46 | 31 | 307200 | ||
100082533 | bqn | D | Dec. 1, 2020, 5:28 a.m. | OK | Rust | TESTS | 48 | 46 | 0 | ||
100067230 | optozorax | D | Nov. 30, 2020, 8:21 p.m. | OK | Rust | TESTS | 47 | 46 | 0 |
Back to search problems