Submission #19725249
Source Code Expand
Copy
#include<stdio.h> int main(){ int N,m,T,i,c; float t; scanf("%d%d%d",&N,&m,&T); c=N; int a[m],b[m]; for(i=0;i<m;i++) scanf("%d%d",&a[i],&b[i]); t=0.5; for(i=0;i<m;i++) { for(;t<a[i];t++) { N--; if(N==0) { printf("No"); break;} } if(N==0) break; for(;t<=b[i];t++) { N++; if(N==c) break;} if(i==m-1) { for(;t<=T;t++) { N--; if(N==0) { printf("No"); break;} } } if(N==0) break; } if(t==T+0.5) printf("Yes"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Smartphone Addiction |
User | VenkataKaveri |
Language | C (GCC 9.2.1) |
Score | 0 |
Code Size | 469 Byte |
Status | WA |
Exec Time | 850 ms |
Memory | 1740 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:5:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] 5 | scanf("%d%d%d",&N,&m,&T); | ^~~~~~~~~~~~~~~~~~~~~~~~ ./Main.c:9:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] 9 | scanf("%d%d",&a[i],&b[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | 2 ms | 1736 KB |
handmade_01.txt | AC | 1 ms | 1728 KB |
random_00.txt | AC | 81 ms | 1728 KB |
random_01.txt | WA | 114 ms | 1660 KB |
random_02.txt | AC | 31 ms | 1564 KB |
random_03.txt | WA | 44 ms | 1740 KB |
random_04.txt | WA | 141 ms | 1556 KB |
random_05.txt | WA | 850 ms | 1724 KB |
random_06.txt | AC | 23 ms | 1556 KB |
random_07.txt | WA | 166 ms | 1684 KB |
random_08.txt | AC | 36 ms | 1680 KB |
random_09.txt | AC | 42 ms | 1628 KB |
random_10.txt | WA | 48 ms | 1680 KB |
random_11.txt | WA | 69 ms | 1736 KB |
random_12.txt | WA | 46 ms | 1684 KB |
random_13.txt | AC | 47 ms | 1688 KB |
sample_01.txt | AC | 1 ms | 1652 KB |
sample_02.txt | AC | 1 ms | 1564 KB |
sample_03.txt | AC | 1 ms | 1556 KB |
sample_04.txt | AC | 1 ms | 1688 KB |
sample_05.txt | AC | 1 ms | 1652 KB |