# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
897973 | Faisal_Saqib | 게임 (IOI13_game) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <numeric>
using namespace std;
set<vector<long long>> have;
void init(int r, int c)
{
}
void update(int p, int q, long long k)
{
have.insert({p,q,k});
}
long long calculate(int p, int q, int u, int v)
{
long long g=0;
for(auto i:have)
if(p<=i[0] and i[0]<=u and q<=i[1] and i[1]<=v)
g=gcd(g,i[2]);
return g;
}