Submission #1090442

#TimeUsernameProblemLanguageResultExecution timeMemory
1090442vjudge1Game (IOI13_game)C++17
10 / 100
13093 ms9376 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; long long nzd(long long a, long long b) { if (b==0) return a; return nzd(b, a%b); } vector<vector<long long> > mat; void init(int r, int c) { mat.resize(r, vector<long long> (c, 0)); } void update(int r, int c, long long br) { mat[r][c]=br; } long long calculate(int x1, int y1, int x2, int y2) { long long rez=mat[x1][y1]; for (int i=x1;i<=x2;i++) for (int j=y1;j<=y2;j++) rez=nzd(rez, mat[i][j]); return rez; }
#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...