Codeforces Round 867 (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
1822 Codeforces Round 867 (Div. 3) FINISHED False 8100 54919463 April 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24829 ) A TubeTube Feed PROGRAMMING brute force implementation sortings

B'Mushroom Filippov cooked himself a meal and while having his lunch, he decided to watch a video on TubeTube. He can not spend more than t seconds for lunch, so he asks you for help with the selection of video. The TubeTube feed is a list of n videos, indexed from 1 to n . The i -th video lasts a_i seconds and has an entertainment value b_i . Initially, the feed is opened on the first video, and Mushroom can skip to the next video in 1 second (if the next video exists). Mushroom can skip videos any number of times (including zero). Help Mushroom choose one video that he can open and watch in t seconds. If there are several of them, he wants to choose the most entertaining one. Print the index of any appropriate video, or -1 if there is no such. The first line of the input data contains a single integer q ( 1 <= q <= 1000 ) -- the number of test cases in the test. The description of the test cases follows. The first line of a test case contains two integers n and t ( 1 <= n <= 50 , 1 <= t <= 200 ) -- the number of videos in the feed and seconds for lunch, respectively. The second line of a test case contains n integers a_1, a_2, a_3, ... , a_n ( 1 <= a_i <= 100 ) -- durations of videos. The third line of a test case contains n integers b_1, b_2, b_3, ... , b_n ( 1 <= b_i <= 100 ) -- entertainment values of videos. Output q integers, each of which is the answer to the corresponding test case. As an answer, output the index of the most entertaining video that Mushroom will have time to watch. If there are several answers, you are allowed to output any of them. Output -1 , if there is no video he can watch during his lunch break. '...

Tutorials

Codeforces Round #867 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203376502 bluemegane A April 24, 2023, 10:47 p.m. OK C# 8 TESTS 4 93 2969600
203356120 Mishra_09 A April 24, 2023, 6:04 p.m. OK Clang++17 Diagnostics TESTS 3 311 2150400
203388347 sound-medium521 A April 25, 2023, 3:01 a.m. OK Clang++20 Diagnostics TESTS 4 358 0
203345767 g.Host A April 24, 2023, 4:55 p.m. OK GNU C11 TESTS 3 15 0
203350088 Masummolla149 A April 24, 2023, 5:18 p.m. OK GNU C11 TESTS 3 15 0
203358848 kcaj A April 24, 2023, 6:31 p.m. OK GNU C11 TESTS 3 15 0
203359488 newaz234 A April 24, 2023, 6:37 p.m. OK GNU C11 TESTS 3 15 0
203394619 AbdallaAzzohry A April 25, 2023, 4:38 a.m. OK GNU C11 TESTS 4 15 0
203346594 zaghez_belkacem A April 24, 2023, 4:58 p.m. OK GNU C11 TESTS 3 15 102400
203373066 warks A April 24, 2023, 9:33 p.m. OK GNU C11 TESTS 4 30 614400
203358514 mittalshivam_2709 A April 24, 2023, 6:27 p.m. OK GNU C11 TESTS 3 31 0
203357219 Kirito2op A April 24, 2023, 6:15 p.m. OK GNU C11 TESTS 3 31 0
203385027 nazmulhossenlimon56 A April 25, 2023, 2 a.m. OK GNU C11 TESTS 4 31 0
203349717 truong852002 A April 24, 2023, 5:15 p.m. OK GNU C++14 TESTS 3 0 102400
203399269 rafaielanam01 A April 25, 2023, 5:45 a.m. OK GNU C++14 TESTS 4 0 102400
203385963 xiaoxiaoxiaozhou A April 25, 2023, 2:19 a.m. OK GNU C++14 TESTS 4 15 0
203398892 vivk A April 25, 2023, 5:39 a.m. OK GNU C++14 TESTS 4 15 0
203386232 Milliriver A April 25, 2023, 2:24 a.m. OK GNU C++14 TESTS 4 15 0
203385744 ptyzzzy A April 25, 2023, 2:15 a.m. OK GNU C++14 TESTS 4 15 0
203381532 In_Sha_Allah A April 25, 2023, 12:45 a.m. OK GNU C++14 TESTS 4 15 0
203379601 SOHAG_007 A April 25, 2023, 12:02 a.m. OK GNU C++14 TESTS 4 15 0
203379002 HTyin A April 24, 2023, 11:46 p.m. OK GNU C++14 TESTS 4 15 0
203372467 __mask__ A April 24, 2023, 9:23 p.m. OK GNU C++14 TESTS 4 15 0
203365410 Sumitgoyal A April 24, 2023, 7:40 p.m. OK GNU C++17 TESTS 3 0 0
203374592 Fathy0 A April 24, 2023, 10:05 p.m. OK GNU C++17 TESTS 4 0 102400
203396696 ye.mon A April 25, 2023, 5:09 a.m. OK GNU C++17 TESTS 4 15 0
203396846 gzzz A April 25, 2023, 5:11 a.m. OK GNU C++17 TESTS 4 15 0
203397222 RISHI_SHARMA A April 25, 2023, 5:16 a.m. OK GNU C++17 TESTS 4 15 0
203396326 Charlie_IK A April 25, 2023, 5:04 a.m. OK GNU C++17 TESTS 4 15 0
203397890 darshan_g A April 25, 2023, 5:26 a.m. OK GNU C++17 TESTS 4 15 0
203398942 vipin A April 25, 2023, 5:40 a.m. OK GNU C++17 TESTS 4 15 0
203397814 mnanjeeba A April 25, 2023, 5:25 a.m. OK GNU C++17 TESTS 4 15 0
203396550 Noob-Boy A April 25, 2023, 5:07 a.m. OK GNU C++17 TESTS 4 15 0
203384639 Zerologic_Infinity A April 25, 2023, 1:52 a.m. OK GNU C++17 (64) TESTS 4 0 0
203382510 adhooom A April 25, 2023, 1:07 a.m. OK GNU C++17 (64) TESTS 4 0 0
203381146 hhux A April 25, 2023, 12:37 a.m. OK GNU C++17 (64) TESTS 4 0 0
203373655 HelmOptimum A April 24, 2023, 9:44 p.m. OK GNU C++17 (64) TESTS 4 0 0
203350933 notCF_c0der A April 24, 2023, 5:23 p.m. OK GNU C++17 (64) TESTS 3 0 0
203398525 surajmisal18 A April 25, 2023, 5:34 a.m. OK GNU C++17 (64) TESTS 4 0 0
203384170 0822 A April 25, 2023, 1:42 a.m. OK GNU C++17 (64) TESTS 4 0 9625600
203396967 superstar_LL A April 25, 2023, 5:13 a.m. OK GNU C++17 (64) TESTS 4 15 0
203389864 hithu A April 25, 2023, 3:25 a.m. OK GNU C++17 (64) TESTS 4 15 0
203389649 hithu A April 25, 2023, 3:22 a.m. OK GNU C++17 (64) TESTS 4 15 0
203387412 8551 A April 25, 2023, 2:46 a.m. OK GNU C++20 (64) TESTS 4 0 0
203398489 IvanBorquez A April 25, 2023, 5:34 a.m. OK GNU C++20 (64) TESTS 4 0 0
203392108 nicolasalba A April 25, 2023, 3:58 a.m. OK GNU C++20 (64) TESTS 4 0 0
203391887 shift. A April 25, 2023, 3:54 a.m. OK GNU C++20 (64) TESTS 4 0 0
203391389 FlowRays A April 25, 2023, 3:46 a.m. OK GNU C++20 (64) TESTS 4 0 0
203391165 Jlyfish A April 25, 2023, 3:43 a.m. OK GNU C++20 (64) TESTS 4 0 0
203389166 mr-70da A April 25, 2023, 3:14 a.m. OK GNU C++20 (64) TESTS 4 0 0
203387991 khaledmohd202 A April 25, 2023, 2:56 a.m. OK GNU C++20 (64) TESTS 4 0 0
203387947 rashed_raihan A April 25, 2023, 2:55 a.m. OK GNU C++20 (64) TESTS 4 0 0
203386723 OkClinty A April 25, 2023, 2:34 a.m. OK GNU C++20 (64) TESTS 4 0 0
203391049 prabhanshubhowal A April 25, 2023, 3:42 a.m. OK Java 11 TESTS 4 186 0
203362370 vijender_8601 A April 24, 2023, 7:06 p.m. OK Java 11 TESTS 3 187 0
203378667 ananya29 A April 24, 2023, 11:38 p.m. OK Java 11 TESTS 4 202 0
203366781 hornedfoe A April 24, 2023, 7:57 p.m. OK Java 11 TESTS 3 202 0
203390933 optimus1369 A April 25, 2023, 3:40 a.m. OK Java 11 TESTS 4 280 0
203354893 biu_biu_biu A April 24, 2023, 5:54 p.m. OK Java 11 TESTS 3 296 0
203379148 teddyspyder A April 24, 2023, 11:50 p.m. OK Java 11 TESTS 4 311 0
203365002 Amrkollohm A April 24, 2023, 7:34 p.m. OK Java 11 TESTS 3 311 0
203346746 pung96192 A April 24, 2023, 4:59 p.m. OK Java 11 TESTS 3 311 0
203346986 brandonmejia A April 24, 2023, 5 p.m. OK Java 11 TESTS 3 326 0
203377714 Abdelrahman.M.3 A April 24, 2023, 11:15 p.m. OK Java 17 TESTS 4 124 0
203349706 maurya.rahul682 A April 24, 2023, 5:15 p.m. OK Java 17 TESTS 3 171 0
203345288 d2s2 A April 24, 2023, 4:53 p.m. OK Java 17 TESTS 3 171 0
203396508 aishwarykesarwani A April 25, 2023, 5:07 a.m. OK Java 17 TESTS 4 171 102400
203393880 TJ_Codes A April 25, 2023, 4:26 a.m. OK Java 17 TESTS 4 171 204800
203350274 michaelc592 A April 24, 2023, 5:18 p.m. OK Java 17 TESTS 3 186 0
203395202 Nagendravarma A April 25, 2023, 4:47 a.m. OK Java 17 TESTS 4 187 0
203377324 IceWolf898 A April 24, 2023, 11:07 p.m. OK Java 17 TESTS 4 233 0
203390514 Doni04 A April 25, 2023, 3:34 a.m. OK Java 17 TESTS 4 233 204800
203351930 Sumitsingh7 A April 24, 2023, 5:30 p.m. OK Java 17 TESTS 3 248 0
203354943 banurr A April 24, 2023, 5:54 p.m. OK Java 8 TESTS 3 77 0
203345949 Koka A April 24, 2023, 4:56 p.m. OK Java 8 TESTS 3 108 0
203394115 Camellia- A April 25, 2023, 4:29 a.m. OK Java 8 TESTS 4 124 0
203356763 Daly105 A April 24, 2023, 6:10 p.m. OK Java 8 TESTS 3 124 0
203350775 r3hab.rs A April 24, 2023, 5:21 p.m. OK Java 8 TESTS 3 124 0
203376927 Rafael.sam A April 24, 2023, 10:57 p.m. OK Java 8 TESTS 4 155 0
203354425 Sourav72 A April 24, 2023, 5:50 p.m. OK Java 8 TESTS 3 155 0
203400393 Quantum-Object A April 25, 2023, 6 a.m. OK Java 8 TESTS 4 202 0
203349697 Ishanraj A April 24, 2023, 5:15 p.m. OK Java 8 TESTS 3 202 0
203393889 Camellia- A April 25, 2023, 4:26 a.m. OK Java 8 TESTS 4 217 0
203346226 eneskayiklik A April 24, 2023, 4:57 p.m. OK Kotlin 1.7 TESTS 3 280 819200
203352884 illusion_ A April 24, 2023, 5:37 p.m. OK Kotlin 1.7 TESTS 3 358 19046400
203364612 iTuek A April 24, 2023, 7:30 p.m. OK MS C++ 2017 TESTS 3 62 0
203361405 shorya1835 A April 24, 2023, 6:56 p.m. OK MS C++ 2017 TESTS 3 62 0
203352185 valavshonok A April 24, 2023, 5:31 p.m. OK MS C++ 2017 TESTS 3 62 0
203350082 lovedeep0529 A April 24, 2023, 5:17 p.m. OK MS C++ 2017 TESTS 3 62 0
203398630 00013841876268 A April 25, 2023, 5:36 a.m. OK MS C++ 2017 TESTS 4 77 0
203363583 Aniket500 A April 24, 2023, 7:19 p.m. OK MS C++ 2017 TESTS 3 78 0
203395590 maihu02 A April 25, 2023, 4:53 a.m. OK PyPy 3 TESTS 4 202 6451200
203391897 mhr1812 A April 25, 2023, 3:55 a.m. OK PyPy 3 TESTS 4 218 6553600
203395113 Soralita A April 25, 2023, 4:45 a.m. OK PyPy 3 TESTS 4 280 5632000
203381801 xin2002 A April 25, 2023, 12:51 a.m. OK PyPy 3 TESTS 4 295 6041600
203355069 pennywise_ A April 24, 2023, 5:55 p.m. OK PyPy 3 TESTS 3 467 8806400
203383396 letsycode A April 25, 2023, 1:26 a.m. OK PyPy 3-64 TESTS 4 77 3686400
203361144 AyuAnchor A April 24, 2023, 6:53 p.m. OK PyPy 3-64 TESTS 3 77 3788800
203395289 bookofsky A April 25, 2023, 4:48 a.m. OK PyPy 3-64 TESTS 4 77 4300800
203354018 rmr A April 24, 2023, 5:46 p.m. OK PyPy 3-64 TESTS 3 93 3276800
203382213 nealzane A April 25, 2023, 1:01 a.m. OK PyPy 3-64 TESTS 4 93 4505600
203386307 Marquis03 A April 25, 2023, 2:25 a.m. OK PyPy 3-64 TESTS 4 93 5324800
203387484 little_bai A April 25, 2023, 2:47 a.m. OK PyPy 3-64 TESTS 4 108 4812800
203371181 dannn15 A April 24, 2023, 9:02 p.m. OK PyPy 3-64 TESTS 3 108 5734400
203351553 Kladrr A April 24, 2023, 5:27 p.m. OK PyPy 3-64 TESTS 3 109 4198400
203371336 dannn15 A April 24, 2023, 9:05 p.m. OK PyPy 3-64 TESTS 3 109 5632000
203384770 biltharesatyendra A April 25, 2023, 1:54 a.m. OK Python 2 TESTS 4 77 0
203345450 ZnakVlad A April 24, 2023, 4:54 p.m. OK Python 3 TESTS 3 46 0
203369356 Striver- A April 24, 2023, 8:34 p.m. OK Python 3 TESTS 3 61 0
203346031 yashaskumar08 A April 24, 2023, 4:56 p.m. OK Python 3 TESTS 3 61 0
203354828 Dinoh_Sandys A April 24, 2023, 5:53 p.m. OK Python 3 TESTS 3 61 614400
203397465 eeveeislove A April 25, 2023, 5:20 a.m. OK Python 3 TESTS 4 62 0
203347844 Lucky_Ctouyy A April 24, 2023, 5:04 p.m. OK Python 3 TESTS 3 62 0
203384744 night_coder2396 A April 25, 2023, 1:54 a.m. OK Python 3 TESTS 4 77 0
203384417 Shuja_SundarSTEM A April 25, 2023, 1:47 a.m. OK Python 3 TESTS 4 77 0
203383915 mALPANIpRANJUL A April 25, 2023, 1:37 a.m. OK Python 3 TESTS 4 77 0
203375390 Ded_Sandal gelisha A April 24, 2023, 10:23 p.m. OK Python 3 TESTS 4 77 0
203396165 cpchenpi A April 25, 2023, 5:01 a.m. OK Rust 2021 TESTS 4 0 0
203365742 wbars A April 24, 2023, 7:43 p.m. OK Rust 2021 TESTS 3 15 0

remove filters

Back to search problems