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 |
---|---|---|---|---|---|---|
1364 | Codeforces Round 649 (Div. 2) | FINISHED | False | 7200 | 145292111 | June 13, 2020, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 28736 ) | A | XXXXX | PROGRAMMING | brute force data structures number theory two pointers | 1200 |
B"Ehab loves number theory, but for some reason he hates the number x . Given an array a , find the length of its longest subarray such that the sum of its elements isn't divisible by x , or determine that such subarray doesn't exist. An array a is a subarray of an array b if a can be obtained from b by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. The first line contains an integer t (1 <= t <= 5) -- the number of test cases you need to solve. The description of the test cases follows. The first line of each test case contains 2 integers n and x ( 1 <= n <= 10^5 , 1 <= x <= 10^4 ) -- the number of elements in the array a and the number that Ehab hates. The second line contains n space-separated integers a_1 , a_2 , ldots , a_{n} ( 0 <= a_i <= 10^4 ) -- the elements of the array a . For each testcase, print the length of the longest subarray whose sum isn't divisible by x . If there's no such subarray, print -1 . In the first test case, the subarray [2,3] has sum of elements 5 , which isn't divisible by 3 . In the second test case, the sum of elements of the whole array is 6 , which isn't divisible by 4 . In the third test case, all subarrays have an even sum, so the answer is -1 . "... |
Codeforces round #649 editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
83672153 | ruban | A | June 13, 2020, 4:39 p.m. | OK | Delphi | TESTS | 10 | 108 | 262963200 | 1200 | |
83682397 | trans_el | A | June 13, 2020, 5:04 p.m. | OK | GNU C11 | TESTS | 10 | 77 | 0 | 1200 | |
83695179 | calrare | A | June 13, 2020, 7:30 p.m. | OK | GNU C11 | TESTS | 13 | 78 | 409600 | 1200 | |
83711986 | Himelcse005 | A | June 14, 2020, 3:51 a.m. | OK | GNU C11 | TESTS | 14 | 78 | 409600 | 1200 | |
83673574 | rakibulhasan04002 | A | June 13, 2020, 4:43 p.m. | OK | GNU C11 | TESTS | 10 | 78 | 409600 | 1200 | |
83658301 | ShofiqurRahman | A | June 13, 2020, 4:04 p.m. | OK | GNU C11 | TESTS | 10 | 78 | 409600 | 1200 | |
83680939 | mrashid_5919 | A | June 13, 2020, 5:02 p.m. | OK | GNU C11 | TESTS | 10 | 78 | 819200 | 1200 | |
83669949 | rainboy | A | June 13, 2020, 4:33 p.m. | OK | GNU C11 | TESTS | 10 | 93 | 0 | 1200 | |
83677613 | RHasanR | A | June 13, 2020, 4:54 p.m. | OK | GNU C11 | TESTS | 10 | 93 | 409600 | 1200 | |
83708023 | minannu | A | June 14, 2020, 2:01 a.m. | OK | GNU C11 | TESTS | 14 | 93 | 409600 | 1200 | |
83664891 | Sonu_halder_ | A | June 13, 2020, 4:20 p.m. | OK | GNU C11 | TESTS | 10 | 93 | 409600 | 1200 | |
83671776 | dutouyvluori | A | June 13, 2020, 4:38 p.m. | OK | GNU C++11 | TESTS | 10 | 30 | 0 | 1200 | |
83709574 | 2018liuzhiyuan | A | June 14, 2020, 2:50 a.m. | OK | GNU C++11 | TESTS | 14 | 31 | 0 | 1200 | |
83670813 | Asd_Okuu | A | June 13, 2020, 4:35 p.m. | OK | GNU C++11 | TESTS | 10 | 31 | 0 | 1200 | |
83652247 | zxy_AC | A | June 13, 2020, 3:51 p.m. | OK | GNU C++11 | TESTS | 10 | 31 | 409600 | 1200 | |
83712928 | AyoAyowei | A | June 14, 2020, 4:10 a.m. | OK | GNU C++11 | TESTS | 14 | 31 | 409600 | 1200 | |
83662902 | prodipdatta7 | A | June 13, 2020, 4:15 p.m. | OK | GNU C++11 | TESTS | 10 | 31 | 716800 | 1200 | |
83717294 | ken_liu | A | June 14, 2020, 5:30 a.m. | OK | GNU C++11 | TESTS | 14 | 31 | 819200 | 1200 | |
83711207 | vjudge3 | A | June 14, 2020, 3:34 a.m. | OK | GNU C++11 | TESTS | 14 | 31 | 819200 | 1200 | |
83645904 | ProgrammerStrange | A | June 13, 2020, 3:40 p.m. | OK | GNU C++11 | TESTS | 10 | 31 | 819200 | 1200 | |
83654313 | HHU-DengLun | A | June 13, 2020, 3:55 p.m. | OK | GNU C++11 | TESTS | 10 | 31 | 1433600 | 1200 | |
83689589 | Linkus | A | June 13, 2020, 6:17 p.m. | OK | GNU C++14 | TESTS | 12 | 31 | 512000 | 1200 | |
83716892 | _Vampire. | A | June 14, 2020, 5:24 a.m. | OK | GNU C++14 | TESTS | 14 | 78 | 819200 | 1200 | |
83657749 | Ttube_lightT | A | June 13, 2020, 4:03 p.m. | OK | GNU C++14 | TESTS | 10 | 78 | 1126400 | 1200 | |
83658980 | l3aRn | A | June 13, 2020, 4:05 p.m. | OK | GNU C++14 | TESTS | 10 | 78 | 2252800 | 1200 | |
83651725 | z-bb | A | June 13, 2020, 3:50 p.m. | OK | GNU C++14 | TESTS | 10 | 93 | 409600 | 1200 | |
83687760 | puzzler29 | A | June 13, 2020, 6 p.m. | OK | GNU C++14 | TESTS | 10 | 93 | 409600 | 1200 | |
83654738 | Ans_31 | A | June 13, 2020, 3:56 p.m. | OK | GNU C++14 | TESTS | 10 | 93 | 819200 | 1200 | |
83664220 | Vesper_Lynd | A | June 13, 2020, 4:18 p.m. | OK | GNU C++14 | TESTS | 10 | 93 | 1024000 | 1200 | |
83659988 | saathvik782 | A | June 13, 2020, 4:08 p.m. | OK | GNU C++14 | TESTS | 10 | 93 | 1024000 | 1200 | |
83653706 | conjuringuniverse69 | A | June 13, 2020, 3:54 p.m. | OK | GNU C++14 | TESTS | 10 | 93 | 1843200 | 1200 | |
83702083 | whiteedu84 | A | June 13, 2020, 9:54 p.m. | OK | GNU C++17 | TESTS | 14 | 78 | 0 | 1200 | |
83668888 | yeguzi | A | June 13, 2020, 4:30 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 204800 | 1200 | |
83684035 | Duwvux | A | June 13, 2020, 5:36 p.m. | OK | GNU C++17 | TESTS | 10 | 78 | 614400 | 1200 | |
83665177 | saurabh247 | A | June 13, 2020, 4:20 p.m. | OK | GNU C++17 | TESTS | 10 | 93 | 614400 | 1200 | |
83702280 | gihewapos | A | June 13, 2020, 10:01 p.m. | OK | GNU C++17 | TESTS | 14 | 93 | 614400 | 1200 | |
83679952 | Tokaku | A | June 13, 2020, 4:59 p.m. | OK | GNU C++17 | TESTS | 10 | 93 | 921600 | 1200 | |
83685975 | arman.... | A | June 13, 2020, 5:46 p.m. | OK | GNU C++17 | TESTS | 10 | 93 | 1126400 | 1200 | |
83714909 | _Cheetos_ | A | June 14, 2020, 4:49 a.m. | OK | GNU C++17 | TESTS | 14 | 93 | 1126400 | 1200 | |
83655074 | puneet009 | A | June 13, 2020, 3:57 p.m. | OK | GNU C++17 | TESTS | 10 | 93 | 1228800 | 1200 | |
83667255 | yukino_hana | A | June 13, 2020, 4:26 p.m. | OK | GNU C++17 | TESTS | 10 | 93 | 1228800 | 1200 | |
83708690 | Bekh | A | June 14, 2020, 2:25 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 61 | 0 | 1200 | |
83712142 | ZeroooIQ | A | June 14, 2020, 3:54 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 61 | 1740800 | 1200 | |
83692251 | kvutxdy | A | June 13, 2020, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 62 | 0 | 1200 | |
83696965 | snapes | A | June 13, 2020, 7:58 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 62 | 409600 | 1200 | |
83682277 | Bhai_maro_mujhe | A | June 13, 2020, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 62 | 921600 | 1200 | |
83706060 | ggdwbg | A | June 14, 2020, 12:45 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 62 | 921600 | 1200 | |
83707251 | Baybay | A | June 14, 2020, 1:32 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 62 | 921600 | 1200 | |
83673430 | itsmeaj | A | June 13, 2020, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 62 | 1638400 | 1200 | |
83644502 | s.b.bhadiyadara33 | A | June 13, 2020, 3:38 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 62 | 1740800 | 1200 | |
83655090 | Zeus_NoT_Zues | A | June 13, 2020, 3:57 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 62 | 1740800 | 1200 | |
83718021 | takezawa | A | June 14, 2020, 5:42 a.m. | OK | Go | TESTS | 14 | 108 | 409600 | 1200 | |
83683931 | minimario | A | June 13, 2020, 5:36 p.m. | OK | Haskell | TESTS | 10 | 982 | 45260800 | 1200 | |
83693047 | arnabdey | A | June 13, 2020, 7:01 p.m. | OK | Java 11 | TESTS | 13 | 186 | 0 | 1200 | |
83685278 | wistful23 | A | June 13, 2020, 5:42 p.m. | OK | Java 11 | TESTS | 10 | 186 | 0 | 1200 | |
83686050 | saikaushik333 | A | June 13, 2020, 5:47 p.m. | OK | Java 11 | TESTS | 10 | 187 | 0 | 1200 | |
83682589 | wistful23 | A | June 13, 2020, 5:04 p.m. | OK | Java 11 | TESTS | 10 | 187 | 0 | 1200 | |
83661716 | BNL | A | June 13, 2020, 4:12 p.m. | OK | Java 11 | TESTS | 10 | 187 | 0 | 1200 | |
83645614 | HoldTight | A | June 13, 2020, 3:40 p.m. | OK | Java 11 | TESTS | 10 | 187 | 0 | 1200 | |
83650799 | sarthakmanna | A | June 13, 2020, 3:49 p.m. | OK | Java 11 | TESTS | 10 | 187 | 204800 | 1200 | |
83689964 | p_unit | A | June 13, 2020, 6:22 p.m. | OK | Java 11 | TESTS | 12 | 202 | 0 | 1200 | |
83677143 | saniya3010 | A | June 13, 2020, 4:53 p.m. | OK | Java 11 | TESTS | 10 | 202 | 0 | 1200 | |
83709469 | suryansh.official100 | A | June 14, 2020, 2:48 a.m. | OK | Java 11 | TESTS | 14 | 217 | 0 | 1200 | |
83695843 | mr___hacker____ | A | June 13, 2020, 7:40 p.m. | OK | Java 8 | TESTS | 13 | 109 | 0 | 1200 | |
83718114 | bohot_hard_123 | A | June 14, 2020, 5:44 a.m. | OK | Java 8 | TESTS | 14 | 109 | 0 | 1200 | |
83699665 | akshay_1604 | A | June 13, 2020, 8:50 p.m. | OK | Java 8 | TESTS | 13 | 109 | 0 | 1200 | |
83676097 | IBatJ | A | June 13, 2020, 4:50 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | 1200 | |
83658403 | chinmaya21 | A | June 13, 2020, 4:04 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | 1200 | |
83644558 | cis_pie | A | June 13, 2020, 3:38 p.m. | OK | Java 8 | TESTS | 10 | 109 | 0 | 1200 | |
83710741 | Manan8686 | A | June 14, 2020, 3:21 a.m. | OK | Java 8 | TESTS | 14 | 124 | 0 | 1200 | |
83690319 | KharYusuf | A | June 13, 2020, 6:26 p.m. | OK | Java 8 | TESTS | 12 | 124 | 0 | 1200 | |
83687739 | yash49 | A | June 13, 2020, 6 p.m. | OK | Java 8 | TESTS | 10 | 124 | 0 | 1200 | |
83690411 | undisputedAshu | A | June 13, 2020, 6:27 p.m. | OK | Java 8 | TESTS | 12 | 124 | 0 | 1200 | |
83665032 | tagiev.stanislav | A | June 13, 2020, 4:20 p.m. | OK | JavaScript | TESTS | 10 | 202 | 21504000 | 1200 | |
83709381 | Spheniscine | A | June 14, 2020, 2:46 a.m. | OK | Kotlin | TESTS | 14 | 171 | 512000 | 1200 | |
83685017 | shivam1420 | A | June 13, 2020, 5:41 p.m. | OK | Kotlin | TESTS | 10 | 280 | 6144000 | 1200 | |
83644251 | shivam1420 | A | June 13, 2020, 3:37 p.m. | OK | Kotlin | TESTS | 10 | 295 | 6144000 | 1200 | |
83677205 | MikasaAckermann | A | June 13, 2020, 4:53 p.m. | OK | Kotlin | TESTS | 10 | 311 | 5529600 | 1200 | |
83667080 | Kap_Knight | A | June 13, 2020, 4:25 p.m. | OK | Kotlin | TESTS | 10 | 421 | 3993600 | 1200 | |
83651762 | MulticolorWorld | A | June 13, 2020, 3:50 p.m. | OK | Kotlin | TESTS | 10 | 436 | 5017600 | 1200 | |
83717290 | TRR | A | June 14, 2020, 5:30 a.m. | OK | Mono C# | TESTS | 14 | 155 | 30515200 | 1200 | |
83667984 | hedgedog | A | June 13, 2020, 4:28 p.m. | OK | Mono C# | TESTS | 10 | 155 | 32460800 | 1200 | |
83654302 | ilelikv | A | June 13, 2020, 3:55 p.m. | OK | Mono C# | TESTS | 10 | 170 | 32972800 | 1200 | |
83659950 | J_Duck | A | June 13, 2020, 4:08 p.m. | OK | Mono C# | TESTS | 10 | 171 | 29286400 | 1200 | |
83672617 | jankmet | A | June 13, 2020, 4:40 p.m. | OK | Mono C# | TESTS | 10 | 171 | 32460800 | 1200 | |
83648020 | Dock290 | A | June 13, 2020, 3:44 p.m. | OK | Mono C# | TESTS | 10 | 186 | 28876800 | 1200 | |
83660308 | SvetlinkA | A | June 13, 2020, 4:08 p.m. | OK | Mono C# | TESTS | 10 | 187 | 28262400 | 1200 | |
83654591 | twa | A | June 13, 2020, 3:56 p.m. | OK | Mono C# | TESTS | 10 | 280 | 5017600 | 1200 | |
83644215 | PanZverski | A | June 13, 2020, 3:37 p.m. | OK | MS C++ 2017 | TESTS | 10 | 109 | 716800 | 1200 | |
83647927 | Bryannoel | A | June 13, 2020, 3:43 p.m. | OK | MS C++ 2017 | TESTS | 10 | 124 | 1638400 | 1200 | |
83714686 | Cube219 | A | June 14, 2020, 4:45 a.m. | OK | MS C++ 2017 | TESTS | 14 | 139 | 409600 | 1200 | |
83675729 | Reica | A | June 13, 2020, 4:49 p.m. | OK | MS C++ 2017 | TESTS | 10 | 139 | 819200 | 1200 | |
83665213 | Flander | A | June 13, 2020, 4:21 p.m. | OK | MS C++ 2017 | TESTS | 10 | 140 | 1228800 | 1200 | |
83649557 | TMHazem | A | June 13, 2020, 3:46 p.m. | OK | MS C++ 2017 | TESTS | 10 | 140 | 1228800 | 1200 | |
83654485 | getN1ght | A | June 13, 2020, 3:56 p.m. | OK | MS C++ 2017 | TESTS | 10 | 296 | 921600 | 1200 | |
83668476 | pjh6792 | A | June 13, 2020, 4:29 p.m. | OK | MS C++ 2017 | TESTS | 10 | 296 | 921600 | 1200 | |
83648714 | reikiriyama | A | June 13, 2020, 3:45 p.m. | OK | MS C++ 2017 | TESTS | 10 | 311 | 3891200 | 1200 | |
83649329 | Myao | A | June 13, 2020, 3:46 p.m. | OK | MS C++ 2017 | TESTS | 10 | 312 | 0 | 1200 | |
83657102 | chris-md | A | June 13, 2020, 4:01 p.m. | OK | PyPy 2 | TESTS | 10 | 202 | 18329600 | 1200 | |
83656927 | Mukundan314 | A | June 13, 2020, 4:01 p.m. | OK | PyPy 2 | TESTS | 10 | 202 | 19660800 | 1200 | |
83660765 | mo-hit | A | June 13, 2020, 4:09 p.m. | OK | PyPy 2 | TESTS | 10 | 312 | 22937600 | 1200 | |
83648062 | _apurv_ | A | June 13, 2020, 3:44 p.m. | OK | PyPy 3 | TESTS | 10 | 202 | 19968000 | 1200 | |
83692606 | servermonk | A | June 13, 2020, 6:55 p.m. | OK | PyPy 3 | TESTS | 13 | 217 | 12697600 | 1200 | |
83694805 | UTMoonlight | A | June 13, 2020, 7:25 p.m. | OK | PyPy 3 | TESTS | 13 | 217 | 13619200 | 1200 | |
83655578 | kfardeen7890 | A | June 13, 2020, 3:58 p.m. | OK | PyPy 3 | TESTS | 10 | 218 | 13824000 | 1200 | |
83698126 | tirtho2107 | A | June 13, 2020, 8:19 p.m. | OK | PyPy 3 | TESTS | 13 | 218 | 19865600 | 1200 | |
83697371 | manish.17 | A | June 13, 2020, 8:05 p.m. | OK | PyPy 3 | TESTS | 13 | 233 | 18534400 | 1200 | |
83714132 | Piokemon | A | June 14, 2020, 4:34 a.m. | OK | PyPy 3 | TESTS | 14 | 234 | 13516800 | 1200 | |
83690620 | Aestroix | A | June 13, 2020, 6:30 p.m. | OK | PyPy 3 | TESTS | 12 | 249 | 18124800 | 1200 | |
83687306 | dipta007 | A | June 13, 2020, 5:56 p.m. | OK | PyPy 3 | TESTS | 10 | 249 | 18636800 | 1200 | |
83647772 | nikeshthapa255 | A | June 13, 2020, 3:43 p.m. | OK | PyPy 3 | TESTS | 10 | 280 | 18739200 | 1200 | |
83695043 | ComptineDunAutreEte | A | June 13, 2020, 7:28 p.m. | OK | Python 2 | TESTS | 13 | 405 | 8908800 | 1200 | |
83655358 | Bluefish2 | A | June 13, 2020, 3:58 p.m. | OK | Python 2 | TESTS | 10 | 421 | 7782400 | 1200 | |
83652152 | kmd99 | A | June 13, 2020, 3:51 p.m. | OK | Python 2 | TESTS | 10 | 452 | 10035200 | 1200 | |
83653555 | Mike10 | A | June 13, 2020, 3:54 p.m. | OK | Python 2 | TESTS | 10 | 514 | 12185600 | 1200 | |
83649375 | Ekinak | A | June 13, 2020, 3:46 p.m. | OK | Python 2 | TESTS | 10 | 670 | 10342400 | 1200 | |
83699026 | Black_Fregat | A | June 13, 2020, 8:37 p.m. | OK | Python 3 | TESTS | 13 | 249 | 9932800 | 1200 | |
83644564 | Mayank08 | A | June 13, 2020, 3:38 p.m. | OK | Python 3 | TESTS | 10 | 265 | 7270400 | 1200 | |
83652384 | smit_123 | A | June 13, 2020, 3:51 p.m. | OK | Python 3 | TESTS | 10 | 280 | 9113600 | 1200 | |
83644628 | prkteja99 | A | June 13, 2020, 3:38 p.m. | OK | Python 3 | TESTS | 10 | 280 | 9523200 | 1200 | |
83701173 | IKSOHU_GS | A | June 13, 2020, 9:26 p.m. | OK | Python 3 | TESTS | 14 | 296 | 9523200 | 1200 | |
83667275 | 99127 | A | June 13, 2020, 4:26 p.m. | OK | Python 3 | TESTS | 10 | 311 | 8704000 | 1200 | |
83716909 | maraj262000 | A | June 14, 2020, 5:24 a.m. | OK | Python 3 | TESTS | 14 | 311 | 8806400 | 1200 | |
83662607 | AyujPanchal | A | June 13, 2020, 4:14 p.m. | OK | Python 3 | TESTS | 10 | 311 | 8806400 | 1200 | |
83710346 | newlord | A | June 14, 2020, 3:10 a.m. | OK | Python 3 | TESTS | 14 | 311 | 8908800 | 1200 | |
83649024 | Croco | A | June 13, 2020, 3:45 p.m. | OK | Python 3 | TESTS | 10 | 311 | 8908800 | 1200 | |
83673113 | ktn_yuta | A | June 13, 2020, 4:42 p.m. | OK | Rust | TESTS | 10 | 46 | 2252800 | 1200 | |
83663548 | maguro_tuna | A | June 13, 2020, 4:16 p.m. | OK | Rust | TESTS | 10 | 62 | 3276800 | 1200 | |
83648179 | robostac | A | June 13, 2020, 3:44 p.m. | OK | Rust | TESTS | 10 | 62 | 3379200 | 1200 | |
83680639 | olga-rmrf | A | June 13, 2020, 5:01 p.m. | OK | Rust | TESTS | 10 | 78 | 4812800 | 1200 |
Back to search problems