Codeforces Round 640 (Div. 4)

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
1352 Codeforces Round 640 (Div. 4) FINISHED False 7200 142788299 May 9, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 26419 ) D Alice, Bob and Candies PROGRAMMING implementation 1300

B'There are n candies in a row, they are numbered from left to right from 1 to n . The size of the i -th candy is a_i . Alice and Bob play an interesting and tasty game: they eat candy. Alice will eat candy from left to right, and Bob -- from right to left. The game ends if all the candies are eaten. The process consists of moves. During a move, the player eats one or more sweets from her/his side (Alice eats from the left, Bob -- from the right). Alice makes the first move. During the first move, she will eat 1 candy (its size is a_1 ). Then, each successive move the players alternate -- that is, Bob makes the second move, then Alice, then again Bob and so on. On each move, a player counts the total size of candies eaten during the current move. Once this number becomes strictly greater than the total size of candies eaten by the other player on their previous move, the current player stops eating and the move ends. In other words, on a move, a player eats the smallest possible number of candies such that the sum of the sizes of candies eaten on this move is strictly greater than the sum of the sizes of candies that the other player ate on the previous move. If there are not enough candies to make a move this way, then the player eats up all the remaining candies and the game ends. For example, if n=11 and a=[3,1,4,1,5,9,2,6,5,3,5] , then: Print the number of moves in the game and two numbers: The first line contains an integer t ( 1 <= t <= 5000 ) -- the number of test cases in the input. The following are descriptions of the t test cases. Each test case consists of two lines. The first line contains an integer n ( 1 <= n <= 1000 ) -- the number of candies. The second line contains a sequence of integers a_1, a_2, ... , a_n ( 1 <= a_i <= 1000 ) -- the sizes of candies in the order they are arranged from left to right. It is guaranteed that the sum of the value'...

Tutorials

77161

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
80776157 chncg D May 20, 2020, 1:24 p.m. OK Clang++17 Diagnostics TESTS 5 701 0 1300
80863521 vjudge5 D May 21, 2020, 2:49 p.m. OK Clang++17 Diagnostics TESTS 5 857 4198400 1300
80452932 Gassa D May 17, 2020, 9:06 a.m. OK D TESTS 5 46 10854400 1300
80452957 Gassa D May 17, 2020, 9:06 a.m. OK D TESTS 5 77 10854400 1300
80452943 Gassa D May 17, 2020, 9:06 a.m. OK D TESTS 5 217 10854400 1300
80917354 escapecho D May 22, 2020, 8:51 a.m. OK GNU C11 TESTS 5 46 0 1300
79797878 afzalul D May 12, 2020, 4:20 a.m. OK GNU C11 TESTS 5 46 0 1300
79799244 naman.maheshwari99 D May 12, 2020, 4:53 a.m. OK GNU C11 TESTS 5 46 0 1300
80651458 rljlr D May 19, 2020, 3:30 a.m. OK GNU C11 TESTS 5 46 0 1300
80654481 Rohan1380 D May 19, 2020, 4:43 a.m. OK GNU C11 TESTS 5 46 0 1300
80675642 sahaj_vijay666 D May 19, 2020, 10:03 a.m. OK GNU C11 TESTS 5 46 0 1300
80692927 vjudge1 D May 19, 2020, 1:38 p.m. OK GNU C11 TESTS 5 46 0 1300
80014170 ehsan3p D May 13, 2020, 7:34 p.m. OK GNU C11 TESTS 5 46 3686400 1300
79811613 bswethareddy D May 12, 2020, 11:35 a.m. OK GNU C11 TESTS 5 46 3686400 1300
80032412 RHasanR D May 14, 2020, 5:01 a.m. OK GNU C11 TESTS 5 46 3686400 1300
80387250 YangChen666 D May 16, 2020, 3:27 p.m. OK GNU C++11 TESTS 5 15 3891200 1300
79807045 YHHxBULIATANIA D May 12, 2020, 10:30 a.m. OK GNU C++11 TESTS 5 15 4710400 1300
80280724 Chubingtao D May 16, 2020, 5:26 a.m. OK GNU C++11 TESTS 5 15 4710400 1300
80856336 dingcx D May 21, 2020, 1:30 p.m. OK GNU C++11 TESTS 5 30 0 1300
80755586 luogu_bot5 D May 20, 2020, 8:48 a.m. OK GNU C++11 TESTS 5 30 4096000 1300
79958757 Vxlimo D May 13, 2020, 8:31 a.m. OK GNU C++11 TESTS 5 30 4096000 1300
80598366 luogu_bot4 D May 18, 2020, 11:50 a.m. OK GNU C++11 TESTS 5 30 4710400 1300
81701044 licunchun2006 D May 28, 2020, 11:44 a.m. OK GNU C++11 TESTS 5 31 0 1300
80937656 isLXa D May 22, 2020, 1:40 p.m. OK GNU C++11 TESTS 5 31 0 1300
80694020 dreaming2019 D May 19, 2020, 1:49 p.m. OK GNU C++11 TESTS 5 31 0 1300
80816299 neckhill007 D May 21, 2020, 2:57 a.m. OK GNU C++14 TESTS 5 31 0 1300
79702430 cule10 D May 11, 2020, 3:07 a.m. OK GNU C++14 TESTS 5 31 3891200 1300
79680939 bayazid D May 10, 2020, 6:18 p.m. OK GNU C++14 TESTS 5 31 3891200 1300
80937198 bigman69834 D May 22, 2020, 1:35 p.m. OK GNU C++14 TESTS 5 46 0 1300
80966593 borojac D May 22, 2020, 7:46 p.m. OK GNU C++14 TESTS 5 46 0 1300
81045415 arnav_mandal D May 23, 2020, 7:58 p.m. OK GNU C++14 TESTS 5 46 0 1300
81384878 harshit_37 D May 25, 2020, 12:58 p.m. OK GNU C++14 TESTS 5 46 0 1300
80975309 Hemose D May 23, 2020, 12:08 a.m. OK GNU C++14 TESTS 5 46 0 1300
80840956 math2do D May 21, 2020, 10:10 a.m. OK GNU C++14 TESTS 5 46 0 1300
80852429 vjudge5 D May 21, 2020, 12:41 p.m. OK GNU C++14 TESTS 5 46 0 1300
80850649 L-Lawliet D May 21, 2020, 12:19 p.m. OK GNU C++17 TESTS 5 30 3993600 1300
79998778 _andyli D May 13, 2020, 3:57 p.m. OK GNU C++17 TESTS 5 30 7987200 1300
81674766 Akash_1703044 D May 28, 2020, 6:09 a.m. OK GNU C++17 TESTS 5 31 204800 1300
80447443 vjudge1 D May 17, 2020, 8:05 a.m. OK GNU C++17 TESTS 5 31 3686400 1300
80283278 chwudi D May 16, 2020, 6:06 a.m. OK GNU C++17 TESTS 5 31 3686400 1300
80044489 IndianByChoice D May 14, 2020, 7:43 a.m. OK GNU C++17 TESTS 5 31 3686400 1300
80429829 jame0313 D May 17, 2020, 4:06 a.m. OK GNU C++17 TESTS 5 31 3686400 1300
80267049 Honey_Badger D May 15, 2020, 10:54 p.m. OK GNU C++17 TESTS 5 31 3891200 1300
80850264 L-Lawliet D May 21, 2020, 12:14 p.m. OK GNU C++17 TESTS 5 31 3993600 1300
80850356 L-Lawliet D May 21, 2020, 12:15 p.m. OK GNU C++17 TESTS 5 31 3993600 1300
80608608 petushara D May 18, 2020, 1:55 p.m. OK GNU C++17 (64) TESTS 5 15 4300800 1300
81150004 PARTH_4399 D May 24, 2020, 8:42 a.m. OK GNU C++17 (64) TESTS 5 31 0 1300
79786729 anzuof D May 11, 2020, 10:39 p.m. OK GNU C++17 (64) TESTS 5 31 0 1300
80717882 Arif19 D May 19, 2020, 6:23 p.m. OK GNU C++17 (64) TESTS 5 31 0 1300
79791093 Tzak D May 12, 2020, 1:14 a.m. OK GNU C++17 (64) TESTS 5 31 0 1300
79750558 Alchemist0 D May 11, 2020, 1:39 p.m. OK GNU C++17 (64) TESTS 5 31 4300800 1300
79767738 crayon_ D May 11, 2020, 4:53 p.m. OK GNU C++17 (64) TESTS 5 31 4300800 1300
79767811 whitewalker7 D May 11, 2020, 4:54 p.m. OK GNU C++17 (64) TESTS 5 31 4300800 1300
80247090 zxcvbn15 D May 15, 2020, 4:57 p.m. OK GNU C++17 (64) TESTS 5 31 4300800 1300
79691106 bhagatsunny96 D May 10, 2020, 9:04 p.m. OK GNU C++17 (64) TESTS 5 31 28876800 1300
79894859 muravjov D May 12, 2020, 3:26 p.m. OK Go TESTS 5 62 10649600 1300
79979150 glebsamsonov D May 13, 2020, 12:30 p.m. OK Go TESTS 5 139 15257600 1300
80164254 claymore D May 14, 2020, 6:05 p.m. OK Go TESTS 5 140 10854400 1300
80614499 devesh08 D May 18, 2020, 3:03 p.m. OK Java 11 TESTS 5 217 24371200 1300
81458284 zhupeijun D May 26, 2020, 10:03 a.m. OK Java 11 TESTS 5 218 0 1300
81354736 manojbhatt D May 25, 2020, 6:43 a.m. OK Java 11 TESTS 5 218 0 1300
79681973 nickleoden299 D May 10, 2020, 6:33 p.m. OK Java 11 TESTS 5 233 24371200 1300
79925430 amit_chas D May 12, 2020, 9:44 p.m. OK Java 11 TESTS 5 249 24371200 1300
81388247 gavaciw522 D May 25, 2020, 1:39 p.m. OK Java 11 TESTS 5 264 0 1300
80942225 Corainbows D May 22, 2020, 2:27 p.m. OK Java 11 TESTS 5 264 0 1300
79939929 nickjosi D May 13, 2020, 4:12 a.m. OK Java 11 TESTS 5 264 24268800 1300
79735447 ankurkandi97 D May 11, 2020, 11:55 a.m. OK Java 11 TESTS 5 264 24371200 1300
79935094 Srthk D May 13, 2020, 2:31 a.m. OK Java 11 TESTS 5 264 24473600 1300
80879566 tsumit023 D May 21, 2020, 6:19 p.m. OK Java 8 TESTS 5 108 0 1300
79690519 MahmoudJobeel D May 10, 2020, 8:52 p.m. OK Java 8 TESTS 5 108 20480000 1300
81463356 prakharshriv D May 26, 2020, 11:13 a.m. OK Java 8 TESTS 5 109 0 1300
80973545 Oopsimbad D May 22, 2020, 10:49 p.m. OK Java 8 TESTS 5 109 0 1300
80243065 labdhi D May 15, 2020, 4:05 p.m. OK Java 8 TESTS 5 109 20684800 1300
81360812 kevinyang D May 25, 2020, 8:06 a.m. OK Java 8 TESTS 5 124 0 1300
80822164 aditya314 D May 21, 2020, 5:33 a.m. OK Java 8 TESTS 5 124 0 1300
81200809 ingyu1008 D May 24, 2020, 1:10 p.m. OK Java 8 TESTS 5 124 0 1300
81458141 naveench D May 26, 2020, 10:01 a.m. OK Java 8 TESTS 5 124 0 1300
79990794 Oland D May 13, 2020, 2:40 p.m. OK Java 8 TESTS 5 124 20582400 1300
79879755 lenphuong D May 12, 2020, 2:33 p.m. OK Kotlin TESTS 5 217 21811200 1300
80858666 Clowyy D May 21, 2020, 1:56 p.m. OK Kotlin TESTS 5 218 0 1300
80960745 gevmart D May 22, 2020, 6:11 p.m. OK Kotlin TESTS 5 233 0 1300
81361584 __fr__y__ D May 25, 2020, 8:15 a.m. OK Kotlin TESTS 5 248 0 1300
80893731 taresin D May 22, 2020, 1:05 a.m. OK Kotlin TESTS 5 249 0 1300
80191318 tabr D May 15, 2020, 4:48 a.m. OK Kotlin TESTS 5 249 21811200 1300
81445202 vjudge3 D May 26, 2020, 7:07 a.m. OK Kotlin TESTS 5 358 0 1300
80271603 sakapon D May 16, 2020, 1:59 a.m. OK Mono C# TESTS 5 77 15360000 1300
79699949 treasuryonly D May 11, 2020, 1:58 a.m. OK Mono C# TESTS 5 78 11776000 1300
80045478 AsadulloProgrammist D May 14, 2020, 7:55 a.m. OK Mono C# TESTS 5 93 11468800 1300
80309191 ansergeyg D May 16, 2020, 11:25 a.m. OK Mono C# TESTS 5 93 11468800 1300
80050669 Nottyy D May 14, 2020, 8:58 a.m. OK Mono C# TESTS 5 93 15155200 1300
80303643 ksandr1v D May 16, 2020, 10:20 a.m. OK Mono C# TESTS 5 108 11468800 1300
80789030 Resharper_0165 D May 20, 2020, 4:05 p.m. OK Mono C# TESTS 5 124 6963200 1300
80612742 tjktnrVK D May 18, 2020, 2:43 p.m. OK Mono C# TESTS 5 124 15257600 1300
79959266 anish.1922 D May 13, 2020, 8:37 a.m. OK Mono C# TESTS 5 155 15155200 1300
79795769 vjudge5 D May 12, 2020, 3:30 a.m. OK MS C++ TESTS 5 31 0 1300
79797795 vjudge5 D May 12, 2020, 4:18 a.m. OK MS C++ TESTS 5 31 0 1300
80671934 Hokage. D May 19, 2020, 9:12 a.m. OK MS C++ TESTS 5 46 0 1300
79896050 vjudge1 D May 12, 2020, 3:49 p.m. OK MS C++ TESTS 5 46 3891200 1300
79983464 vjudge1 D May 13, 2020, 1:23 p.m. OK MS C++ TESTS 5 46 4096000 1300
80506059 vjudge2 D May 17, 2020, 11:05 a.m. OK MS C++ TESTS 5 61 4710400 1300
79735715 vjudge1 D May 11, 2020, 11:58 a.m. OK MS C++ TESTS 5 62 3891200 1300
79796105 vjudge2 D May 12, 2020, 3:38 a.m. OK MS C++ TESTS 5 109 0 1300
79793551 vjudge2 D May 12, 2020, 2:32 a.m. OK MS C++ TESTS 5 124 0 1300
79978913 JasminI D May 13, 2020, 12:27 p.m. OK MS C++ TESTS 5 124 3891200 1300
79793094 vjudge1 D May 12, 2020, 2:19 a.m. OK MS C++ 2017 TESTS 5 62 0 1300
79796012 vjudge5 D May 12, 2020, 3:36 a.m. OK MS C++ 2017 TESTS 5 62 0 1300
79795988 vjudge4 D May 12, 2020, 3:36 a.m. OK MS C++ 2017 TESTS 5 62 0 1300
79793602 vjudge3 D May 12, 2020, 2:33 a.m. OK MS C++ 2017 TESTS 5 62 0 1300
79890048 vjudge1 D May 12, 2020, 2:58 p.m. OK MS C++ 2017 TESTS 5 62 3686400 1300
80303931 guanyin1433223 D May 16, 2020, 10:23 a.m. OK MS C++ 2017 TESTS 5 62 3686400 1300
79882764 vjudge2 D May 12, 2020, 2:40 p.m. OK MS C++ 2017 TESTS 5 62 3686400 1300
79685110 metal4people D May 10, 2020, 7:20 p.m. OK MS C++ 2017 TESTS 5 62 3686400 1300
79795491 vjudge4 D May 12, 2020, 3:22 a.m. OK MS C++ 2017 TESTS 5 78 0 1300
80904235 deuslovelt D May 22, 2020, 5:42 a.m. OK MS C++ 2017 TESTS 5 124 0 1300
81049941 vbrigand D May 23, 2020, 9:50 p.m. OK Node.js TESTS 5 187 5836800 1300
81050835 vbrigand D May 23, 2020, 10:25 p.m. OK Node.js TESTS 5 217 5836800 1300
81051364 vbrigand D May 23, 2020, 10:44 p.m. OK Node.js TESTS 5 217 5836800 1300
80807573 chaudhary_19 D May 20, 2020, 9:14 p.m. OK PyPy 2 TESTS 5 202 4710400 1300
80981439 vbhayana D May 23, 2020, 3:58 a.m. OK PyPy 2 TESTS 5 342 4300800 1300
79920403 timf1089 D May 12, 2020, 8:03 p.m. OK PyPy 2 TESTS 5 389 28160000 1300
79829926 itsme297 D May 12, 2020, 12:53 p.m. OK PyPy 2 TESTS 5 717 31948800 1300
81455755 ramgarg102 D May 26, 2020, 9:29 a.m. OK PyPy 3 TESTS 5 217 4812800 1300
79702047 TheMisfits D May 11, 2020, 2:57 a.m. OK PyPy 3 TESTS 5 217 26931200 1300
80063734 neweekoff D May 14, 2020, 11:31 a.m. OK PyPy 3 TESTS 5 217 28057600 1300
80278686 metaxylene_13 D May 16, 2020, 4:53 a.m. OK PyPy 3 TESTS 5 218 23961600 1300
79729404 vjudge3 D May 11, 2020, 10:43 a.m. OK PyPy 3 TESTS 5 233 28160000 1300
80054080 sadikulsadi1500 D May 14, 2020, 9:38 a.m. OK PyPy 3 TESTS 5 234 25804800 1300
81655619 340951987 D May 27, 2020, 9:05 p.m. OK PyPy 3 TESTS 5 264 6451200 1300
80206641 UD_xlinsist D May 15, 2020, 8:49 a.m. OK PyPy 3 TESTS 5 264 28262400 1300
80299397 roaris D May 16, 2020, 9:28 a.m. OK PyPy 3 TESTS 5 264 29184000 1300
79804103 hitwanyang D May 12, 2020, 9:26 a.m. OK PyPy 3 TESTS 5 265 27136000 1300
79937239 flyman3046 D May 13, 2020, 3:17 a.m. OK Python 2 TESTS 5 374 6656000 1300
79683901 AggarwalRaghav D May 10, 2020, 7:02 p.m. OK Python 3 TESTS 5 202 7168000 1300
79664490 surakshith D May 10, 2020, 2:54 p.m. OK Python 3 TESTS 5 202 11366400 1300
80001877 jmdons D May 13, 2020, 4:33 p.m. OK Python 3 TESTS 5 218 7270400 1300
80072159 cesmecelik D May 14, 2020, 1:11 p.m. OK Python 3 TESTS 5 218 7475200 1300
79687217 sjbr D May 10, 2020, 7:54 p.m. OK Python 3 TESTS 5 233 7168000 1300
79680343 LintuStorm D May 10, 2020, 6:10 p.m. OK Python 3 TESTS 5 233 7372800 1300
79766171 hlavko D May 11, 2020, 4:33 p.m. OK Python 3 TESTS 5 233 7577600 1300
80031652 HoyHoyCharhang D May 14, 2020, 4:46 a.m. OK Python 3 TESTS 5 233 7680000 1300
80889643 Dronbonpon D May 21, 2020, 9:42 p.m. OK Python 3 TESTS 5 249 512000 1300
80895790 zhenfisher D May 22, 2020, 2:22 a.m. OK Python 3 TESTS 5 249 716800 1300
79710728 gautam2roy D May 11, 2020, 6:18 a.m. OK Ruby TESTS 5 187 7680000 1300
81465124 nidev D May 26, 2020, 11:35 a.m. OK Ruby TESTS 5 218 1228800 1300

remove filters

Back to search problems