Codeforces Round 929 (Div. 3)

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
1933 Codeforces Round 929 (Div. 3) FINISHED False 8100 28135463 Feb. 27, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11741 ) E Turtle vs. Rabbit Race: Optimal Trainings PROGRAMMING binary search math ternary search

B"Isaac begins his training. There are n running tracks available, and the i -th track ( 1 <= i <= n ) consists of a_i equal-length sections. Given an integer u ( 1 <= u <= 10^9 ), finishing each section can increase Isaac's ability by a certain value, described as follows: You are also given an integer l . You must choose an integer r such that l <= r <= n and Isaac will finish each section of each track l, l + 1, ... , r (that is, a total of sum_{i=l}^r a_i = a_l + a_{l+1} + ldots + a_r sections). Answer the following question: what is the optimal r you can choose that the increase in Isaac's performance is maximum possible? If there are multiple r that maximize the increase in Isaac's performance, output the smallest r . To increase the difficulty, you need to answer the question for q different values of l and u . The first line of input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The descriptions of the test cases follow. The first line contains a single integer n ( 1 <= n <= 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^4 ). The third line contains a single integer q ( 1 <= q <= 10^5 ). The next q lines each contain two integers l and u ( 1 <= l <= n, 1 <= u <= 10^9 ) -- the descriptions to each query. The sum of n over all test cases does not exceed 2 cdot 10^5 . The sum of q over all test cases does not exceed 2 cdot 10^5 . For each test case, output q integers: the i -th integer contains the optimal r for the i -th query. If there are multiple solutions, output the smallest one. For the 1 -st query in the first test case: Both choices yield the optimal increase in performance, however we want to choose the smallest r . So we choose r = "...

Tutorials

Codeforces Round 929 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
248770058 MortalTurtle E Feb. 28, 2024, 3:13 p.m. OK C# 10 TESTS 12 171 24166400
248719718 Abhay30___ E Feb. 28, 2024, 9:32 a.m. OK Clang++17 Diagnostics TESTS 12 3088 1638400
248691228 DLC0203 E Feb. 28, 2024, 4:49 a.m. OK Clang++20 Diagnostics TESTS 12 3244 17408000
248767914 bhavya_banoth E Feb. 28, 2024, 2:56 p.m. OK Clang++20 Diagnostics TESTS 12 4274 10547200
248767445 Dhanraj15 E Feb. 28, 2024, 2:52 p.m. OK Clang++20 Diagnostics TESTS 12 4274 10547200
248685754 chichiro E Feb. 28, 2024, 3:35 a.m. OK GNU C++17 TESTS 12 156 819200
248836445 tbzard E Feb. 29, 2024, 5:16 a.m. OK GNU C++17 TESTS 12 171 819200
248809663 youssefahmed004 E Feb. 28, 2024, 8:48 p.m. OK GNU C++17 TESTS 12 171 819200
248686549 BFxue E Feb. 28, 2024, 3:47 a.m. OK GNU C++17 TESTS 12 171 819200
248717946 Esdhy E Feb. 28, 2024, 9:17 a.m. OK GNU C++17 TESTS 12 171 1638400
248766210 ducanhdz E Feb. 28, 2024, 2:42 p.m. OK GNU C++17 TESTS 12 186 409600
248761407 kanishkgupta071 E Feb. 28, 2024, 2:10 p.m. OK GNU C++17 TESTS 12 186 409600
248758063 pavT1024_theGP29 E Feb. 28, 2024, 1:48 p.m. OK GNU C++17 TESTS 12 186 409600
248747229 sudoku_master E Feb. 28, 2024, 12:41 p.m. OK GNU C++17 TESTS 12 186 409600
248688664 polariscyy E Feb. 28, 2024, 4:18 a.m. OK GNU C++17 TESTS 12 186 409600
248833263 53Dawns E Feb. 29, 2024, 4:34 a.m. OK GNU C++17 (64) TESTS 12 124 819200
248781906 Ruanyy E Feb. 28, 2024, 4:41 p.m. OK GNU C++17 (64) TESTS 12 124 819200
248770120 Hessenburg E Feb. 28, 2024, 3:14 p.m. OK GNU C++17 (64) TESTS 12 124 819200
248767853 wzxccnuwzx210 E Feb. 28, 2024, 2:55 p.m. OK GNU C++17 (64) TESTS 12 124 819200
248760773 changemaker E Feb. 28, 2024, 2:05 p.m. OK GNU C++17 (64) TESTS 12 124 819200
248759178 iced_T E Feb. 28, 2024, 1:55 p.m. OK GNU C++17 (64) TESTS 12 124 819200
248690813 PUFL E Feb. 28, 2024, 4:45 a.m. OK GNU C++17 (64) TESTS 12 124 819200
248684414 Jocehi E Feb. 28, 2024, 3:12 a.m. OK GNU C++17 (64) TESTS 12 124 819200
248766358 lgyzero E Feb. 28, 2024, 2:43 p.m. OK GNU C++17 (64) TESTS 12 124 1228800
248735792 Toxiccht E Feb. 28, 2024, 11:31 a.m. OK GNU C++17 (64) TESTS 12 124 1228800
248737388 020_Omar_2028 E Feb. 28, 2024, 11:41 a.m. OK GNU C++20 (64) TESTS 12 77 4812800
248824050 farmpiggie E Feb. 29, 2024, 1:33 a.m. OK GNU C++20 (64) TESTS 12 93 409600
248771280 kevin_Durant_ E Feb. 28, 2024, 3:22 p.m. OK GNU C++20 (64) TESTS 12 93 409600
248740478 MayaZayn E Feb. 28, 2024, noon OK GNU C++20 (64) TESTS 12 93 409600
248687785 mohimenul E Feb. 28, 2024, 4:05 a.m. OK GNU C++20 (64) TESTS 12 93 409600
248839067 srivastava.swasti07 E Feb. 29, 2024, 5:49 a.m. OK GNU C++20 (64) TESTS 12 93 819200
248835010 martensite E Feb. 29, 2024, 4:58 a.m. OK GNU C++20 (64) TESTS 12 93 819200
248828320 jim AggravatedCow E Feb. 29, 2024, 3:06 a.m. OK GNU C++20 (64) TESTS 12 93 819200
248826822 mtxcok E Feb. 29, 2024, 2:34 a.m. OK GNU C++20 (64) TESTS 12 93 819200
248826403 Wangshushushu E Feb. 29, 2024, 2:25 a.m. OK GNU C++20 (64) TESTS 12 93 819200
248686297 KreanXie E Feb. 28, 2024, 3:43 a.m. OK Go TESTS 12 280 5529600
248714475 Rememorio E Feb. 28, 2024, 8:51 a.m. OK Go TESTS 12 280 8294400
248720164 ccj123 E Feb. 28, 2024, 9:36 a.m. OK Java 21 TESTS 12 358 1024000
248728568 cpp10 E Feb. 28, 2024, 10:42 a.m. OK Java 21 TESTS 12 452 102400
248767926 believe18 E Feb. 28, 2024, 2:56 p.m. OK Java 21 TESTS 12 467 409600
248768319 fightingxjz E Feb. 28, 2024, 2:59 p.m. OK Java 21 TESTS 12 483 1024000
248684356 net12k44 E Feb. 28, 2024, 3:10 a.m. OK Java 21 TESTS 12 498 512000
248718374 lakshaycode22 E Feb. 28, 2024, 9:20 a.m. OK Java 21 TESTS 12 530 409600
248690529 flyingArpit E Feb. 28, 2024, 4:41 a.m. OK Java 21 TESTS 12 530 1228800
248728809 cpp10 E Feb. 28, 2024, 10:43 a.m. OK Java 21 TESTS 12 546 819200
248715998 lakshaycode22 E Feb. 28, 2024, 9:02 a.m. OK Java 21 TESTS 12 561 307200
248716052 bashkort E Feb. 28, 2024, 9:02 a.m. OK Java 21 TESTS 12 576 819200
248761738 Xing_ke E Feb. 28, 2024, 2:12 p.m. OK Java 8 TESTS 12 280 0
248834602 gdax E Feb. 29, 2024, 4:52 a.m. OK Java 8 TESTS 12 295 0
248756618 ygming E Feb. 28, 2024, 1:38 p.m. OK Java 8 TESTS 12 295 0
248722039 y_a_s E Feb. 28, 2024, 9:51 a.m. OK Java 8 TESTS 12 327 3788800
248781909 duyipeng E Feb. 28, 2024, 4:41 p.m. OK Java 8 TESTS 12 623 11980800
248687958 amit_roy E Feb. 28, 2024, 4:07 a.m. OK Java 8 TESTS 12 857 716800
248724672 Sumitsingh7 E Feb. 28, 2024, 10:11 a.m. OK Java 8 TESTS 12 873 7475200
248728449 lovejsn E Feb. 28, 2024, 10:40 a.m. OK Java 8 TESTS 12 904 0
248756653 Night1324 E Feb. 28, 2024, 1:38 p.m. OK Java 8 TESTS 12 966 1740800
248808287 vishesh9096 E Feb. 28, 2024, 8:34 p.m. OK Java 8 TESTS 12 1513 0
248769339 IResh E Feb. 28, 2024, 3:07 p.m. OK MS C++ 2017 TESTS 12 576 819200
248727133 dogdie233 E Feb. 28, 2024, 10:30 a.m. OK MS C++ 2017 TESTS 12 1216 819200
248688019 15988190152 E Feb. 28, 2024, 4:08 a.m. OK MS C++ 2017 TESTS 12 1232 3993600
248821006 vjudge.10 E Feb. 29, 2024, 12:15 a.m. OK MS C++ 2017 TESTS 12 1918 41062400
248798158 crapcode E Feb. 28, 2024, 6:48 p.m. OK PHP TESTS 12 998 16793600
248797575 crapcode E Feb. 28, 2024, 6:43 p.m. OK PHP TESTS 12 1076 16793600
248805837 aki79 E Feb. 28, 2024, 8:08 p.m. OK PHP TESTS 12 2214 29388800
248742124 Jezykoz E Feb. 28, 2024, 12:10 p.m. OK PyPy 3 TESTS 12 1902 14643200
248751876 Kintsugi E Feb. 28, 2024, 1:10 p.m. OK PyPy 3 TESTS 12 2058 14950400
248834029 Youarenotgood E Feb. 29, 2024, 4:45 a.m. OK PyPy 3-64 TESTS 12 249 19251200
248696596 InHng E Feb. 28, 2024, 6 a.m. OK PyPy 3-64 TESTS 12 311 18329600
248770688 Hossam_Hassan_Taher E Feb. 28, 2024, 3:18 p.m. OK PyPy 3-64 TESTS 12 311 18432000
248759090 MaxValgen_ E Feb. 28, 2024, 1:54 p.m. OK PyPy 3-64 TESTS 12 311 18432000
248756102 booskako E Feb. 28, 2024, 1:35 p.m. OK PyPy 3-64 TESTS 12 327 20377600
248715981 VJsong02 E Feb. 28, 2024, 9:02 a.m. OK PyPy 3-64 TESTS 12 327 23449600
248686200 Drought E Feb. 28, 2024, 3:41 a.m. OK PyPy 3-64 TESTS 12 342 20377600
248816356 _aadiupadhyay_ E Feb. 28, 2024, 10:22 p.m. OK PyPy 3-64 TESTS 12 343 19763200
248764412 Mohamed_Hamed E Feb. 28, 2024, 2:29 p.m. OK PyPy 3-64 TESTS 12 343 21094400
248721919 bergus E Feb. 28, 2024, 9:50 a.m. OK PyPy 3-64 TESTS 12 358 44748800
248792485 souva_6112000 E Feb. 28, 2024, 6 p.m. OK Python 3 TESTS 12 686 16179200
248803356 demony E Feb. 28, 2024, 7:41 p.m. OK Python 3 TESTS 12 717 18022400
248802445 AnasK E Feb. 28, 2024, 7:30 p.m. OK Python 3 TESTS 12 733 26521600
248829831 Alpha_ss E Feb. 29, 2024, 3:37 a.m. OK Python 3 TESTS 12 763 23347200
248755587 Wube E Feb. 28, 2024, 1:32 p.m. OK Python 3 TESTS 12 935 15052800
248714080 r-tron18 E Feb. 28, 2024, 8:49 a.m. OK Python 3 TESTS 12 966 26828800
248715791 r-tron18 E Feb. 28, 2024, 9 a.m. OK Python 3 TESTS 12 982 26828800
248715401 r-tron18 E Feb. 28, 2024, 8:58 a.m. OK Python 3 TESTS 12 1138 26931200
248719426 z_hang E Feb. 28, 2024, 9:29 a.m. OK Python 3 TESTS 12 1575 56012800
248802599 demony E Feb. 28, 2024, 7:32 p.m. OK Python 3 TESTS 12 1590 18432000

remove filters

Back to search problems