Submission #29344221
Source Code Expand
use proconio::input;
fn main() {
input! {
t: usize,
n: usize,
lr: [(usize, usize); n],
};
let mut count = vec![0_i64; t + 1];
for (l, r) in lr {
count[l] += 1;
count[r] -= 1;
}
let mut p = count[0];
for i in (0..=t).skip(1) {
count[i] += p;
p = count[i];
}
for i in 0..t {
println!("{}", count[i]);
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | 041 - Convenience Store 2 |
| User | bouzuya |
| Language | Rust (1.42.0) |
| Score | 1000 |
| Code Size | 408 Byte |
| Status | AC |
| Exec Time | 808 ms |
| Memory | 20348 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 1000 / 1000 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample-01.txt |
| All | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, sample-01.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 93 ms | 14068 KiB |
| 01-02.txt | AC | 156 ms | 6244 KiB |
| 01-03.txt | AC | 497 ms | 14064 KiB |
| 01-04.txt | AC | 797 ms | 20296 KiB |
| 01-05.txt | AC | 808 ms | 20348 KiB |
| 01-06.txt | AC | 795 ms | 20320 KiB |
| 01-07.txt | AC | 26 ms | 11712 KiB |
| 01-08.txt | AC | 787 ms | 14060 KiB |
| 01-09.txt | AC | 783 ms | 14144 KiB |
| 01-10.txt | AC | 402 ms | 10152 KiB |
| 01-11.txt | AC | 714 ms | 7388 KiB |
| 01-12.txt | AC | 708 ms | 15704 KiB |
| 01-13.txt | AC | 231 ms | 6152 KiB |
| 01-14.txt | AC | 794 ms | 20224 KiB |
| 01-15.txt | AC | 793 ms | 20232 KiB |
| sample-01.txt | AC | 5 ms | 2060 KiB |