제출 #390238

#제출 시각아이디문제언어결과실행 시간메모리
390238rainboy로봇 (IOI13_robots)C11
14 / 100
149 ms4252 KiB
#include "robots.h" int putaway(int n, int m, int t, int xx[], int yy[], int ww[], int ss[]) { if (t == 2 && n + m == 2) { static int can[2][2]; int h, i; for (h = 0; h < 2; h++) for (i = 0; i < n + m; i++) if ((i < n ? ww[h] < xx[i] : ss[h] < yy[i - n])) can[h][i] = 1; if (!can[0][0] && !can[0][1] || !can[1][0] && !can[1][1]) return -1; if (can[0][0] && can[1][1] || can[0][1] && can[1][0]) return 1; return 2; } else return 42; }

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

robots.c: In function 'putaway':
robots.c:12:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   12 |   if (!can[0][0] && !can[0][1] || !can[1][0] && !can[1][1])
      |       ~~~~~~~~~~~^~~~~~~~~~~~~
robots.c:14:17: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   14 |   if (can[0][0] && can[1][1] || can[0][1] && can[1][0])
      |       ~~~~~~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...