Submission #282086

#TimeUsernameProblemLanguageResultExecution timeMemory
282086limabeansGame (IOI13_game)C++17
10 / 100
1 ms512 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; template<typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl using ll = long long; const ll mod = 1e9+7; const int maxn = 110; ll g[maxn][maxn]; 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) { /* ... */ assert(R<=100 && C<=100); // subtask 1 } void update(int P, int Q, long long K) { /* ... */ g[P][Q] = K; } long long calculate(int P, int Q, int U, int V) { /* ... */ ll res = 0; for (int i=P; i<=U; i++) { for (int j=Q; j<=V; j++) { res = gcd2(res, g[i][j]); } } return res; } /* int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); return 0; } */

Compilation message (stderr)

grader.c: In function 'int main()':
grader.c:18:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
   18 |  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...