Submission #962858

#TimeUsernameProblemLanguageResultExecution timeMemory
962858simona1230Game (IOI13_game)C++17
0 / 100
1 ms512 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; int r,c; long long a[128][128]; void init(int R,int C) { r=R; c=C; } void update(int x,int y,long long v) { a[x][y]=v; } long long calculate(int p,int q,int u,int v) { long long 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; }
#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...