Submission #656501

#TimeUsernameProblemLanguageResultExecution timeMemory
656501MateGiorbelidzeGame (IOI14_game)C++14
0 / 100
1 ms212 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define sc second #define pb push_back #define in insert int N; void initialize(int n) { N = n; } ll d[1501] , ans[1501][1501]; int hasEdge(int u, int v) { d[u]++; d[v]++; if (d[u] >= N || d[v] >= N) if (ans[u][v] == 1) return 1; else return 0; //cout<<d[u]<<'\n'; if (d[u] == N - 1 || d[v] == N - 1) { ans[u][v] = 1; return 1; } else return 0; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:24:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
   24 |  if (d[u] >= N || d[v] >= N)
      |     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...