Submission #884308

#TimeUsernameProblemLanguageResultExecution timeMemory
884308StefanL2005Game (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "game.h"
using namespace std;

int n;
vector<int> Nr;

void initialize(int k)
{
    n = k;
    Nr = vector<int> (n, 0);
}

int hasEdge(int u, int v)
{
    Nr[u]++; Nr[v]++;
    if (Nr[u] == n || Nr[v] = n)
        return 1;
    return 0;
}

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:17:20: error: lvalue required as left operand of assignment
   17 |     if (Nr[u] == n || Nr[v] = n)