Submission #29944

#TimeUsernameProblemLanguageResultExecution timeMemory
29944inqrGame (IOI13_game)C++14
10 / 100
13000 ms33424 KiB
#include "game.h" #include <bits/stdc++.h> #define pb push_back #define mp make_pair #define rt insert #define st first #define nd second #define ll long long #define DB printf("debug\n"); using namespace std; long long g[2005][2005]; int r,c; long long gcd2(long long X, long long Y) { long long tmp; while (X != Y && Y != 0) { tmp = X; X = Y; Y = tmp % Y; } return X; } void init(int R, int C) {r=R;c=C;} void update(int P, int Q, long long K){g[P][Q]=K;} long long calculate(int P, int Q, int U, int V) { long long ans=g[P][Q]; for(int i=P;i<=U;i++){ for(int j=Q;j<=V;j++){ ans=gcd2(ans,g[i][j]); } } return ans; }

Compilation message (stderr)

grader.c: In function 'int main()':
grader.c:18:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
  int res;
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...