Submission #145578

#TimeUsernameProblemLanguageResultExecution timeMemory
145578surface03두 박스 (KOI18_box)C++14
100 / 100
2 ms504 KiB
#include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
    int sx,sy,ex,ey,x,y,xx,yy;
    scanf("%d%d%d%d%d%d%d%d",&sx,&sy,&ex,&ey,&x,&y,&xx,&yy);
    if(sx>x){
        swap(sx,x);
        swap(sy,y);
        swap(ex,xx);
        swap(ey,yy);
    }
    if(ey<y||sy>yy||ex<x){
        printf("NULL");
    }
    else if((ey==y&&ex==x)||(ex==x&&sy==yy)){
        printf("POINT");
    }
    else if(ey==y||sy==yy||ex==x){
        printf("LINE");
    }
    else{
        printf("FACE");
    }
}

Compilation message (stderr)

box.cpp: In function 'int main()':
box.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d%d%d%d%d%d",&sx,&sy,&ex,&ey,&x,&y,&xx,&yy);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...