답안 #30907

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
30907 2017-08-01T02:52:07 Z kajebiii 게임 (IOI14_game) C++14
컴파일 오류
0 ms 0 KB
#include "game.h"

const int MAX_N = 2e3 + 100;

int cnt = 0;
int Nr[MAX_N];
void initialize(int n) {
    cnt = 0;
    for(int i=0; i<n; i++) Nr[i] = 0;
}

int hasEdge(int u, int v) {
    return ++Nr[max(u, v)] == max(u, v);
}

Compilation message

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:13:25: error: 'max' was not declared in this scope
     return ++Nr[max(u, v)] == max(u, v);
                         ^