Codeforces Round 775 (Div. 2, based on Moscow Open Olympiad in Informatics)

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
1649 Codeforces Round 775 (Div. 2, based on Moscow Open Olympiad in Informatics) FINISHED False 8100 90705863 March 6, 2022, 9:55 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 15655 ) A Game PROGRAMMING implementation

B'You are playing a very popular computer game. The next level consists of n consecutive locations, numbered from 1 to n , each of them containing either land or water. It is known that the first and last locations contain land, and for completing the level you have to move from the first location to the last. Also, if you become inside a location with water, you will die, so you can only move between locations with land. You can jump between adjacent locations for free, as well as no more than once jump from any location with land i to any location with land i + x , spending x coins ( x geq 0 ). Your task is to spend the minimum possible number of coins to move from the first location to the last one. Note that this is always possible since both the first and last locations are the land locations. There are several test cases in the input data. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. This is followed by the test cases description. The first line of each test case contains one integer n ( 2 <= q n <= q 100 ) -- the number of locations. The second line of the test case contains a sequence of integers a_1, a_2, ldots, a_n ( 0 <= q a_i <= q 1 ), where a_i = 1 means that the i -th location is the location with land, and a_i = 0 means that the i -th location is the location with water. It is guaranteed that a_1 = 1 and a_n = 1 . For each test case print a single integer -- the answer to the problem. In the first test case, it is enough to make one free jump from the first location to the second one, which is also the last one, so the answer is 0 . In the second test case, the only way to move from the first location to the last one is to jump between them, which will cost 4 coins. In the third test case, you can jump from the first location to the third for 2 coins, and then jump to the'...

Tutorials

Codeforces Round #775 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
148639607 NenadDapic A March 6, 2022, 7:11 p.m. OK FPC TESTS 9 15 0
148614201 Pawan_Lahoti A March 6, 2022, 2:02 p.m. OK GNU C11 TESTS 9 15 0
148615137 hnust_luhuan A March 6, 2022, 2:11 p.m. OK GNU C11 TESTS 9 15 0
148615236 rainboy A March 6, 2022, 2:12 p.m. OK GNU C11 TESTS 9 15 0
148615673 ZK777 A March 6, 2022, 2:16 p.m. OK GNU C11 TESTS 9 15 0
148613122 Khoka420 A March 6, 2022, 1:53 p.m. OK GNU C11 TESTS 9 15 0
148628192 nis_c_hat A March 6, 2022, 4:35 p.m. OK GNU C11 TESTS 9 15 0
148630561 Hk_Aj A March 6, 2022, 5:06 p.m. OK GNU C11 TESTS 9 15 0
148630684 HARI_AJ A March 6, 2022, 5:08 p.m. OK GNU C11 TESTS 9 15 0
148637950 MallaSailesh A March 6, 2022, 6:46 p.m. OK GNU C11 TESTS 9 15 0
148616546 hao.233 A March 6, 2022, 2:25 p.m. OK GNU C11 TESTS 9 15 0
148614728 Speechless_ A March 6, 2022, 2:07 p.m. OK GNU C++14 TESTS 9 0 0
148663633 coder_lin A March 7, 2022, 5:36 a.m. OK GNU C++14 TESTS 9 0 0
148657965 wlkx A March 7, 2022, 3:38 a.m. OK GNU C++14 TESTS 9 0 0
148636569 oursaco A March 6, 2022, 6:27 p.m. OK GNU C++14 TESTS 9 0 0
148634185 nitiman A March 6, 2022, 5:55 p.m. OK GNU C++14 TESTS 9 0 0
148630677 prasann7676 A March 6, 2022, 5:08 p.m. OK GNU C++14 TESTS 9 0 0
148630650 Yondaime A March 6, 2022, 5:07 p.m. OK GNU C++14 TESTS 9 0 0
148619296 Sanchit_S1 A March 6, 2022, 2:52 p.m. OK GNU C++14 TESTS 9 0 0
148619258 2_3_3 A March 6, 2022, 2:51 p.m. OK GNU C++14 TESTS 9 0 0
148616765 EileenQ A March 6, 2022, 2:27 p.m. OK GNU C++14 TESTS 9 0 0
148639246 srimadhan11 A March 6, 2022, 7:06 p.m. OK GNU C++17 TESTS 9 0 0
148643632 xharshvardhan A March 6, 2022, 8:18 p.m. OK GNU C++17 TESTS 9 0 0
148638138 devanshu-08 A March 6, 2022, 6:49 p.m. OK GNU C++17 TESTS 9 0 0
148648732 Mahmoud_Qassem A March 6, 2022, 10:20 p.m. OK GNU C++17 TESTS 9 0 0
148653260 LBJHan A March 7, 2022, 1:19 a.m. OK GNU C++17 TESTS 9 0 0
148658494 __jarvis A March 7, 2022, 3:51 a.m. OK GNU C++17 TESTS 9 0 0
148638877 jahid_hridoy A March 6, 2022, 7 p.m. OK GNU C++17 TESTS 9 0 0
148659234 mohammadsalahaqabag A March 7, 2022, 4:08 a.m. OK GNU C++17 TESTS 9 0 0
148661380 dracarysrsa A March 7, 2022, 4:56 a.m. OK GNU C++17 TESTS 9 0 0
148661417 Dracarys_rsa A March 7, 2022, 4:57 a.m. OK GNU C++17 TESTS 9 0 0
148644439 _03vaiii A March 6, 2022, 8:34 p.m. OK GNU C++17 (64) TESTS 9 0 0
148636025 inksamurai A March 6, 2022, 6:20 p.m. OK GNU C++17 (64) TESTS 9 0 0
148628206 Aadarsh_negi A March 6, 2022, 4:35 p.m. OK GNU C++17 (64) TESTS 9 0 0
148627764 fxhd A March 6, 2022, 4:30 p.m. OK GNU C++17 (64) TESTS 9 0 0
148662270 zefyrus A March 7, 2022, 5:13 a.m. OK GNU C++17 (64) TESTS 9 0 0
148660921 archived_spark A March 7, 2022, 4:47 a.m. OK GNU C++17 (64) TESTS 9 0 0
148660895 yooy A March 7, 2022, 4:46 a.m. OK GNU C++17 (64) TESTS 9 0 0
148656119 zhanglinqiang A March 7, 2022, 2:51 a.m. OK GNU C++17 (64) TESTS 9 0 0
148651551 wcwu A March 7, 2022, 12:16 a.m. OK GNU C++17 (64) TESTS 9 0 0
148640193 spartanes A March 6, 2022, 7:20 p.m. OK GNU C++17 (64) TESTS 9 0 0
148655987 don2001 A March 7, 2022, 2:47 a.m. OK GNU C++20 (64) TESTS 9 0 0
148664748 CARBINE A March 7, 2022, 5:55 a.m. OK GNU C++20 (64) TESTS 9 0 0
148664574 idontknowwhyiamheree A March 7, 2022, 5:51 a.m. OK GNU C++20 (64) TESTS 9 0 0
148663258 hellfiredragon54 A March 7, 2022, 5:30 a.m. OK GNU C++20 (64) TESTS 9 0 0
148659910 Asfak_Shahrier A March 7, 2022, 4:24 a.m. OK GNU C++20 (64) TESTS 9 0 0
148651928 happypotato1207 A March 7, 2022, 12:32 a.m. OK GNU C++20 (64) TESTS 9 0 0
148648634 inksamurai A March 6, 2022, 10:16 p.m. OK GNU C++20 (64) TESTS 9 0 0
148647724 tolbi A March 6, 2022, 9:50 p.m. OK GNU C++20 (64) TESTS 9 0 0
148647697 pravin_as A March 6, 2022, 9:49 p.m. OK GNU C++20 (64) TESTS 9 0 0
148646152 mibig A March 6, 2022, 9:11 p.m. OK GNU C++20 (64) TESTS 9 0 0
148652624 A_G A March 7, 2022, 12:58 a.m. OK Go TESTS 9 15 102400
148619518 codelegend A March 6, 2022, 2:54 p.m. OK Haskell TESTS 9 15 0
148615624 akashkumarkly A March 6, 2022, 2:15 p.m. OK Java 11 TESTS 9 155 0
148655422 mayank61 A March 7, 2022, 2:31 a.m. OK Java 11 TESTS 9 155 0
148650580 Longgggggggg A March 6, 2022, 11:35 p.m. OK Java 11 TESTS 9 155 0
148620178 Dcoder123 A March 6, 2022, 3:01 p.m. OK Java 11 TESTS 9 155 0
148620173 mohamedsamirtkd A March 6, 2022, 3:01 p.m. OK Java 11 TESTS 9 155 0
148611213 SaberXpro A March 6, 2022, 1:37 p.m. OK Java 11 TESTS 9 155 0
148663263 the_unseen A March 7, 2022, 5:30 a.m. OK Java 11 TESTS 9 156 0
148627153 _ryan18_ A March 6, 2022, 4:23 p.m. OK Java 11 TESTS 9 156 0
148637976 suhas5979 A March 6, 2022, 6:47 p.m. OK Java 11 TESTS 9 156 0
148629698 umanggupta1975 A March 6, 2022, 4:55 p.m. OK Java 11 TESTS 9 156 0
148632290 vaibhav_1710 A March 6, 2022, 5:31 p.m. OK Java 8 TESTS 9 77 0
148633627 headshot1703 A March 6, 2022, 5:48 p.m. OK Java 8 TESTS 9 77 0
148613613 MerickBao A March 6, 2022, 1:57 p.m. OK Java 8 TESTS 9 78 0
148646692 roctes7 A March 6, 2022, 9:23 p.m. OK Java 8 TESTS 9 78 0
148643933 Mohamed308 A March 6, 2022, 8:23 p.m. OK Java 8 TESTS 9 78 0
148606724 al3amil103 A March 6, 2022, 1:04 p.m. OK Java 8 TESTS 9 78 0
148632743 aryaman_571 A March 6, 2022, 5:36 p.m. OK Java 8 TESTS 9 93 0
148664035 Zaid_Rj A March 7, 2022, 5:43 a.m. OK Java 8 TESTS 9 93 0
148658437 gssakash A March 7, 2022, 3:49 a.m. OK Java 8 TESTS 9 93 0
148635498 imOmi_KingOfPalindrome A March 6, 2022, 6:13 p.m. OK Java 8 TESTS 9 93 0
148623833 Khalid_aqili A March 6, 2022, 3:42 p.m. OK Kotlin 1.5 TESTS 9 187 0
148622533 TOURR A March 6, 2022, 3:28 p.m. OK MS C++ 2017 TESTS 9 15 0
148663792 mingyu17 A March 7, 2022, 5:39 a.m. OK MS C++ 2017 TESTS 9 15 0
148653063 RealStarlight A March 7, 2022, 1:13 a.m. OK MS C++ 2017 TESTS 9 15 0
148652801 chening A March 7, 2022, 1:03 a.m. OK MS C++ 2017 TESTS 9 15 0
148646365 Viktor36 A March 6, 2022, 9:16 p.m. OK MS C++ 2017 TESTS 9 15 0
148633254 gabalawy A March 6, 2022, 5:43 p.m. OK MS C++ 2017 TESTS 9 15 0
148596878 MR_QINY A March 6, 2022, 11:55 a.m. OK MS C++ 2017 TESTS 9 15 0
148610273 manhwz A March 6, 2022, 1:29 p.m. OK MS C++ 2017 TESTS 9 15 7987200
148655822 Wiggins0110 A March 7, 2022, 2:43 a.m. OK MS C++ 2017 TESTS 9 31 0
148613205 Togstation A March 6, 2022, 1:54 p.m. OK .NET Core C# TESTS 9 62 512000
148600826 sksshivam007 A March 6, 2022, 12:07 p.m. OK PyPy 2 TESTS 9 46 819200
148625315 1_2_3_4_5_9 A March 6, 2022, 4:01 p.m. OK PyPy 2 TESTS 9 139 921600
148635534 Ahmed_Turkman A March 6, 2022, 6:13 p.m. OK PyPy 3 TESTS 9 77 1433600
148660253 kwin A March 7, 2022, 4:32 a.m. OK PyPy 3 TESTS 9 77 1433600
148638132 IsmailToukhy A March 6, 2022, 6:49 p.m. OK PyPy 3 TESTS 9 77 1433600
148651010 ao35612 A March 6, 2022, 11:54 p.m. OK PyPy 3 TESTS 9 77 1536000
148614470 legend.ary_as A March 6, 2022, 2:05 p.m. OK PyPy 3 TESTS 9 77 2252800
148624431 Metros A March 6, 2022, 3:50 p.m. OK PyPy 3 TESTS 9 92 0
148600948 mahbubnotes A March 6, 2022, 12:07 p.m. OK PyPy 3 TESTS 9 92 1536000
148663762 YashNandwana A March 7, 2022, 5:38 a.m. OK PyPy 3 TESTS 9 92 1638400
148605547 vermakunal088 A March 6, 2022, 12:58 p.m. OK PyPy 3 TESTS 9 92 1638400
148607699 ambs_ A March 6, 2022, 1:10 p.m. OK PyPy 3 TESTS 9 93 1331200
148617426 Mr_Gamma A March 6, 2022, 2:33 p.m. OK PyPy 3-64 TESTS 9 46 2150400
148615265 Mr_Gamma A March 6, 2022, 2:12 p.m. OK PyPy 3-64 TESTS 9 46 2252800
148605661 aldi.setiawan A March 6, 2022, 12:58 p.m. OK PyPy 3-64 TESTS 9 61 102400
148617890 Mr_Gamma A March 6, 2022, 2:38 p.m. OK PyPy 3-64 TESTS 9 61 2150400
148605073 mohammedayman12340 A March 6, 2022, 12:56 p.m. OK PyPy 3-64 TESTS 9 61 2252800
148663665 eye2710 A March 7, 2022, 5:37 a.m. OK PyPy 3-64 TESTS 9 62 102400
148641805 abineth A March 6, 2022, 7:45 p.m. OK PyPy 3-64 TESTS 9 62 102400
148630328 thevaibhavdixit A March 6, 2022, 5:04 p.m. OK PyPy 3-64 TESTS 9 62 614400
148616834 K4vin A March 6, 2022, 2:28 p.m. OK PyPy 3-64 TESTS 9 62 614400
148661116 dvaravind A March 7, 2022, 4:51 a.m. OK PyPy 3-64 TESTS 9 62 2150400
148617712 elistark A March 6, 2022, 2:36 p.m. OK Python 2 TESTS 9 31 0
148642353 OLOGY A March 6, 2022, 7:54 p.m. OK Python 2 TESTS 9 31 102400
148647305 fredy10 A March 6, 2022, 9:39 p.m. OK Python 3 TESTS 9 30 0
148654805 Israr_Ahmed A March 7, 2022, 2:12 a.m. OK Python 3 TESTS 9 31 0
148638263 D_Dima A March 6, 2022, 6:51 p.m. OK Python 3 TESTS 9 31 0
148628619 Kit-Cat A March 6, 2022, 4:41 p.m. OK Python 3 TESTS 9 31 0
148627789 Kit-Cat A March 6, 2022, 4:30 p.m. OK Python 3 TESTS 9 31 0
148622804 varunsh17 A March 6, 2022, 3:31 p.m. OK Python 3 TESTS 9 31 0
148627368 Kit-Cat A March 6, 2022, 4:25 p.m. OK Python 3 TESTS 9 31 0
148626286 s4ge A March 6, 2022, 4:12 p.m. OK Python 3 TESTS 9 31 0
148623712 AshrafSustS19 A March 6, 2022, 3:41 p.m. OK Python 3 TESTS 9 31 0
148623613 zzzzsust19 A March 6, 2022, 3:40 p.m. OK Python 3 TESTS 9 31 0

remove filters

Back to search problems