Submission #1219452

#TimeUsernameProblemLanguageResultExecution timeMemory
1219452sleepntsheepPortal (BOI24_portal)C11
0 / 100
23 ms1096 KiB
#include <stdio.h> #include <stdlib.h> #define N 200000 int n, x[N], y[N]; int main() { scanf("%d", &n); if (n == 1) { puts("-1"); return 0; } for (int i = 0; i < n; ++i) scanf("%d%d", x + i, y + i); printf("%d\n", abs(x[0] - x[1]) + abs(y[0] - y[1])); return 0; }

Compilation message (stderr)

Main.c: In function 'main':
Main.c:9:9: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |         scanf("%d", &n);
      |         ^~~~~~~~~~~~~~~
Main.c:15:17: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |                 scanf("%d%d", x + i, y + i);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...