제출 #4615

#제출 시각아이디문제언어결과실행 시간메모리
4615cki86201게임 (IOI13_game)C++98
0 / 100
0 ms1164 KiB
#include "game.h" //10point; typedef long long ll; bool flag; ll idx[100][100]; ll gc(ll x,ll y){ ll tmp=-1; while(x!=tmp&&y)tmp=x,x=y,y=tmp%y; return x; } void init(int R, int C){ if(R>100||C>100)flag=1; } void update(int P, int Q, long long K){ idx[P][Q]=K; } long long calculate(int P, int Q, int U, int V){ if(flag)return -1; int i,j,ret=0; for(i=P;i<=U;i++)for(j=Q;j<=V;j++)ret=gc(ret,idx[i][j]); return ret; }
#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...