제출 #962855

#제출 시각아이디문제언어결과실행 시간메모리
962855simona1230게임 (IOI13_game)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; int r,c; int a[128][128]; void init(int R,int C) { r=R; c=C; } void update(int x,int y,int v) { a[x][y]=v; } int calculate(int p,int q,int u,int v) { int ans=-1; for(int i=p;i<=u;i++) { for(int j=q;j<=v;j++) { if(a[i][j]!=0) { if(ans==-1)ans=a[i][j]; else ans=__gcd(ans,a[i][j]); } } } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

game.cpp:17:5: error: ambiguating new declaration of 'int calculate(int, int, int, int)'
   17 | int calculate(int p,int q,int u,int v)
      |     ^~~~~~~~~
In file included from game.cpp:2:
game.h:10:11: note: old declaration 'long long int calculate(int, int, int, int)'
   10 | long long calculate(int P, int Q, int U, int V);
      |           ^~~~~~~~~