Submission #132926

#TimeUsernameProblemLanguageResultExecution timeMemory
132926red1108두 박스 (KOI18_box)C++17
100 / 100
2 ms396 KiB
#include <bits/stdc++.h> using namespace std; struct rect{ int x, y, xx, yy; }a,b; int x, y; int main(){ scanf("%d %d %d %d", &a.x, &a.y, &a.xx, &a.yy); scanf("%d %d %d %d", &b.x, &b.y, &b.xx, &b.yy); if(a.x>b.x) swap(a,b); if(a.xx>b.x) x=2; else if(a.xx==b.x) x=1; if(a.y>b.y) swap(a,b); if(a.yy>b.y) y=2; else if(a.yy==b.y) y=1; if(x+y==4){ puts("FACE"); } else if(x+y==3){ puts("LINE"); } else if(x*y==1){ puts("POINT"); } else puts("NULL"); }

Compilation message (stderr)

box.cpp: In function 'int main()':
box.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d %d", &a.x, &a.y, &a.xx, &a.yy);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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", &b.x, &b.y, &b.xx, &b.yy);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...