# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
134401 | 2019-07-22T16:10:49 Z | arthurconmy | Game (IOI13_game) | C++14 | 0 ms | 0 KB |
#include <bits/stdc++.h> #ifndef ARTHUR_LOCAL #include "game.h" #endif using namespace std; using ll=long long; ll grid[100][100]; int r,c; void int(int r_r, int c_r) { r=r_r; c=c_r; } void update(int p, int q, ll k) { grid[p][q]=k; } ll calculate(int p, int q, int u, int v) { ll cur_gcd = 0; for(int i=p; i<=q; i++) { for(int j=u; j<=v; j++) { cur_gcd = __gcd(cur_gcd,grid[i][j]); } } return cur_gcd; }