Submission #210697

#TimeUsernameProblemLanguageResultExecution timeMemory
210697peuch게임 (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1600; int ingrau[MAXN]; int N, t; void initialize(int n) { N = n; for(int i = 0; i < n; i++){ for(int j = i + 1; j < n; j++){ ingrau[i]++; ingrau[j]++; } } } int hasEdge(int u, int v){ //printf("\t%d\n", ponte[u][v]); if(ingrau[i] <= 2 || ingrau[j] <= 2) return 1; else{ ingrau[i]--; ingrau[j]--; return 0; } }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:22:12: error: 'i' was not declared in this scope
  if(ingrau[i] <= 2 || ingrau[j] <= 2) return 1;
            ^
game.cpp:22:30: error: 'j' was not declared in this scope
  if(ingrau[i] <= 2 || ingrau[j] <= 2) return 1;
                              ^
game.cpp:28:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^