제출 #113261

#제출 시각아이디문제언어결과실행 시간메모리
113261starwh03동전 게임 (KOI15_coin)C++14
100 / 100
30 ms512 KiB
#include<stdio.h>  
  
int main()  
{  
    int i,n,m,a,b,t=0;  
    scanf("%d %d",&n,&m);  
    for(i=1;i<=m;i++)  
    {  
        t=0;  
        scanf("%d %d",&a,&b);  
        if(a>b)  
        {  
            t=a;  
            a=b;  
            b=t;  
            t=1;  
        }  
        if(b-a-t<=n-b+1)  
            printf("1\n");  
        else  
            printf("0\n");  
    }  
    return 0;  
}  

컴파일 시 표준 에러 (stderr) 메시지

coin.cpp: In function 'int main()':
coin.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&n,&m);  
     ~~~~~^~~~~~~~~~~~~~~
coin.cpp:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d",&a,&b);  
         ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...