Submission #1013181

#TimeUsernameProblemLanguageResultExecution timeMemory
1013181amirhoseinfar1385Game (IOI13_game)C++17
10 / 100
1 ms504 KiB
#include "game.h" #include<bits/stdc++.h> using namespace std; const int maxn=100+10; long long all[maxn][maxn]; long long gcd(long long a,long long b){ if(a==0){ return b; } if(b==0){ return a; } return gcd(b,a%b); } void init(int R, int C) { //hehe } void update(int P, int Q, long long K) { all[P][Q]=K; } long long calculate(int P, int Q, int U, int V) { long long now=0; for(int i=P;i<=U;i++){ for(int j=Q;j<=V;j++){ now=gcd(now,all[i][j]); } } return now; }
#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...