Submission #147467


Source Code Expand

#include<stdio.h>

int T, N, M;
long long A[100], B[100];

int can(){
    int i, j = 0;
    for(i=0;i<M;i++){
        for(;j<N&&!(A[j]<=B[i]&&B[i]<=A[j]+T);j++);
        if(j == N){return 0;}
        j++;
    }
    return 1;
}

int main(){
    int i;

    scanf("%d", &T);

    scanf("%d", &N);
    for(i=0;i<N;i++){
        scanf("%lld", A+i);
    }

    scanf("%d", &M);
    for(i=0;i<M;i++){
        scanf("%lld", B+i);
    }

    if(can()){
        puts("yes");
    }else{
        puts("no");
    }
}

Submission Info

Submission Time
Task C - おいしいたこ焼きの売り方
User iwashisnake
Language C (GCC 4.4.7)
Score 0
Code Size 541 Byte
Status RE
Exec Time 24 ms
Memory 808 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:19: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:21: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:23: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:26: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:28: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
RE × 35
Set Name Test Cases
All rand0.txt, rand1.txt, rand10.txt, rand11.txt, rand12.txt, rand13.txt, rand14.txt, rand15.txt, rand16.txt, rand17.txt, rand18.txt, rand19.txt, rand2.txt, rand20.txt, rand21.txt, rand22.txt, rand23.txt, rand24.txt, rand25.txt, rand26.txt, rand27.txt, rand28.txt, rand29.txt, rand3.txt, rand4.txt, rand5.txt, rand6.txt, rand7.txt, rand8.txt, rand9.txt, s1.txt, s2.txt, s3.txt, s4.txt, s5.txt
Case Name Status Exec Time Memory
rand0.txt RE 21 ms 700 KB
rand1.txt RE 20 ms 804 KB
rand10.txt RE 19 ms 704 KB
rand11.txt RE 18 ms 676 KB
rand12.txt RE 18 ms 700 KB
rand13.txt RE 18 ms 800 KB
rand14.txt RE 20 ms 716 KB
rand15.txt RE 24 ms 692 KB
rand16.txt RE 21 ms 700 KB
rand17.txt RE 21 ms 800 KB
rand18.txt RE 21 ms 700 KB
rand19.txt RE 20 ms 700 KB
rand2.txt RE 20 ms 704 KB
rand20.txt RE 19 ms 700 KB
rand21.txt RE 20 ms 700 KB
rand22.txt RE 20 ms 700 KB
rand23.txt RE 21 ms 792 KB
rand24.txt RE 21 ms 800 KB
rand25.txt RE 20 ms 808 KB
rand26.txt RE 20 ms 700 KB
rand27.txt RE 20 ms 696 KB
rand28.txt RE 20 ms 800 KB
rand29.txt RE 19 ms 696 KB
rand3.txt RE 20 ms 804 KB
rand4.txt RE 21 ms 672 KB
rand5.txt RE 20 ms 700 KB
rand6.txt RE 19 ms 800 KB
rand7.txt RE 21 ms 704 KB
rand8.txt RE 21 ms 704 KB
rand9.txt RE 19 ms 800 KB
s1.txt RE 20 ms 704 KB
s2.txt RE 21 ms 800 KB
s3.txt RE 22 ms 804 KB
s4.txt RE 19 ms 700 KB
s5.txt RE 19 ms 696 KB