Submission #390236

#TimeUsernameProblemLanguageResultExecution timeMemory
390236rainboyRobots (IOI13_robots)C11
0 / 100
153 ms15248 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[i] < 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; }

Compilation message (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...