Codeforces Round 895 (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
1872 Codeforces Round 895 (Div. 3) FINISHED False 8100 37725899 Sept. 7, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 28097 ) B The Corridor or There and Back Again PROGRAMMING implementation

B"You are in a corridor that extends infinitely to the right, divided into square rooms. You start in room 1 , proceed to room k , and then return to room 1 . You can choose the value of k . Moving to an adjacent room takes 1 second. Additionally, there are n traps in the corridor: the i -th trap is located in room d_i and will be activated s_i seconds after you enter the room boldsymbol{d_i} . Once a trap is activated, you cannot enter or exit a room with that trap. Determine the maximum value of k that allows you to travel from room 1 to room k and then return to room 1 safely. For instance, if n=1 and d_1=2, s_1=2 , you can proceed to room k=2 and return safely (the trap will activate at the moment 1+s_1=1+2=3 , it can't prevent you to return back). But if you attempt to reach room k=3 , the trap will activate at the moment 1+s_1=1+2=3 , preventing your return (you would attempt to enter room 2 on your way back at second 3 , but the activated trap would block you). Any larger value for k is also not feasible. Thus, the answer is k=2 . The first line of the input contains an integer t ( 1 <= t <= 1000 ) -- the number of test cases. The descriptions of the test cases follow. The first line of each test case description contains an integer n ( 1 <= n <= 100 ) -- the number of traps. The following n lines of each test case description present two integers d_i and s_i ( 1 <= d_i, s_i <= 200 ) -- the parameters of a trap (you must leave room d_i strictly before s_i seconds have passed since entering this room). It's possible for multiple traps to occupy a single room (the values of d_i can be repeated). For each test case, print the maximum value of k that allows you to travel to room k and return to room 1 without encountering an active trap"...

Tutorials

Codeforces Round 895 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
222381161 bluemegane B Sept. 8, 2023, 12:54 a.m. OK C# 8 TESTS 4 93 3072000
222377665 zxyz B Sept. 7, 2023, 11:22 p.m. OK Clang++17 Diagnostics TESTS 4 311 2048000
222392436 rafcoders B Sept. 8, 2023, 4:19 a.m. OK Clang++17 Diagnostics TESTS 4 374 5222400
222350025 sreejanarsingoju B Sept. 7, 2023, 5:20 p.m. OK Clang++17 Diagnostics TESTS 4 374 7372800
222385039 Redpo B Sept. 8, 2023, 2:16 a.m. OK Clang++20 Diagnostics TESTS 4 280 0
222365647 jhmm1905 B Sept. 7, 2023, 7:47 p.m. OK GNU C11 TESTS 4 15 0
222370849 beihaihaihai B Sept. 7, 2023, 8:59 p.m. OK GNU C11 TESTS 4 15 1638400
222361750 DarkWillow B Sept. 7, 2023, 7 p.m. OK GNU C11 TESTS 4 31 0
222376603 mayankmittal.29 B Sept. 7, 2023, 10:54 p.m. OK GNU C11 TESTS 4 31 0
222388910 TheWhitePolo B Sept. 8, 2023, 3:24 a.m. OK GNU C11 TESTS 4 31 0
222349078 zzh0422 B Sept. 7, 2023, 5:15 p.m. OK GNU C11 TESTS 4 31 0
222391573 freshhhhh B Sept. 8, 2023, 4:07 a.m. OK GNU C11 TESTS 4 31 0
222386931 abdullahazeem B Sept. 8, 2023, 2:51 a.m. OK GNU C11 TESTS 4 46 0
222365773 yssy B Sept. 7, 2023, 7:48 p.m. OK GNU C++14 TESTS 4 15 0
222365363 vlade087 B Sept. 7, 2023, 7:44 p.m. OK GNU C++14 TESTS 4 15 0
222354904 maxcruickshanks B Sept. 7, 2023, 5:55 p.m. OK GNU C++14 TESTS 4 15 0
222347311 LYT0122 B Sept. 7, 2023, 5:06 p.m. OK GNU C++14 TESTS 4 15 0
222381626 hahel B Sept. 8, 2023, 1:05 a.m. OK GNU C++14 TESTS 4 15 0
222367826 aditya0610 B Sept. 7, 2023, 8:14 p.m. OK GNU C++14 TESTS 4 15 0
222386234 shehab_rakib B Sept. 8, 2023, 2:37 a.m. OK GNU C++14 TESTS 4 15 102400
222368394 JCrossover_14 B Sept. 7, 2023, 8:22 p.m. OK GNU C++14 TESTS 4 15 102400
222380652 amekizzz B Sept. 8, 2023, 12:41 a.m. OK GNU C++14 TESTS 4 15 204800
222388388 Zzzyz B Sept. 8, 2023, 3:15 a.m. OK GNU C++14 TESTS 4 15 3993600
222383435 liji-will B Sept. 8, 2023, 1:45 a.m. OK GNU C++17 TESTS 4 15 0
222382255 SoobinHoangSon B Sept. 8, 2023, 1:20 a.m. OK GNU C++17 TESTS 4 15 0
222399707 chraac B Sept. 8, 2023, 5:45 a.m. OK GNU C++17 TESTS 4 15 0
222400988 abhiy2k B Sept. 8, 2023, 5:56 a.m. OK GNU C++17 TESTS 4 15 0
222394083 obscurous01 B Sept. 8, 2023, 4:36 a.m. OK GNU C++17 TESTS 4 15 0
222390766 Pari_na_kisu B Sept. 8, 2023, 3:54 a.m. OK GNU C++17 TESTS 4 15 0
222390337 huyyy B Sept. 8, 2023, 3:47 a.m. OK GNU C++17 TESTS 4 15 0
222387199 goelarnav12 B Sept. 8, 2023, 2:55 a.m. OK GNU C++17 TESTS 4 15 0
222396353 mannthehacker B Sept. 8, 2023, 5 a.m. OK GNU C++17 TESTS 4 15 0
222391811 vikaskr.shiv B Sept. 8, 2023, 4:10 a.m. OK GNU C++17 TESTS 4 15 0
222363414 deepanshusau B Sept. 7, 2023, 7:20 p.m. OK GNU C++17 (64) TESTS 4 0 0
222396478 Higuchi B Sept. 8, 2023, 5:01 a.m. OK GNU C++17 (64) TESTS 4 0 0
222385112 crucal B Sept. 8, 2023, 2:17 a.m. OK GNU C++17 (64) TESTS 4 15 0
222397949 pks18 B Sept. 8, 2023, 5:22 a.m. OK GNU C++17 (64) TESTS 4 15 0
222397396 nerrdd_nahh B Sept. 8, 2023, 5:14 a.m. OK GNU C++17 (64) TESTS 4 15 0
222390405 sadhukhansubham588 B Sept. 8, 2023, 3:48 a.m. OK GNU C++17 (64) TESTS 4 15 0
222384662 tazul110111 B Sept. 8, 2023, 2:10 a.m. OK GNU C++17 (64) TESTS 4 15 0
222368483 z2reda B Sept. 7, 2023, 8:23 p.m. OK GNU C++17 (64) TESTS 4 15 0
222366985 akdfjhafjlk B Sept. 7, 2023, 8:03 p.m. OK GNU C++17 (64) TESTS 4 15 0
222366757 kematian B Sept. 7, 2023, 8:01 p.m. OK GNU C++17 (64) TESTS 4 15 0
222382459 QianSui B Sept. 8, 2023, 1:25 a.m. OK GNU C++20 (64) TESTS 4 0 0
222391189 Sanath_Kulla B Sept. 8, 2023, 4:01 a.m. OK GNU C++20 (64) TESTS 4 0 0
222395758 Akimizussq B Sept. 8, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 4 0 0
222351511 islamrakibul9274 B Sept. 7, 2023, 5:30 p.m. OK GNU C++20 (64) TESTS 4 0 0
222364515 Mohamed-Hassan-Esmael B Sept. 7, 2023, 7:33 p.m. OK GNU C++20 (64) TESTS 4 0 0
222377375 Plabs B Sept. 7, 2023, 11:14 p.m. OK GNU C++20 (64) TESTS 4 0 0
222379375 Adam_GS B Sept. 8, 2023, 12:09 a.m. OK GNU C++20 (64) TESTS 4 0 0
222400835 4Rt8 B Sept. 8, 2023, 5:55 a.m. OK GNU C++20 (64) TESTS 4 15 0
222400833 einekleine17 B Sept. 8, 2023, 5:55 a.m. OK GNU C++20 (64) TESTS 4 15 0
222400951 Rumman023 B Sept. 8, 2023, 5:56 a.m. OK GNU C++20 (64) TESTS 4 15 0
222350613 vijender_8601 B Sept. 7, 2023, 5:23 p.m. OK Java 11 TESTS 4 171 0
222368949 theSSS B Sept. 7, 2023, 8:29 p.m. OK Java 11 TESTS 4 187 0
222352565 Harwinvanak B Sept. 7, 2023, 5:37 p.m. OK Java 11 TESTS 4 187 0
222376984 KickButtowski008 B Sept. 7, 2023, 11:04 p.m. OK Java 11 TESTS 4 295 0
222386435 biu_biu_biu B Sept. 8, 2023, 2:41 a.m. OK Java 11 TESTS 4 326 0
222376723 eslamms B Sept. 7, 2023, 10:57 p.m. OK Java 17 TESTS 4 171 409600
222391743 sid234890 B Sept. 8, 2023, 4:09 a.m. OK Java 17 TESTS 4 171 614400
222352987 iamdimonis B Sept. 7, 2023, 5:40 p.m. OK Java 17 TESTS 4 186 307200
222395461 jkslyk B Sept. 8, 2023, 4:50 a.m. OK Java 17 TESTS 4 187 409600
222371087 TheLastDanceCoder B Sept. 7, 2023, 9:03 p.m. OK Java 17 TESTS 4 202 307200
222391754 vikash_45 B Sept. 8, 2023, 4:09 a.m. OK Java 17 TESTS 4 218 102400
222351021 sagnikghoshcr7 B Sept. 7, 2023, 5:26 p.m. OK Java 17 TESTS 4 218 614400
222387731 mena-rizkalla B Sept. 8, 2023, 3:05 a.m. OK Java 17 TESTS 4 233 0
222359063 hamossa B Sept. 7, 2023, 6:31 p.m. OK Java 17 TESTS 4 248 409600
222389040 rdhakar246 B Sept. 8, 2023, 3:26 a.m. OK Java 17 TESTS 4 248 614400
222379918 cwjjbbs B Sept. 8, 2023, 12:22 a.m. OK Java 8 TESTS 4 93 0
222366751 gagan_6730 B Sept. 7, 2023, 8:01 p.m. OK Java 8 TESTS 4 93 0
222379991 Safawt B Sept. 8, 2023, 12:24 a.m. OK Java 8 TESTS 4 108 0
222369916 sourav2999 B Sept. 7, 2023, 8:44 p.m. OK Java 8 TESTS 4 108 0
222374939 ZakiKurdya B Sept. 7, 2023, 10:16 p.m. OK Java 8 TESTS 4 124 0
222359548 Sumitsingh7 B Sept. 7, 2023, 6:36 p.m. OK Java 8 TESTS 4 124 6041600
222399091 klsane04 B Sept. 8, 2023, 5:37 a.m. OK Java 8 TESTS 4 233 0
222399079 _UPG_ B Sept. 8, 2023, 5:37 a.m. OK Java 8 TESTS 4 233 0
222388530 xielaopai B Sept. 8, 2023, 3:17 a.m. OK Java 8 TESTS 4 233 0
222387475 achyut88 B Sept. 8, 2023, 3 a.m. OK Java 8 TESTS 4 280 0
222386834 Nanase_ai B Sept. 8, 2023, 2:49 a.m. OK MS C++ 2017 TESTS 4 61 0
222364976 Roma_the_king B Sept. 7, 2023, 7:38 p.m. OK MS C++ 2017 TESTS 4 62 0
222353945 kiNkraD B Sept. 7, 2023, 5:47 p.m. OK MS C++ 2017 TESTS 4 62 0
222395354 Hephaestion B Sept. 8, 2023, 4:49 a.m. OK MS C++ 2017 TESTS 4 62 102400
222385888 HackerFanArsenal B Sept. 8, 2023, 2:32 a.m. OK MS C++ 2017 TESTS 4 77 0
222353406 ooomm B Sept. 7, 2023, 5:43 p.m. OK MS C++ 2017 TESTS 4 77 1638400
222374498 majddd B Sept. 7, 2023, 10:06 p.m. OK MS C++ 2017 TESTS 4 78 0
222351665 FakeDuck B Sept. 7, 2023, 5:31 p.m. OK MS C++ 2017 TESTS 4 78 0
222348420 vikas.pachisia B Sept. 7, 2023, 5:12 p.m. OK MS C++ 2017 TESTS 4 78 0
222399479 FoKhAb B Sept. 8, 2023, 5:42 a.m. OK MS C++ 2017 TESTS 4 93 0
222364411 fizikst B Sept. 7, 2023, 7:31 p.m. OK Node.js TESTS 4 109 11571200
222377684 grente B Sept. 7, 2023, 11:22 p.m. OK PyPy 3 TESTS 4 155 3891200
222390660 ezahid1662 B Sept. 8, 2023, 3:52 a.m. OK PyPy 3 TESTS 4 155 4198400
222362242 iedfa B Sept. 7, 2023, 7:06 p.m. OK PyPy 3 TESTS 4 186 4710400
222386859 stan23456 B Sept. 8, 2023, 2:49 a.m. OK PyPy 3 TESTS 4 249 6656000
222391476 satanclaws B Sept. 8, 2023, 4:05 a.m. OK PyPy 3 TESTS 4 499 6348800
222351661 jvatsal0709 B Sept. 7, 2023, 5:31 p.m. OK PyPy 3 TESTS 4 514 6348800
222354101 MShah2003 B Sept. 7, 2023, 5:48 p.m. OK PyPy 3 TESTS 4 514 6860800
222350683 MShah2003 B Sept. 7, 2023, 5:24 p.m. OK PyPy 3 TESTS 4 514 6860800
222367235 Anupam_1925 B Sept. 7, 2023, 8:07 p.m. OK PyPy 3 TESTS 4 530 9011200
222348163 snehithareddy B Sept. 7, 2023, 5:11 p.m. OK PyPy 3 TESTS 4 561 7475200
222371273 Gluggs B Sept. 7, 2023, 9:07 p.m. OK PyPy 3-64 TESTS 4 78 5427200
222385003 harshk_52 B Sept. 8, 2023, 2:16 a.m. OK PyPy 3-64 TESTS 4 93 3686400
222369456 gardengnome B Sept. 7, 2023, 8:36 p.m. OK PyPy 3-64 TESTS 4 108 3686400
222358002 I_Am_That B Sept. 7, 2023, 6:21 p.m. OK PyPy 3-64 TESTS 4 108 3891200
222353876 Quick-One B Sept. 7, 2023, 5:47 p.m. OK PyPy 3-64 TESTS 4 108 4505600
222393501 bluecloud B Sept. 8, 2023, 4:30 a.m. OK PyPy 3-64 TESTS 4 109 3891200
222377167 riroan B Sept. 7, 2023, 11:08 p.m. OK PyPy 3-64 TESTS 4 139 5734400
222352659 alexwice B Sept. 7, 2023, 5:38 p.m. OK PyPy 3-64 TESTS 4 139 6246400
222347374 bkdn23.thuonguyenvan B Sept. 7, 2023, 5:07 p.m. OK PyPy 3-64 TESTS 4 139 6758400
222346741 bkdn23.thuonguyenvan B Sept. 7, 2023, 5:04 p.m. OK PyPy 3-64 TESTS 4 140 7372800
222388332 ProCoder12 B Sept. 8, 2023, 3:14 a.m. OK Python 3 TESTS 4 77 0
222374801 cohadar B Sept. 7, 2023, 10:12 p.m. OK Python 3 TESTS 4 93 0
222395732 Draq.eth B Sept. 8, 2023, 4:53 a.m. OK Python 3 TESTS 4 108 0
222363907 sujan_21 B Sept. 7, 2023, 7:25 p.m. OK Python 3 TESTS 4 108 0
222362772 sevlll777 B Sept. 7, 2023, 7:12 p.m. OK Python 3 TESTS 4 108 0
222353261 Umar_SundarSTEM B Sept. 7, 2023, 5:42 p.m. OK Python 3 TESTS 4 108 0
222351402 narayanchandra952 B Sept. 7, 2023, 5:29 p.m. OK Python 3 TESTS 4 108 0
222347733 sjwl07 B Sept. 7, 2023, 5:08 p.m. OK Python 3 TESTS 4 108 0
222372314 CoderN B Sept. 7, 2023, 9:25 p.m. OK Python 3 TESTS 4 109 0
222366219 MiguelCanais B Sept. 7, 2023, 7:54 p.m. OK Python 3 TESTS 4 109 0
222367001 0x81 B Sept. 7, 2023, 8:03 p.m. OK Ruby 3 TESTS 4 280 819200
222354964 0x81 B Sept. 7, 2023, 5:55 p.m. OK Ruby 3 TESTS 4 312 819200
222358081 matheusdacach B Sept. 7, 2023, 6:22 p.m. OK Rust 2021 TESTS 4 0 0
222372795 TecTrixer B Sept. 7, 2023, 9:33 p.m. OK Rust 2021 TESTS 4 15 0

remove filters

Back to search problems