# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
655768 | someone | Bomb (IZhO17_bomb) | C++14 | 1106 ms | 103672 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
//#define int long long
using namespace std;
struct Alien {
int t, id;
};
const int N = 2500 + 42, INF = 1e9 + 42;
bool alien[N*N];
vector<Alien> add;
int n, m, t[N], sz[N*N];
int F(int i) {
if(sz[i] < 0)
return i;
return sz[i] = F(sz[i]);
}
inline int getSz(int i) {
return -sz[F(i)];
}
void U(int a, int b) {
a = F(a), b = F(b);
if(a == b)
return;
if(-sz[a] < -sz[b])
swap(a, b);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |