Submission #63167

#TimeUsernameProblemLanguageResultExecution timeMemory
63167kjp4155두 박스 (KOI18_box)C++17
100 / 100
4 ms1000 KiB
#include <stdio.h> #include <algorithm> using namespace std; int main(){ int px1, py1, px2, py2; int qx1, qy1, qx2, qy2; scanf("%d%d%d%d",&px1,&py1,&px2,&py2); scanf("%d%d%d%d",&qx1,&qy1,&qx2,&qy2); int x_left = max(px1, qx1); int x_right = min(px2, qx2); int y_bottom = max(py1, qy1); int y_top = min(py2, qy2); int xdiff = x_right - x_left; int ydiff = y_top - y_bottom; if( xdiff > 0 && ydiff > 0 ) printf("FACE\n"); else if( xdiff == 0 && ydiff > 0 ) printf("LINE\n"); else if( xdiff > 0 && ydiff == 0 ) printf("LINE\n"); else if( xdiff == 0 && ydiff == 0 ) printf("POINT\n"); else printf("NULL\n"); }

Compilation message (stderr)

box.cpp: In function 'int main()':
box.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d%d",&px1,&py1,&px2,&py2);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
box.cpp:9:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d%d",&qx1,&qy1,&qx2,&qy2);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...