Submission #384142

#TimeUsernameProblemLanguageResultExecution timeMemory
384142alishahali1382Game (IOI13_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; #define debug(x) {cerr<<#x<<"="<<x<<"\n";} #define debug2(x, y) {cerr<<#x<<", "<<#y<<" = "<<x<<", "<<y<<"\n";} #define debugp(p) {cerr<<#p" = {"<<p.first<<", "<<p.second<<"}\n";} #define pb push_back #define all(x) x.begin(), x.end() ll gcd2(ll X, ll Y) { ll tmp; while (X != Y && Y != 0) { tmp = X; X = Y; Y = tmp % Y; } return X; } const int SEGSZ=7000000, SEGSZ2=300000; ll A[100][100]; void init(int nn, int mm) { n=nn; m=mm; } void update(int P, int Q, ll K) { A[P][Q]=K; } ll calculate(int P, int Q, int U, int V) { ans=0; for (int i=P; i<=U; i++) for (int j=Q; j<=V; j++) ans=gcd2(ans, A[i][j]); return ans; }

Compilation message (stderr)

game.cpp: In function 'void init(int, int)':
game.cpp:30:5: error: 'n' was not declared in this scope; did you mean 'nn'?
   30 |     n=nn;
      |     ^
      |     nn
game.cpp:31:5: error: 'm' was not declared in this scope; did you mean 'mm'?
   31 |     m=mm;
      |     ^
      |     mm
game.cpp: In function 'll calculate(int, int, int, int)':
game.cpp:39:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   39 |     ans=0;
      |     ^~~
      |     abs