제출 #1013181

#제출 시각아이디문제언어결과실행 시간메모리
1013181amirhoseinfar1385게임 (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;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…