제출 #1259654

#제출 시각아이디문제언어결과실행 시간메모리
1259654comgaTramAnh게임 (IOI13_game)C++20
0 / 100
0 ms328 KiB
#include <bits/stdc++.h> #include "game.h" long long gcd2(long long X, long long Y) { long long tmp; while (X != Y && Y != 0) { tmp = X; X = Y; Y = tmp % Y; } return X; } long long a[105][105]; void init(int R, int C) { for (int i = 0; i < R; i++) { for (int j = 0; j < C; j++) { a[i][j] = 0; } } } void update(int P, int Q, long long K) { a[P][Q] = K; } long long calculate(int P, int Q, int U, int V) { long long ans = a[P][Q]; for (int i = P; i <= U; i++) { for (int j = Q; j <= V; j++) { ans = gcd2(ans, a[i][j]); } } return 42; }
#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...