2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams)

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
2038 2024-2025 ICPC, NERC, Southern and Volga Russian Regional Contest (Unrated, Online Mirror, ICPC Rules, Preferably Teams) FINISHED False 18000 44479523 Nov. 18, 2024, 10:35 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 8754 ) J Waiting for... PROGRAMMING greedy implementation 800

Monocarp is waiting for a bus at the bus stop. Unfortunately, there are many people who want to ride a bus too. You are given a list of events of two types: B (b_i) — a bus with (b_i) free seats arrives at the stop; P (p_i) — (p_i) people arrive at the stop. These events are listed in a chronological order. When a bus arrives, the following happens. All people at the bus stop (except for Monocarp) try to enter the bus. If there are enough free seats for all of them, then they all enter the bus. Otherwise, some people remain at the bus stop (the number of people who enter the bus is equal to the number of free seats). If there is still at least one free seat after all people (except for Monocarp) enter the bus, then Monocarp can decide to enter this bus as well (but he might choose to wait for another bus). For each bus, you have to determine if it is possible for Monocarp to take that bus. The first line contains one integer (n) ((1 \le n \le 10^3)) — the number of events. Then, (n) lines follow. The (i)-th of them contains the description of the (i)-th event in one of the two following formats: B (b_i) ((1 \le b_i \le 10^6)) — a bus with (b_i) free seats arrives at the stop; P (p_i) ((1 \le p_i \le 10^6)) — (p_i) people arrive at the stop. Additional constraint on the input: there is at least one event of type B . For each event of type B , print YES if it is possible for Monocarp to take the corresponding bus, or NO otherwise (case-insensitive).

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
292190215 chinnus J Nov. 18, 2024, 1:25 p.m. OK C# 10 TESTS 40 108 0 800
292161177 whopassby zrnstnsr __baozii__ J Nov. 18, 2024, 10:50 a.m. OK C# 10 TESTS 40 217 3993600 800

remove filters

Back to search problems