제출 #82601

#제출 시각아이디문제언어결과실행 시간메모리
82601tjdgus4384두 박스 (KOI18_box)C++14
100 / 100
2 ms1068 KiB
#include<cstdio>
#include<algorithm>
using namespace std;

int main()
{
    int x1, x2, y1, y2;
    int r1, r2, c1, c2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    scanf("%d %d %d %d", &r1, &c1, &r2, &c2);
    if(x2 < r1 || r2 < x1 || y2 < c1 || c2 < y1)
    {
        printf("NULL");
    }
    else if((x2 == r1 || r2 == x1) && (y2 == c1 || c2 == y1))
    {
        printf("POINT");
    }
    else if(x2 == r1 || r2 == x1 || c2 == y1 || y2 == c1)
    {
        printf("LINE");
    }
    else
    {
        printf("FACE");
    }
    return 0;
}

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

box.cpp: In function 'int main()':
box.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
box.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d %d", &r1, &c1, &r2, &c2);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...