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 |
---|---|---|---|---|---|---|
1185 | Codeforces Round 568 (Div. 2) | FINISHED | False | 8100 | 170867699 | June 19, 2019, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 6745 ) | D | Extra Element | PROGRAMMING | implementation math | 1700 |
B"A sequence a_1, a_2, ... , a_k is called an arithmetic progression if for each i from 1 to k elements satisfy the condition a_i = a_1 + c cdot (i - 1) for some fixed c . For example, these five sequences are arithmetic progressions: [5, 7, 9, 11] , [101] , [101, 100, 99] , [13, 97] and [5, 5, 5, 5, 5] . And these four sequences aren't arithmetic progressions: [3, 1, 2] , [1, 2, 4, 8] , [1, -1, 1, -1] and [1, 2, 3, 3, 3] . You are given a sequence of integers b_1, b_2, ... , b_n . Find any index j ( 1 <= j <= n ), such that if you delete b_j from the sequence, you can reorder the remaining n-1 elements, so that you will get an arithmetic progression. If there is no such index, output the number -1. The first line of the input contains one integer n ( 2 <= n <= 2 cdot10^5 ) -- length of the sequence b . The second line contains n integers b_1, b_2, ... , b_n ( -10^9 <= b_i <= 10^9 ) -- elements of the sequence b . Print such index j ( 1 <= j <= n ), so that if you delete the j -th element from the sequence, you can reorder the remaining elements, so that you will get an arithmetic progression. If there are multiple solutions, you are allowed to print any of them. If there is no such index, print -1. Note to the first example. If you delete the 4 -th element, you can get the arithmetic progression [2, 4, 6, 8] . Note to the second example. The original sequence is already arithmetic progression, so you can delete 1 -st or last element and you will get an arithmetical progression again. "... |
Editorial for Codeforces Round #568 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
61440106 | El_MaraVilla | D | Sept. 28, 2019, 6:21 p.m. | OK | Clang++17 Diagnostics | TESTS | 52 | 1809 | 21196800 | 1700 | |
55994831 | bin9638 | D | June 24, 2019, 9:45 a.m. | OK | FPC | TESTS | 49 | 93 | 1638400 | 1700 | |
55988224 | ninety9 | D | June 24, 2019, 5:56 a.m. | OK | GNU C11 | TESTS | 49 | 78 | 1638400 | 1700 | |
57631796 | sansen | D | July 24, 2019, 9 a.m. | OK | GNU C11 | TESTS | 52 | 78 | 3174400 | 1700 | |
56410580 | alex873 | D | July 1, 2019, 11:19 p.m. | OK | GNU C11 | TESTS | 52 | 93 | 1638400 | 1700 | |
55862303 | jschr | D | June 21, 2019, 10:13 a.m. | OK | GNU C11 | TESTS | 49 | 93 | 1638400 | 1700 | |
56212867 | saspi | D | June 28, 2019, 9:33 a.m. | OK | GNU C11 | TESTS | 52 | 93 | 4812800 | 1700 | |
56184581 | PIKA0102 | D | June 28, 2019, 3:33 a.m. | OK | GNU C11 | TESTS | 52 | 93 | 4812800 | 1700 | |
55844837 | dpritam | D | June 20, 2019, 8:27 p.m. | OK | GNU C11 | TESTS | 49 | 93 | 4812800 | 1700 | |
55910623 | xcxxcx | D | June 22, 2019, 1:35 a.m. | OK | GNU C++11 | TESTS | 49 | 46 | 1433600 | 1700 | |
55910638 | luogu_bot2 | D | June 22, 2019, 1:36 a.m. | OK | GNU C++11 | TESTS | 49 | 46 | 1433600 | 1700 | |
55849989 | lovewz | D | June 21, 2019, 2:44 a.m. | OK | GNU C++11 | TESTS | 49 | 46 | 1638400 | 1700 | |
64521502 | KaiserYang | D | Nov. 8, 2019, 12:29 p.m. | OK | GNU C++11 | TESTS | 52 | 46 | 1638400 | 1700 | |
55860665 | disangan233 | D | June 21, 2019, 9:24 a.m. | OK | GNU C++11 | TESTS | 49 | 46 | 1638400 | 1700 | |
55917556 | msuwakow | D | June 22, 2019, 6:09 a.m. | OK | GNU C++11 | TESTS | 49 | 46 | 1740800 | 1700 | |
56462765 | chenyewei_1234 | D | July 3, 2019, 7:35 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 2252800 | 1700 | |
56646706 | Scentsun | D | July 7, 2019, 7 a.m. | OK | GNU C++11 | TESTS | 52 | 46 | 2457600 | 1700 | |
56034571 | lukelin | D | June 25, 2019, 11:26 a.m. | OK | GNU C++11 | TESTS | 49 | 46 | 3072000 | 1700 | |
55831578 | CTP_314 | D | June 20, 2019, 1:24 p.m. | OK | GNU C++11 | TESTS | 49 | 46 | 3072000 | 1700 | |
63487919 | wjyyy | D | Oct. 26, 2019, 1:55 p.m. | OK | GNU C++14 | TESTS | 52 | 46 | 3686400 | 1700 | |
56402157 | vladimir_122 | D | July 1, 2019, 5:23 p.m. | OK | GNU C++14 | TESTS | 52 | 46 | 4096000 | 1700 | |
56187947 | tokitsukaze | D | June 28, 2019, 6:03 a.m. | OK | GNU C++14 | TESTS | 52 | 62 | 3072000 | 1700 | |
56404371 | vladimir_122 | D | July 1, 2019, 6:32 p.m. | OK | GNU C++14 | TESTS | 52 | 62 | 4096000 | 1700 | |
55860952 | bidirectionalprograming | D | June 21, 2019, 9:32 a.m. | OK | GNU C++14 | TESTS | 49 | 77 | 1638400 | 1700 | |
55867939 | Caiogoia | D | June 21, 2019, 1:09 p.m. | OK | GNU C++14 | TESTS | 49 | 77 | 1638400 | 1700 | |
60848266 | lgzus123 | D | Sept. 19, 2019, 1:14 p.m. | OK | GNU C++14 | TESTS | 52 | 77 | 2457600 | 1700 | |
55857430 | TheRedLegend | D | June 21, 2019, 7:43 a.m. | OK | GNU C++14 | TESTS | 49 | 77 | 3993600 | 1700 | |
62394347 | HideoSatou | D | Oct. 12, 2019, 4:39 a.m. | OK | GNU C++14 | TESTS | 52 | 78 | 1638400 | 1700 | |
69521722 | vjudge3 | D | Jan. 25, 2020, 1:38 p.m. | OK | GNU C++14 | TESTS | 52 | 78 | 1638400 | 1700 | |
57556454 | lesskreker | D | July 22, 2019, 8:04 p.m. | OK | GNU C++17 | TESTS | 52 | 46 | 3276800 | 1700 | |
55947853 | RCG | D | June 22, 2019, 9:24 p.m. | OK | GNU C++17 | TESTS | 49 | 62 | 1536000 | 1700 | |
55812526 | hogeover30 | D | June 20, 2019, 4:43 a.m. | OK | GNU C++17 | TESTS | 49 | 62 | 1638400 | 1700 | |
56819144 | pmitkov | D | July 10, 2019, 9:39 p.m. | OK | GNU C++17 | TESTS | 52 | 62 | 1638400 | 1700 | |
56730782 | hansc3380 | D | July 9, 2019, 1:07 a.m. | OK | GNU C++17 | TESTS | 52 | 62 | 2355200 | 1700 | |
55808549 | goat18_310 | D | June 20, 2019, 1:38 a.m. | OK | GNU C++17 | TESTS | 49 | 62 | 7168000 | 1700 | |
55859182 | Lancern | D | June 21, 2019, 8:39 a.m. | OK | GNU C++17 | TESTS | 49 | 77 | 1536000 | 1700 | |
57184410 | zpr | D | July 17, 2019, 8:15 a.m. | OK | GNU C++17 | TESTS | 52 | 77 | 2355200 | 1700 | |
58204546 | MalLee0403 | D | Aug. 3, 2019, 6:21 a.m. | OK | GNU C++17 | TESTS | 52 | 78 | 1638400 | 1700 | |
69521090 | yaoyaoling | D | Jan. 25, 2020, 1:28 p.m. | OK | GNU C++17 | TESTS | 52 | 78 | 1638400 | 1700 | |
55873130 | filthycasual | D | June 21, 2019, 3:58 p.m. | OK | Go | TESTS | 49 | 249 | 4505600 | 1700 | |
67451164 | CodAR | D | Dec. 23, 2019, 4:20 a.m. | OK | Java 11 | TESTS | 52 | 545 | 0 | 1700 | |
55963109 | saptarshim | D | June 23, 2019, 10:35 a.m. | OK | Java 8 | TESTS | 49 | 140 | 0 | 1700 | |
60090325 | Ad-007 | D | Sept. 5, 2019, 2:54 p.m. | OK | Java 8 | TESTS | 52 | 155 | 0 | 1700 | |
55812375 | mTvTm | D | June 20, 2019, 4:36 a.m. | OK | Java 8 | TESTS | 49 | 171 | 0 | 1700 | |
56443364 | spar5h | D | July 2, 2019, 5:34 p.m. | OK | Java 8 | TESTS | 52 | 186 | 0 | 1700 | |
55840781 | MubtasimShahriar | D | June 20, 2019, 5:52 p.m. | OK | Java 8 | TESTS | 49 | 187 | 15360000 | 1700 | |
55840737 | MubtasimShahriar | D | June 20, 2019, 5:51 p.m. | OK | Java 8 | TESTS | 49 | 187 | 15360000 | 1700 | |
63562624 | Vishal_dhanani | D | Oct. 27, 2019, 2:45 p.m. | OK | Java 8 | TESTS | 52 | 202 | 0 | 1700 | |
55845755 | beroul | D | June 20, 2019, 9:13 p.m. | OK | Java 8 | TESTS | 49 | 202 | 0 | 1700 | |
55821607 | rahsutamrev | D | June 20, 2019, 8:50 a.m. | OK | Java 8 | TESTS | 49 | 202 | 0 | 1700 | |
55814325 | gaidash | D | June 20, 2019, 5:42 a.m. | OK | Java 8 | TESTS | 49 | 202 | 0 | 1700 | |
59836885 | Spheniscine | D | Sept. 1, 2019, 4:51 a.m. | OK | Kotlin | TESTS | 52 | 404 | 31846400 | 1700 | |
59817644 | Spheniscine | D | Aug. 31, 2019, 3:59 p.m. | OK | Kotlin | TESTS | 52 | 514 | 17715200 | 1700 | |
59817059 | Spheniscine | D | Aug. 31, 2019, 3:45 p.m. | OK | Kotlin | TESTS | 52 | 514 | 17715200 | 1700 | |
59817494 | Spheniscine | D | Aug. 31, 2019, 3:56 p.m. | OK | Kotlin | TESTS | 52 | 545 | 17715200 | 1700 | |
55920332 | max_kibble | D | June 22, 2019, 7:11 a.m. | OK | Kotlin | TESTS | 49 | 888 | 50073600 | 1700 | |
55840697 | og.kostya | D | June 20, 2019, 5:50 p.m. | OK | Mono C# | TESTS | 49 | 78 | 2355200 | 1700 | |
58976896 | scorpiowf | D | Aug. 18, 2019, 1:36 a.m. | OK | MS C++ | TESTS | 52 | 62 | 1638400 | 1700 | |
56395197 | S.K | D | July 1, 2019, 2:17 p.m. | OK | MS C++ | TESTS | 52 | 62 | 2457600 | 1700 | |
58531190 | vjudge3 | D | Aug. 10, 2019, 9:36 a.m. | OK | MS C++ | TESTS | 52 | 77 | 1638400 | 1700 | |
61701886 | vjudge5 | D | Oct. 2, 2019, 8:49 a.m. | OK | MS C++ | TESTS | 52 | 77 | 1638400 | 1700 | |
61550630 | vjudge2 | D | Sept. 30, 2019, 12:19 p.m. | OK | MS C++ | TESTS | 52 | 77 | 2457600 | 1700 | |
55808412 | UoU | D | June 20, 2019, 1:31 a.m. | OK | MS C++ | TESTS | 49 | 78 | 1638400 | 1700 | |
61347087 | vjudge3 | D | Sept. 27, 2019, 5:46 a.m. | OK | MS C++ | TESTS | 52 | 93 | 1638400 | 1700 | |
56511326 | vjudge2 | D | July 4, 2019, 10:33 a.m. | OK | MS C++ | TESTS | 52 | 93 | 1638400 | 1700 | |
69502272 | vjudge4 | D | Jan. 25, 2020, 7:03 a.m. | OK | MS C++ | TESTS | 52 | 139 | 2867200 | 1700 | |
58528468 | vjudge1 | D | Aug. 10, 2019, 8:19 a.m. | OK | MS C++ | TESTS | 52 | 202 | 1638400 | 1700 | |
55806425 | j2v | D | June 19, 2019, 10:58 p.m. | OK | MS C++ 2017 | TESTS | 49 | 93 | 6451200 | 1700 | |
60663772 | pichulia | D | Sept. 16, 2019, 6:44 a.m. | OK | MS C++ 2017 | TESTS | 52 | 93 | 7987200 | 1700 | |
61550251 | 2018030401051 | D | Sept. 30, 2019, 12:11 p.m. | OK | MS C++ 2017 | TESTS | 52 | 108 | 2457600 | 1700 | |
55848761 | F91WoDaGe | D | June 21, 2019, 1:21 a.m. | OK | MS C++ 2017 | TESTS | 49 | 108 | 7987200 | 1700 | |
56511302 | LowbieH | D | July 4, 2019, 10:32 a.m. | OK | MS C++ 2017 | TESTS | 52 | 109 | 1638400 | 1700 | |
56529794 | petko_mitkov | D | July 4, 2019, 7:01 p.m. | OK | MS C++ 2017 | TESTS | 52 | 109 | 3379200 | 1700 | |
58571982 | 2018qwer | D | Aug. 11, 2019, 10:38 a.m. | OK | MS C++ 2017 | TESTS | 52 | 109 | 5222400 | 1700 | |
55862911 | F91WoDaGe | D | June 21, 2019, 10:32 a.m. | OK | MS C++ 2017 | TESTS | 49 | 109 | 7987200 | 1700 | |
55848709 | F91WoDaGe | D | June 21, 2019, 1:19 a.m. | OK | MS C++ 2017 | TESTS | 49 | 109 | 7987200 | 1700 | |
55834509 | F91WoDaGe | D | June 20, 2019, 2:41 p.m. | OK | MS C++ 2017 | TESTS | 49 | 139 | 1638400 | 1700 | |
59378094 | Amr_elmowaled | D | Aug. 24, 2019, 12:14 a.m. | OK | PyPy 2 | TESTS | 52 | 187 | 12492800 | 1700 | |
55923188 | bcollet | D | June 22, 2019, 8:16 a.m. | OK | PyPy 2 | TESTS | 49 | 202 | 14336000 | 1700 | |
55809501 | yumtam | D | June 20, 2019, 2:34 a.m. | OK | PyPy 2 | TESTS | 49 | 202 | 16076800 | 1700 | |
59378132 | Amr_elmowaled | D | Aug. 24, 2019, 12:18 a.m. | OK | PyPy 2 | TESTS | 52 | 217 | 12492800 | 1700 | |
58527784 | _MIT | D | Aug. 10, 2019, 8 a.m. | OK | PyPy 2 | TESTS | 52 | 217 | 18534400 | 1700 | |
58527836 | vjudge5 | D | Aug. 10, 2019, 8:01 a.m. | OK | PyPy 2 | TESTS | 52 | 233 | 18534400 | 1700 | |
58560169 | vjudge3 | D | Aug. 11, 2019, 5:18 a.m. | OK | PyPy 2 | TESTS | 52 | 248 | 18432000 | 1700 | |
58560135 | MVP | D | Aug. 11, 2019, 5:17 a.m. | OK | PyPy 2 | TESTS | 52 | 248 | 18432000 | 1700 | |
56183123 | ronak66 | D | June 28, 2019, 2:09 a.m. | OK | PyPy 2 | TESTS | 52 | 295 | 15360000 | 1700 | |
55812287 | arman.t | D | June 20, 2019, 4:33 a.m. | OK | PyPy 2 | TESTS | 49 | 483 | 29798400 | 1700 | |
55828169 | praveen.123 | D | June 20, 2019, 11:53 a.m. | OK | PyPy 3 | TESTS | 49 | 389 | 21196800 | 1700 | |
56265147 | grhkm | D | June 29, 2019, 9:32 a.m. | OK | PyPy 3 | TESTS | 52 | 389 | 21299200 | 1700 | |
56135646 | shyman | D | June 26, 2019, 9:42 p.m. | OK | PyPy 3 | TESTS | 49 | 389 | 21299200 | 1700 | |
55933396 | Nipun_iiitd | D | June 22, 2019, 12:39 p.m. | OK | PyPy 3 | TESTS | 49 | 390 | 21196800 | 1700 | |
57461082 | SirULG | D | July 21, 2019, 1:40 p.m. | OK | PyPy 3 | TESTS | 52 | 390 | 21299200 | 1700 | |
69851685 | roaris | D | Jan. 30, 2020, 3:49 p.m. | OK | PyPy 3 | TESTS | 52 | 404 | 25190400 | 1700 | |
60771910 | AvinashKartik | D | Sept. 18, 2019, 1:01 p.m. | OK | PyPy 3 | TESTS | 52 | 405 | 16998400 | 1700 | |
56288136 | V4V | D | June 29, 2019, 9:16 p.m. | OK | PyPy 3 | TESTS | 52 | 405 | 17715200 | 1700 | |
55806743 | Mad_Andrei | D | June 19, 2019, 11:24 p.m. | OK | PyPy 3 | TESTS | 49 | 405 | 19660800 | 1700 | |
69912212 | polingram | D | Jan. 31, 2020, 3:42 p.m. | OK | PyPy 3 | TESTS | 52 | 405 | 19763200 | 1700 | |
57552950 | Helli.code | D | July 22, 2019, 6:18 p.m. | OK | Python 2 | TESTS | 52 | 655 | 24064000 | 1700 | |
68610486 | soumyasarkar1998 | D | Jan. 11, 2020, 3:31 p.m. | OK | Python 2 | TESTS | 52 | 873 | 22016000 | 1700 | |
56223739 | codershuvo | D | June 28, 2019, 10:57 a.m. | OK | Python 3 | TESTS | 52 | 404 | 17203200 | 1700 | |
55838210 | whirlpool27 | D | June 20, 2019, 4:31 p.m. | OK | Python 3 | TESTS | 49 | 468 | 18022400 | 1700 | |
55836845 | III_Wolverine_III | D | June 20, 2019, 3:47 p.m. | OK | Python 3 | TESTS | 49 | 483 | 18739200 | 1700 | |
55821468 | 3x7 | D | June 20, 2019, 8:46 a.m. | OK | Python 3 | TESTS | 49 | 498 | 18124800 | 1700 | |
56154748 | brosucks | D | June 27, 2019, 9:41 a.m. | OK | Python 3 | TESTS | 49 | 498 | 19353600 | 1700 | |
56024643 | kingofprank | D | June 25, 2019, 6:17 a.m. | OK | Python 3 | TESTS | 49 | 498 | 29798400 | 1700 | |
61887071 | wattaihei | D | Oct. 5, 2019, 4:06 a.m. | OK | Python 3 | TESTS | 52 | 514 | 36761600 | 1700 | |
57287715 | youness.amhaouch | D | July 18, 2019, 3:18 p.m. | OK | Python 3 | TESTS | 52 | 529 | 26624000 | 1700 | |
55844203 | superstickhuman0 | D | June 20, 2019, 8 p.m. | OK | Python 3 | TESTS | 49 | 530 | 17510400 | 1700 | |
56066412 | Annvv | D | June 26, 2019, 8:10 a.m. | OK | Python 3 | TESTS | 49 | 530 | 19763200 | 1700 | |
56127346 | zimpha | D | June 26, 2019, 5:25 p.m. | OK | Rust | TESTS | 49 | 78 | 10649600 | 1700 |
Back to search problems