Submission #781126

#TimeUsernameProblemLanguageResultExecution timeMemory
781126caganyanmazGame (IOI13_game)C++17
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> #include "game.h" #define pb push_back //#define DEBUGGING void __print(int i) { std::cerr << i; } void __print(long long int i) { std::cerr << i; } void __print(const char *c) { std::cerr << c; } template<typename T> void __print(T& t) { std::cerr <<"{";int f = 0; for (auto& i : t) { std::cerr << ((f++) ? ", ": ""); __print(i); } std::cerr << "}"; } void _print() { std::cerr << "]\n"; } template<typename T, typename... V> void _print(T t, V... v) { __print(t); if (sizeof...(v)) std::cerr << ", "; _print(v...); } #ifdef DEBUGGING #define debug(x...) std::cerr << "[" << (#x) << "] = ["; _print(x) #else #define debug(x...) #endif long long gcd(long long X, long long Y) { long long tmp; while (X != Y && Y != 0) { tmp = X; X = Y; Y = tmp % Y; } return X; } int R, C; constexpr static int MXSIZE = 1000; int data[MXSIZE][MXSIZE]; void init(int r, int c) { R = r; C = c; } void update(int P, int Q, long long int K) { data[P][Q] = K; } long long int calculate(int P, int Q, int U, int V) { long long int res = 0; for (int i = P; i <= U; i++) for (int j = Q; j <= V; j++) res = gcd(res, data[i][j]); return 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...