Submission #18135077
Source Code Expand
n,w=map(int,input().split());m=200010;S=[0]*m;T=[0]*m
for _ in"_"*n:s,t,p=map(int,input().split());S[s]+=p;S[t]-=p
for i in range(m-1):T[i+1]=T[i]+S[i]
print('YNeos'[max(T)>w::2])
Submission Info
| Submission Time | |
|---|---|
| Task | D - Water Heater |
| User | snowrabbit |
| Language | Python (3.8.2) |
| Score | 400 |
| Code Size | 182 Byte |
| Status | AC |
| Exec Time | 487 ms |
| Memory | 23896 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 400 / 400 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.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, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| hand_01.txt | AC | 439 ms | 18208 KiB |
| hand_02.txt | AC | 420 ms | 18328 KiB |
| hand_03.txt | AC | 432 ms | 18516 KiB |
| hand_04.txt | AC | 428 ms | 18444 KiB |
| hand_05.txt | AC | 61 ms | 11716 KiB |
| random_01.txt | AC | 486 ms | 23584 KiB |
| random_02.txt | AC | 482 ms | 23584 KiB |
| random_03.txt | AC | 477 ms | 23768 KiB |
| random_04.txt | AC | 481 ms | 23684 KiB |
| random_05.txt | AC | 485 ms | 23752 KiB |
| random_06.txt | AC | 486 ms | 23740 KiB |
| random_07.txt | AC | 485 ms | 23896 KiB |
| random_08.txt | AC | 482 ms | 23896 KiB |
| random_09.txt | AC | 484 ms | 23572 KiB |
| random_10.txt | AC | 487 ms | 23580 KiB |
| sample_01.txt | AC | 65 ms | 11728 KiB |
| sample_02.txt | AC | 62 ms | 11880 KiB |
| sample_03.txt | AC | 69 ms | 18508 KiB |