Submission #18728663
Source Code Expand
use proconio::{fastout, input};
#[fastout]
fn main() {
input! {in_n:i32, in_m:usize, in_t:i32, in_abs: [[i32;2];in_m]};
let mut remain = in_n;
let mut time = 0;
for v in in_abs.iter() {
let a = v[0];
let b = v[1];
if a - time >= remain {
println!("No");
return;
}
remain -= a - time;
remain = (remain + (b - a)).min(in_n);
time = b;
}
if in_t - time >= remain {
println!("No");
} else {
println!("Yes");
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Smartphone Addiction |
| User | takedarts |
| Language | Rust (1.42.0) |
| Score | 200 |
| Code Size | 541 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 2200 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt |
| All | handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sample_05.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| handmade_00.txt | AC | 8 ms | 2032 KiB |
| handmade_01.txt | AC | 2 ms | 1996 KiB |
| random_00.txt | AC | 3 ms | 2164 KiB |
| random_01.txt | AC | 2 ms | 2140 KiB |
| random_02.txt | AC | 2 ms | 2196 KiB |
| random_03.txt | AC | 2 ms | 2124 KiB |
| random_04.txt | AC | 2 ms | 2084 KiB |
| random_05.txt | AC | 2 ms | 2104 KiB |
| random_06.txt | AC | 2 ms | 2024 KiB |
| random_07.txt | AC | 2 ms | 2144 KiB |
| random_08.txt | AC | 2 ms | 2116 KiB |
| random_09.txt | AC | 3 ms | 2184 KiB |
| random_10.txt | AC | 2 ms | 2096 KiB |
| random_11.txt | AC | 2 ms | 2052 KiB |
| random_12.txt | AC | 2 ms | 2132 KiB |
| random_13.txt | AC | 2 ms | 2112 KiB |
| sample_01.txt | AC | 2 ms | 2144 KiB |
| sample_02.txt | AC | 2 ms | 2080 KiB |
| sample_03.txt | AC | 2 ms | 1980 KiB |
| sample_04.txt | AC | 1 ms | 2000 KiB |
| sample_05.txt | AC | 2 ms | 2200 KiB |