Educational Codeforces Round 127 (Rated for Div. 2)

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
1671 Educational Codeforces Round 127 (Rated for Div. 2) FINISHED False 7200 81185099 April 22, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 18615 ) B Consecutive Points Segment PROGRAMMING brute force math sortings

B"You are given n points with integer coordinates on a coordinate axis OX . The coordinate of the i -th point is x_i . All points' coordinates are distinct and given in strictly increasing order. For each point i , you can do the following operation no more than once: take this point and move it by 1 to the left or to the right (i..e., you can change its coordinate x_i to x_i - 1 or to x_i + 1 ). In other words, for each point, you choose (separately) its new coordinate. For the i -th point, it can be either x_i - 1 , x_i or x_i + 1 . Your task is to determine if you can move some points as described above in such a way that the new set of points forms a consecutive segment of integers, i. xe2 x80 x89e. for some integer l the coordinates of points should be equal to l, l + 1, ldots, l + n - 1 . Note that the resulting points should have distinct coordinates. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 2 cdot 10^4 ) -- the number of test cases. Then t test cases follow. The first line of the test case contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of points in the set x . The second line of the test case contains n integers x_1 < x_2 < ldots < x_n ( 1 <= x_i <= 10^6 ), where x_i is the coordinate of the i -th point. It is guaranteed that the points are given in strictly increasing order (this also means that all coordinates are distinct). It is also guaranteed that the sum of n does not exceed 2 cdot 10^5 ( sum n <= 2 cdot 10^5 ). For each test case, print the answer -- if the set of points from the test case can be moved to form a consecutive segment of integers, print YES, otherwise print NO. "...

Tutorials

102181

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154842291 onlyoldpig B April 24, 2022, 11:22 a.m. OK Clang++17 Diagnostics TESTS 8 155 1024000
154810539 htlam B April 24, 2022, 5:19 a.m. OK Clang++17 Diagnostics TESTS 8 904 819200
154810509 htlam B April 24, 2022, 5:19 a.m. OK Clang++17 Diagnostics TESTS 8 936 819200
154810606 htlam B April 24, 2022, 5:20 a.m. OK Clang++17 Diagnostics TESTS 8 950 819200
154810575 htlam B April 24, 2022, 5:20 a.m. OK Clang++17 Diagnostics TESTS 8 951 921600
154590273 dean.menezes B April 22, 2022, 7:02 p.m. OK GNU C11 TESTS 8 46 819200
154590461 dean.menezes B April 22, 2022, 7:05 p.m. OK GNU C11 TESTS 8 46 819200
154638713 zsa.sauran B April 23, 2022, 9:17 a.m. OK GNU C11 TESTS 8 93 819200
154586987 Gold_Dragon B April 22, 2022, 6:16 p.m. OK GNU C11 TESTS 8 108 819200
154639254 vjudge3 B April 23, 2022, 9:22 a.m. OK GNU C++14 TESTS 8 15 921600
154639248 Tom66 B April 23, 2022, 9:22 a.m. OK GNU C++14 TESTS 8 15 921600
154638860 cunzai_zsy0531 B April 23, 2022, 9:19 a.m. OK GNU C++14 TESTS 8 15 3379200
154858708 win10 B April 24, 2022, 1:50 p.m. OK GNU C++14 TESTS 8 15 3481600
154832443 belsedor B April 24, 2022, 9:31 a.m. OK GNU C++14 TESTS 8 31 819200
154598795 neo.ounsopa B April 22, 2022, 9:15 p.m. OK GNU C++14 TESTS 8 46 0
154897833 Paqis B April 25, 2022, 2:24 a.m. OK GNU C++14 TESTS 8 46 819200
154866617 Vgt_Dog B April 24, 2022, 3:15 p.m. OK GNU C++14 TESTS 8 46 819200
154903185 kavania2002 B April 25, 2022, 4:30 a.m. OK GNU C++14 TESTS 8 46 819200
154904314 _Mariomaa B April 25, 2022, 4:54 a.m. OK GNU C++14 TESTS 8 46 819200
154610295 jhc_123 B April 23, 2022, 2:35 a.m. OK GNU C++17 TESTS 8 15 17612800
154637884 SamBillon B April 23, 2022, 9:08 a.m. OK GNU C++17 TESTS 8 31 819200
154647538 Agree B April 23, 2022, 10:53 a.m. OK GNU C++17 TESTS 8 31 819200
154599705 CurlyWillow B April 22, 2022, 9:33 p.m. OK GNU C++17 TESTS 8 31 1638400
154631096 crzy22 B April 23, 2022, 7:50 a.m. OK GNU C++17 TESTS 8 46 0
154620670 Ragthi B April 23, 2022, 5:51 a.m. OK GNU C++17 TESTS 8 46 0
154618131 kobeforces B April 23, 2022, 5:15 a.m. OK GNU C++17 TESTS 8 46 0
154594718 Orangutang B April 22, 2022, 8:12 p.m. OK GNU C++17 TESTS 8 46 0
154823971 bbbbbbiscuit B April 24, 2022, 7:59 a.m. OK GNU C++17 TESTS 8 46 0
154640129 ishrak26 B April 23, 2022, 9:31 a.m. OK GNU C++17 TESTS 8 46 0
154621744 hara_1999 B April 23, 2022, 6:04 a.m. OK GNU C++17 (64) TESTS 8 30 819200
154609433 patcht B April 23, 2022, 2:15 a.m. OK GNU C++17 (64) TESTS 8 30 1638400
154666916 _Yeager_ B April 23, 2022, 12:50 p.m. OK GNU C++17 (64) TESTS 8 31 819200
154905742 Owmicron B April 25, 2022, 5:22 a.m. OK GNU C++17 (64) TESTS 8 31 819200
154883376 SoluckyBhavya9 B April 24, 2022, 6:53 p.m. OK GNU C++17 (64) TESTS 8 31 819200
154855681 Utsav-Ladani B April 24, 2022, 1:21 p.m. OK GNU C++17 (64) TESTS 8 31 819200
154827556 Lascym0331 B April 24, 2022, 8:39 a.m. OK GNU C++17 (64) TESTS 8 31 819200
154790135 Tr_Tuhin B April 23, 2022, 9:11 p.m. OK GNU C++17 (64) TESTS 8 31 819200
154779345 JustAmethyst B April 23, 2022, 6:23 p.m. OK GNU C++17 (64) TESTS 8 31 819200
154691430 ChairmanFMao B April 23, 2022, 1:33 p.m. OK GNU C++17 (64) TESTS 8 31 819200
154594712 ZADaCHI B April 22, 2022, 8:12 p.m. OK GNU C++20 (64) TESTS 8 15 819200
154593688 Hummus_ B April 22, 2022, 7:55 p.m. OK GNU C++20 (64) TESTS 8 15 819200
154597885 sakib.safwan B April 22, 2022, 8:59 p.m. OK GNU C++20 (64) TESTS 8 15 819200
154605343 JackVu B April 23, 2022, 12:22 a.m. OK GNU C++20 (64) TESTS 8 15 819200
154617982 cychien B April 23, 2022, 5:13 a.m. OK GNU C++20 (64) TESTS 8 15 819200
154879886 -Elliot- B April 24, 2022, 5:57 p.m. OK GNU C++20 (64) TESTS 8 15 1638400
154773076 Saytara B April 23, 2022, 5:19 p.m. OK GNU C++20 (64) TESTS 8 15 3993600
154647059 niteshkumart.cs19 B April 23, 2022, 10:48 a.m. OK GNU C++20 (64) TESTS 8 15 5836800
154856603 ooo3yyy B April 24, 2022, 1:30 p.m. OK GNU C++20 (64) TESTS 8 30 819200
154661589 Restarted_lghhh B April 23, 2022, 12:42 p.m. OK GNU C++20 (64) TESTS 8 30 819200
154825417 mejiamejia B April 24, 2022, 8:16 a.m. OK Go TESTS 8 109 2355200
154621439 0x3F B April 23, 2022, 6 a.m. OK Go TESTS 8 124 2355200
154826064 mejiamejia B April 24, 2022, 8:23 a.m. OK Go TESTS 8 171 2355200
154605400 elek34ka B April 23, 2022, 12:24 a.m. OK Go TESTS 8 187 3174400
154584436 TomazGomes B April 22, 2022, 5:45 p.m. OK Haskell TESTS 8 888 75673600
154623521 sf14t B April 23, 2022, 6:23 a.m. OK Java 11 TESTS 8 186 0
154633568 swarup_312 B April 23, 2022, 8:21 a.m. OK Java 11 TESTS 8 187 0
154628217 KarMa_ B April 23, 2022, 7:14 a.m. OK Java 11 TESTS 8 187 0
154624661 gaju321 B April 23, 2022, 6:36 a.m. OK Java 11 TESTS 8 187 0
154642776 UnfinishedSentenc B April 23, 2022, 10 a.m. OK Java 11 TESTS 8 187 0
154777621 suhas5979 B April 23, 2022, 6:03 p.m. OK Java 11 TESTS 8 202 0
154897444 190020009 B April 25, 2022, 2:13 a.m. OK Java 11 TESTS 8 202 0
154682090 Sandy_coder2001 B April 23, 2022, 1:14 p.m. OK Java 11 TESTS 8 202 0
154655172 shivakumar.nannan B April 23, 2022, 12:21 p.m. OK Java 11 TESTS 8 202 0
154629042 akashkumarkly B April 23, 2022, 7:24 a.m. OK Java 11 TESTS 8 202 0
154602584 Diaa12360 B April 22, 2022, 10:48 p.m. OK Java 8 TESTS 8 124 1843200
154890468 Koka B April 24, 2022, 9:06 p.m. OK Java 8 TESTS 8 124 2867200
154628010 ssingh0271 B April 23, 2022, 7:12 a.m. OK Java 8 TESTS 8 124 20992000
154632280 ssingh0271 B April 23, 2022, 8:04 a.m. OK Java 8 TESTS 8 124 20992000
154588459 ibrahim.soltan918 B April 22, 2022, 6:35 p.m. OK Java 8 TESTS 8 139 0
154824554 gagan_6730 B April 24, 2022, 8:06 a.m. OK Java 8 TESTS 8 139 1843200
154836310 spiderwebs B April 24, 2022, 10:16 a.m. OK Java 8 TESTS 8 140 0
154870538 Shemo B April 24, 2022, 3:53 p.m. OK Java 8 TESTS 8 140 1843200
154624053 ved20 B April 23, 2022, 6:29 a.m. OK Java 8 TESTS 8 155 1843200
154682091 Mrbadguy10 B April 23, 2022, 1:14 p.m. OK Java 8 TESTS 8 249 0
154857749 linxiaotian B April 24, 2022, 1:42 p.m. OK Kotlin 1.4 TESTS 8 202 6348800
154618325 darkl0rd B April 23, 2022, 5:17 a.m. OK Kotlin 1.5 TESTS 8 311 16179200
154644658 Mbt925 B April 23, 2022, 10:22 a.m. OK Kotlin 1.6 TESTS 8 467 15872000
154697724 Bloodwyn B April 23, 2022, 2:10 p.m. OK Kotlin 1.6 TESTS 8 483 14950400
154602523 cfcfs B April 22, 2022, 10:46 p.m. OK Kotlin 1.6 TESTS 8 483 16179200
154818620 XQB B April 24, 2022, 7:03 a.m. OK MS C++ 2017 TESTS 8 46 819200
154615749 Killer_No.47 B April 23, 2022, 4:35 a.m. OK MS C++ 2017 TESTS 8 62 819200
154817758 Fish_L B April 24, 2022, 6:53 a.m. OK MS C++ 2017 TESTS 8 124 0
154808807 emailam B April 24, 2022, 4:55 a.m. OK MS C++ 2017 TESTS 8 124 819200
154587354 De_nis B April 22, 2022, 6:21 p.m. OK MS C++ 2017 TESTS 8 140 0
154873848 Tangerine B April 24, 2022, 4:26 p.m. OK MS C++ 2017 TESTS 8 140 1638400
154606071 huangjuanjuan B April 23, 2022, 12:46 a.m. OK MS C++ 2017 TESTS 8 140 7987200
154606767 CtrlACtrlV B April 23, 2022, 1:06 a.m. OK MS C++ 2017 TESTS 8 171 100249600
154639100 arthur_p B April 23, 2022, 9:21 a.m. OK MS C++ 2017 TESTS 8 186 0
154585747 Anonymous0617 B April 22, 2022, 6:01 p.m. OK MS C++ 2017 TESTS 8 186 1024000
154640826 Liswiera B April 23, 2022, 9:39 a.m. OK .NET Core C# TESTS 8 155 15155200
154611588 chrisfcoder B April 23, 2022, 3:06 a.m. OK .NET Core C# TESTS 8 156 15155200
154638786 chinesedfan B April 23, 2022, 9:18 a.m. OK Node.js TESTS 8 109 14336000
154583923 1_2_3_4_5_9 B April 22, 2022, 5:38 p.m. OK PyPy 2 TESTS 8 187 15564800
154614756 grininja B April 23, 2022, 4:15 a.m. OK PyPy 3 TESTS 8 140 15155200
154621347 Adolf988 B April 23, 2022, 5:59 a.m. OK PyPy 3 TESTS 8 202 16691200
154583729 kals B April 22, 2022, 5:36 p.m. OK PyPy 3 TESTS 8 342 16384000
154647833 Ayushman_123 B April 23, 2022, 10:57 a.m. OK PyPy 3 TESTS 8 390 26009600
154846995 Eunice01 B April 24, 2022, 11:59 a.m. OK PyPy 3 TESTS 8 561 16076800
154749687 itachi2000 B April 23, 2022, 3:46 p.m. OK PyPy 3 TESTS 8 592 16281600
154899649 Kaboom_sk B April 25, 2022, 3:09 a.m. OK PyPy 3 TESTS 8 592 16691200
154622735 vulpine B April 23, 2022, 6:15 a.m. OK PyPy 3 TESTS 8 624 16691200
154598322 Bad_day_toCode B April 22, 2022, 9:07 p.m. OK PyPy 3 TESTS 8 624 34816000
154649619 Anti-Neutrino B April 23, 2022, 11:17 a.m. OK PyPy 3 TESTS 8 638 16076800
154640575 sakshatmali B April 23, 2022, 9:36 a.m. OK PyPy 3-64 TESTS 8 156 28160000
154623867 rivnam B April 23, 2022, 6:27 a.m. OK PyPy 3-64 TESTS 8 171 22732800
154586169 nitish420 B April 22, 2022, 6:06 p.m. OK PyPy 3-64 TESTS 8 186 23961600
154790819 notTehlka B April 23, 2022, 9:24 p.m. OK PyPy 3-64 TESTS 8 187 28569600
154630230 ganesh_singh B April 23, 2022, 7:39 a.m. OK PyPy 3-64 TESTS 8 218 24883200
154614759 rahin1301 B April 23, 2022, 4:15 a.m. OK PyPy 3-64 TESTS 8 233 27340800
154617199 MistaAsh B April 23, 2022, 5 a.m. OK PyPy 3-64 TESTS 8 234 24985600
154853365 _vjudge8 B April 24, 2022, 12:58 p.m. OK PyPy 3-64 TESTS 8 248 25600000
154791176 deca_gon B April 23, 2022, 9:31 p.m. OK PyPy 3-64 TESTS 8 248 25600000
154598335 Skillful_Wanderer B April 22, 2022, 9:07 p.m. OK PyPy 3-64 TESTS 8 249 24780800
154639960 Haruka39 B April 23, 2022, 9:29 a.m. OK Python 3 TESTS 8 124 10752000
154602995 eugalt B April 22, 2022, 11 p.m. OK Python 3 TESTS 8 124 15462400
154800961 Cupro B April 24, 2022, 2:03 a.m. OK Python 3 TESTS 8 186 13926400
154881995 me4me B April 24, 2022, 6:30 p.m. OK Python 3 TESTS 8 234 13926400
154834135 Crimson_lvy B April 24, 2022, 9:50 a.m. OK Python 3 TESTS 8 248 13926400
154861531 Aleiva B April 24, 2022, 2:18 p.m. OK Python 3 TESTS 8 248 13926400
154816044 Dedi0317 B April 24, 2022, 6:31 a.m. OK Python 3 TESTS 8 248 13926400
154807181 kalyanrammunagala B April 24, 2022, 4:21 a.m. OK Python 3 TESTS 8 248 13926400
154642117 Muhammad.Daniyal B April 23, 2022, 9:52 a.m. OK Python 3 TESTS 8 248 13926400
154814549 Jv103 B April 24, 2022, 6:13 a.m. OK Python 3 TESTS 8 249 13516800
154661715 utkarsh B April 23, 2022, 12:44 p.m. OK Ruby 3 TESTS 8 374 17100800
154619742 toomer B April 23, 2022, 5:38 a.m. OK Rust 2021 TESTS 8 15 4812800

remove filters

Back to search problems