Submission #386663

#TimeUsernameProblemLanguageResultExecution timeMemory
386663ismoilovGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).begin(), (x).end()
#define fp(a,i,c) for(int (a) = (i); (a) < (c); (a)++)
#define fpp(a,i,c) for(int (a) = (i); (a) <= (c); (a)++)
#define fv(c) for(int (a) = (1); (a) <= (c); (a)++)
#define fz(c) for(int (a) = (0); (a) < (c); (a)++)
#define fm(a,i,c) for(int (a) = (i); (a) > (c); (a)--)
#define fmm(a,i,c) for(int (a) = (i); (a) >= (c); (a)--)
#define pb push_back
#define in insert
#define ss second
#define ff first
int v[1501];
void initialize(int n) {

}

int hasEdge(int x, int y)
{
	if(x > y)
		swap(x, y);
	return ++v[y] == v;
}

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:29:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |  return ++v[y] == v;
      |                   ^