Submission #962855

#TimeUsernameProblemLanguageResultExecution timeMemory
962855simona1230Game (IOI13_game)C++17
Compilation error
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; }

Compilation message (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);
      |           ^~~~~~~~~