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 |
---|---|---|---|---|---|---|
1004 | Codeforces Round 495 (Div. 2) | FINISHED | False | 7200 | 201014699 | July 5, 2018, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 11246 ) | A | Sonya and Hotels | PROGRAMMING | implementation | 900 |
B"Sonya decided that having her own hotel business is the best way of earning money because she can profit and rest wherever she wants. The country where Sonya lives is an endless line. There is a city in each integer coordinate on this line. She has n hotels, where the i -th hotel is located in the city with coordinate x_i . Sonya is a smart girl, so she does not open two or more hotels in the same city. Sonya understands that her business needs to be expanded by opening new hotels, so she decides to build one more. She wants to make the minimum distance from this hotel to all others to be equal to d . The girl understands that there are many possible locations to construct such a hotel. Thus she wants to know the number of possible coordinates of the cities where she can build a new hotel. Because Sonya is lounging in a jacuzzi in one of her hotels, she is asking you to find the number of cities where she can build a new hotel so that the minimum distance from the original n hotels to the new one is equal to d . The first line contains two integers n and d ( 1 <= q n <= q 100 , 1 <= q d <= q 10^9 ) -- the number of Sonya's hotels and the needed minimum distance from a new hotel to all others. The second line contains n different integers in strictly increasing order x_1, x_2, ldots, x_n ( -10^9 <= q x_i <= q 10^9 ) -- coordinates of Sonya's hotels. Print the number of cities where Sonya can build a new hotel so that the minimum distance from this hotel to all others is equal to d . In the first example, there are 6 possible cities where Sonya can build a hotel. These cities have coordinates -6 , 5 , 6 , 12 , 13 , and 19 . In the second example, there are 5 possible cities where Sonya can build a hotel. These cities have coordinates 2 , 6 , 13 , 16 , and 21 . "... |
60443 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
40005664 | ImanKz | A | July 5, 2018, 6:28 p.m. | OK | Delphi | TESTS | 45 | 46 | 307200 | 900 | |
39990302 | ruban | A | July 5, 2018, 4:38 p.m. | OK | Delphi | TESTS | 45 | 46 | 4812800 | 900 | |
39999840 | kira_my | A | July 5, 2018, 5:28 p.m. | OK | FPC | TESTS | 45 | 31 | 0 | 900 | |
40002201 | NhamDatKhanhToan | A | July 5, 2018, 5:50 p.m. | OK | FPC | TESTS | 45 | 31 | 0 | 900 | |
39991693 | TShT | A | July 5, 2018, 4:44 p.m. | OK | FPC | TESTS | 45 | 31 | 409600 | 900 | |
39991121 | Ulanov_Victor | A | July 5, 2018, 4:42 p.m. | OK | FPC | TESTS | 45 | 31 | 409600 | 900 | |
40005627 | harsha_virat | A | July 5, 2018, 6:28 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40004025 | nayef.shuvo | A | July 5, 2018, 6:10 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40002443 | nayeem001 | A | July 5, 2018, 5:52 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40002070 | deesha_chavan | A | July 5, 2018, 5:48 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40001940 | Jyamiti | A | July 5, 2018, 5:47 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40001844 | Tango_Romeo | A | July 5, 2018, 5:46 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40001660 | divya2000 | A | July 5, 2018, 5:44 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40000934 | IstiakBinMahmod | A | July 5, 2018, 5:38 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40000900 | mahalo | A | July 5, 2018, 5:37 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40005714 | poogal_1857 | A | July 5, 2018, 6:29 p.m. | OK | GNU C | TESTS | 45 | 31 | 0 | 900 | |
40001847 | jao20000321 | A | July 5, 2018, 5:46 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
40000062 | Dreamer07 | A | July 5, 2018, 5:30 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
39994771 | abhay.sharma0504 | A | July 5, 2018, 4:56 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
39993088 | aymanrasheed7 | A | July 5, 2018, 4:49 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
39992790 | shuashuawan | A | July 5, 2018, 4:48 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
39991269 | 11101001 | A | July 5, 2018, 4:42 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
39990609 | T______________T | A | July 5, 2018, 4:40 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 0 | 900 | |
39991157 | Mr.Universe | A | July 5, 2018, 4:42 p.m. | OK | GNU C++ | TESTS | 45 | 30 | 819200 | 900 | |
40006025 | anthonysam | A | July 5, 2018, 6:32 p.m. | OK | GNU C++ | TESTS | 45 | 31 | 0 | 900 | |
40005905 | nazmul87 | A | July 5, 2018, 6:30 p.m. | OK | GNU C++ | TESTS | 45 | 31 | 0 | 900 | |
39993231 | hsam92632 | A | July 5, 2018, 4:49 p.m. | OK | GNU C11 | TESTS | 45 | 31 | 0 | 900 | |
40000717 | faisaljabet | A | July 5, 2018, 5:36 p.m. | OK | GNU C11 | TESTS | 45 | 31 | 0 | 900 | |
39997296 | codejacker | A | July 5, 2018, 5:09 p.m. | OK | GNU C11 | TESTS | 45 | 31 | 0 | 900 | |
39996269 | 7vik | A | July 5, 2018, 5:03 p.m. | OK | GNU C11 | TESTS | 45 | 31 | 0 | 900 | |
39993987 | LudwigVanBeethoven | A | July 5, 2018, 4:53 p.m. | OK | GNU C11 | TESTS | 45 | 31 | 0 | 900 | |
40001530 | _BOSS_ | A | July 5, 2018, 5:43 p.m. | OK | GNU C11 | TESTS | 45 | 31 | 0 | 900 | |
39993419 | Helomair | A | July 5, 2018, 4:50 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39998786 | RetardAlertClass | A | July 5, 2018, 5:19 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39998399 | fftftw | A | July 5, 2018, 5:17 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39996726 | Ishraq_Nibir | A | July 5, 2018, 5:06 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39995392 | qusaitaha | A | July 5, 2018, 4:59 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39994380 | Khastor | A | July 5, 2018, 4:54 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39993192 | sad_club_piece | A | July 5, 2018, 4:49 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39992971 | ghemnis | A | July 5, 2018, 4:48 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39992241 | CaptainMAK | A | July 5, 2018, 4:46 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39992091 | fedor2612 | A | July 5, 2018, 4:45 p.m. | OK | GNU C++11 | TESTS | 45 | 30 | 0 | 900 | |
39991929 | who__am__i | A | July 5, 2018, 4:45 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39991887 | S.Jahanzad | A | July 5, 2018, 4:45 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39991725 | wh1te_whale | A | July 5, 2018, 4:44 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39991630 | theCassiopeia | A | July 5, 2018, 4:44 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39992532 | krzysiek27 | A | July 5, 2018, 4:47 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39992720 | totito | A | July 5, 2018, 4:48 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39993654 | anindo_7 | A | July 5, 2018, 4:51 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39994276 | sankalp_ag | A | July 5, 2018, 4:54 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39995966 | ankur314 | A | July 5, 2018, 5:02 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39997516 | panvp | A | July 5, 2018, 5:11 p.m. | OK | GNU C++14 | TESTS | 45 | 15 | 0 | 900 | |
39991169 | G0DSPEED | A | July 5, 2018, 4:42 p.m. | OK | GNU C++17 | TESTS | 45 | 15 | 0 | 900 | |
39990306 | I_love_myself | A | July 5, 2018, 4:38 p.m. | OK | GNU C++17 | TESTS | 45 | 15 | 0 | 900 | |
39990633 | KieranHorgan | A | July 5, 2018, 4:40 p.m. | OK | GNU C++17 | TESTS | 45 | 15 | 0 | 900 | |
39991003 | dest.31337 | A | July 5, 2018, 4:41 p.m. | OK | GNU C++17 | TESTS | 45 | 15 | 0 | 900 | |
39990753 | changeless | A | July 5, 2018, 4:40 p.m. | OK | GNU C++17 | TESTS | 45 | 15 | 102400 | 900 | |
39997589 | Rezaul_Karim | A | July 5, 2018, 5:11 p.m. | OK | GNU C++17 | TESTS | 45 | 15 | 102400 | 900 | |
40001420 | Traves | A | July 5, 2018, 5:42 p.m. | OK | GNU C++17 | TESTS | 45 | 30 | 0 | 900 | |
40001672 | Ayanical | A | July 5, 2018, 5:45 p.m. | OK | GNU C++17 | TESTS | 45 | 30 | 0 | 900 | |
40002425 | imOmi_KingOfPalindrome | A | July 5, 2018, 5:52 p.m. | OK | GNU C++17 | TESTS | 45 | 30 | 0 | 900 | |
40001195 | newbutold123 | A | July 5, 2018, 5:40 p.m. | OK | GNU C++17 | TESTS | 45 | 30 | 0 | 900 | |
39995871 | Kavi.Prajapati | A | July 5, 2018, 5:01 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
40002458 | drjaat | A | July 5, 2018, 5:53 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
40002433 | FoundMYSELF | A | July 5, 2018, 5:52 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
40002073 | necsup | A | July 5, 2018, 5:48 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
40000806 | pranav.jain70 | A | July 5, 2018, 5:37 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
39999407 | insane_n00b | A | July 5, 2018, 5:24 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
39998854 | yeshwant97 | A | July 5, 2018, 5:20 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
39998262 | redatawfik | A | July 5, 2018, 5:16 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
39996646 | YahiaBadr | A | July 5, 2018, 5:05 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
39995379 | mauriCZ | A | July 5, 2018, 4:59 p.m. | OK | Java 8 | TESTS | 45 | 124 | 0 | 900 | |
40000259 | koupe | A | July 5, 2018, 5:32 p.m. | OK | JavaScript | TESTS | 45 | 31 | 0 | 900 | |
39995119 | Kuith | A | July 5, 2018, 4:58 p.m. | OK | JavaScript | TESTS | 45 | 31 | 102400 | 900 | |
40002717 | avi2d | A | July 5, 2018, 5:56 p.m. | OK | JavaScript | TESTS | 45 | 46 | 204800 | 900 | |
39990883 | 0442A403 | A | July 5, 2018, 4:41 p.m. | OK | Kotlin | TESTS | 45 | 155 | 716800 | 900 | |
40005903 | Ruban_Denic | A | July 5, 2018, 6:30 p.m. | OK | Mono C# | TESTS | 45 | 46 | 0 | 900 | |
39997370 | mehdi.saffar | A | July 5, 2018, 5:10 p.m. | OK | Mono C# | TESTS | 45 | 61 | 0 | 900 | |
39993210 | arseniyworldprogrammer | A | July 5, 2018, 4:49 p.m. | OK | Mono C# | TESTS | 45 | 62 | 0 | 900 | |
39995376 | DMN | A | July 5, 2018, 4:59 p.m. | OK | Mono C# | TESTS | 45 | 62 | 3584000 | 900 | |
39992013 | tym32167 | A | July 5, 2018, 4:45 p.m. | OK | Mono C# | TESTS | 45 | 62 | 3584000 | 900 | |
40002770 | jeanstefanovich | A | July 5, 2018, 5:56 p.m. | OK | Mono C# | TESTS | 45 | 77 | 0 | 900 | |
39997048 | yuiop8747 | A | July 5, 2018, 5:08 p.m. | OK | MS C++ | TESTS | 45 | 30 | 0 | 900 | |
39991102 | lxn | A | July 5, 2018, 4:42 p.m. | OK | MS C++ | TESTS | 45 | 30 | 102400 | 900 | |
39994559 | -.-Ache-.- | A | July 5, 2018, 4:55 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39995943 | Sara_Melhott | A | July 5, 2018, 5:02 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39997035 | repchatuy | A | July 5, 2018, 5:08 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39994489 | Elize3000 | A | July 5, 2018, 4:55 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39995804 | R_assel | A | July 5, 2018, 5:01 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39995365 | SAUPeking | A | July 5, 2018, 4:59 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39995211 | maxi_bomb | A | July 5, 2018, 4:58 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39994903 | claus_spb | A | July 5, 2018, 4:57 p.m. | OK | MS C++ | TESTS | 45 | 31 | 0 | 900 | |
39995295 | Arcadii | A | July 5, 2018, 4:59 p.m. | OK | PascalABC.NET | TESTS | 45 | 46 | 0 | 900 | |
40001123 | nikiforovaka2 | A | July 5, 2018, 5:40 p.m. | OK | PascalABC.NET | TESTS | 45 | 46 | 0 | 900 | |
39991422 | PAG | A | July 5, 2018, 4:43 p.m. | OK | PascalABC.NET | TESTS | 45 | 46 | 0 | 900 | |
39998283 | GodFazzer | A | July 5, 2018, 5:16 p.m. | OK | PascalABC.NET | TESTS | 45 | 46 | 102400 | 900 | |
39997897 | iEatParrots | A | July 5, 2018, 5:13 p.m. | OK | PascalABC.NET | TESTS | 45 | 62 | 102400 | 900 | |
39993622 | mayakin | A | July 5, 2018, 4:51 p.m. | OK | PHP | TESTS | 45 | 31 | 0 | 900 | |
39992028 | exoji2e | A | July 5, 2018, 4:45 p.m. | OK | PyPy 2 | TESTS | 45 | 124 | 0 | 900 | |
39990817 | pavankatta | A | July 5, 2018, 4:41 p.m. | OK | PyPy 2 | TESTS | 45 | 124 | 0 | 900 | |
39990648 | sarthakmanna | A | July 5, 2018, 4:40 p.m. | OK | PyPy 2 | TESTS | 45 | 124 | 0 | 900 | |
39991077 | MathisHammel | A | July 5, 2018, 4:42 p.m. | OK | PyPy 2 | TESTS | 45 | 124 | 307200 | 900 | |
39990529 | unsuspiciouscrumpet | A | July 5, 2018, 4:39 p.m. | OK | PyPy 2 | TESTS | 45 | 139 | 0 | 900 | |
39991612 | BurntArgonPancakes | A | July 5, 2018, 4:44 p.m. | OK | PyPy 2 | TESTS | 45 | 140 | 0 | 900 | |
39990899 | Onesh0t | A | July 5, 2018, 4:41 p.m. | OK | PyPy 2 | TESTS | 45 | 155 | 307200 | 900 | |
39994940 | cpicard443 | A | July 5, 2018, 4:57 p.m. | OK | PyPy 3 | TESTS | 45 | 140 | 0 | 900 | |
39995198 | JTDV | A | July 5, 2018, 4:58 p.m. | OK | PyPy 3 | TESTS | 45 | 140 | 0 | 900 | |
39993469 | JJF | A | July 5, 2018, 4:50 p.m. | OK | PyPy 3 | TESTS | 45 | 140 | 0 | 900 | |
39990675 | Naoki_M | A | July 5, 2018, 4:40 p.m. | OK | PyPy 3 | TESTS | 45 | 140 | 0 | 900 | |
39995164 | rajatg98 | A | July 5, 2018, 4:58 p.m. | OK | PyPy 3 | TESTS | 45 | 140 | 102400 | 900 | |
40002395 | Zombarian | A | July 5, 2018, 5:52 p.m. | OK | PyPy 3 | TESTS | 45 | 155 | 0 | 900 | |
40001993 | omega_alpha | A | July 5, 2018, 5:48 p.m. | OK | PyPy 3 | TESTS | 45 | 155 | 0 | 900 | |
39997551 | organizize | A | July 5, 2018, 5:11 p.m. | OK | PyPy 3 | TESTS | 45 | 155 | 0 | 900 | |
39997289 | KHALID29 | A | July 5, 2018, 5:09 p.m. | OK | PyPy 3 | TESTS | 45 | 155 | 0 | 900 | |
39995073 | shaswat57 | A | July 5, 2018, 4:58 p.m. | OK | PyPy 3 | TESTS | 45 | 155 | 0 | 900 | |
40000604 | elistark | A | July 5, 2018, 5:35 p.m. | OK | Python 2 | TESTS | 45 | 171 | 0 | 900 | |
39999756 | blank000 | A | July 5, 2018, 5:27 p.m. | OK | Python 2 | TESTS | 45 | 171 | 0 | 900 | |
39997968 | thyannararug | A | July 5, 2018, 5:14 p.m. | OK | Python 2 | TESTS | 45 | 171 | 0 | 900 | |
39992127 | Lasers67 | A | July 5, 2018, 4:45 p.m. | OK | Python 2 | TESTS | 45 | 171 | 0 | 900 | |
40000454 | aniket11 | A | July 5, 2018, 5:34 p.m. | OK | Python 2 | TESTS | 45 | 186 | 0 | 900 | |
39996007 | kakkarotssj | A | July 5, 2018, 5:02 p.m. | OK | Python 2 | TESTS | 45 | 186 | 0 | 900 | |
39994641 | utoppia | A | July 5, 2018, 4:56 p.m. | OK | Python 2 | TESTS | 45 | 186 | 0 | 900 | |
39992803 | Uchiha_Blood | A | July 5, 2018, 4:48 p.m. | OK | Python 2 | TESTS | 45 | 186 | 0 | 900 | |
39990927 | WNG | A | July 5, 2018, 4:41 p.m. | OK | Python 2 | TESTS | 45 | 186 | 0 | 900 | |
39992887 | packwolf | A | July 5, 2018, 4:48 p.m. | OK | Python 2 | TESTS | 45 | 186 | 102400 | 900 | |
40001991 | LateNightCoder | A | July 5, 2018, 5:48 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39999838 | shanu_im | A | July 5, 2018, 5:28 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39997716 | ano_nymous | A | July 5, 2018, 5:12 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39997512 | Sanskar123 | A | July 5, 2018, 5:11 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39997426 | ayejayys | A | July 5, 2018, 5:10 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39995853 | street_magic | A | July 5, 2018, 5:01 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39995680 | Game_Face | A | July 5, 2018, 5 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39994443 | younesbmz | A | July 5, 2018, 4:55 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39993681 | shado_w | A | July 5, 2018, 4:52 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39993519 | thomasghobril | A | July 5, 2018, 4:51 p.m. | OK | Python 3 | TESTS | 45 | 109 | 0 | 900 | |
39993672 | lmx | A | July 5, 2018, 4:51 p.m. | OK | Ruby | TESTS | 45 | 62 | 0 | 900 | |
39993914 | deathcoder07 | A | July 5, 2018, 4:52 p.m. | OK | Ruby | TESTS | 45 | 77 | 102400 | 900 | |
39994688 | AnandVeeramani | A | July 5, 2018, 4:56 p.m. | OK | Ruby | TESTS | 45 | 77 | 204800 | 900 | |
39992422 | tanakh | A | July 5, 2018, 4:46 p.m. | OK | Rust | TESTS | 45 | 31 | 0 | 900 | |
39993471 | dedok19971 | A | July 5, 2018, 4:50 p.m. | OK | Scala | TESTS | 45 | 546 | 0 | 900 |
Back to search problems