Submission #19724888
Source Code Expand
Copy
#include <iostream> using namespace std; int N,M,T,t,last; //N:初始电量,M:进了几个咖啡店 int main() { cin>>N>>M>>T; last=N; for(int i=1;i<=M;i++) { int A,B; cin>>A>>B; last-=A-t; if(last<1){ cout<<"No"; return 0; } t=B; last+=B-A; if(last>=N) last=N; } last-=T-t; if(last<1) cout<<"No"; else cout<<"Yes"; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Smartphone Addiction |
User | PETERZ |
Language | C++ (GCC 9.2.1) |
Score | 200 |
Code Size | 477 Byte |
Status | AC |
Exec Time | 13 ms |
Memory | 3584 KB |
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 | 10 ms | 3436 KB |
handmade_01.txt | AC | 3 ms | 3548 KB |
random_00.txt | AC | 5 ms | 3476 KB |
random_01.txt | AC | 4 ms | 3500 KB |
random_02.txt | AC | 2 ms | 3584 KB |
random_03.txt | AC | 4 ms | 3476 KB |
random_04.txt | AC | 2 ms | 3328 KB |
random_05.txt | AC | 3 ms | 3388 KB |
random_06.txt | AC | 2 ms | 3436 KB |
random_07.txt | AC | 2 ms | 3444 KB |
random_08.txt | AC | 2 ms | 3472 KB |
random_09.txt | AC | 2 ms | 3552 KB |
random_10.txt | AC | 2 ms | 3508 KB |
random_11.txt | AC | 5 ms | 3552 KB |
random_12.txt | AC | 4 ms | 3384 KB |
random_13.txt | AC | 13 ms | 3432 KB |
sample_01.txt | AC | 3 ms | 3472 KB |
sample_02.txt | AC | 2 ms | 3444 KB |
sample_03.txt | AC | 2 ms | 3476 KB |
sample_04.txt | AC | 5 ms | 3440 KB |
sample_05.txt | AC | 3 ms | 3500 KB |