# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
334938 | ronnith | Konj (COCI19_konj) | C++14 | 162 ms | 17516 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define trav(a, b) for(auto a : b)
#define mk make_pair
#define f first
#define s second
#define vi vector<int>
#define pb push_back
using namespace std;
struct Line{
int x1, y1;
int x2, y2;
Line(){}
Line(int a, int b, int c, int d){
x1 = a;
y1 = b;
x2 = c;
y2 = d;
}
};
struct DSU{
int cnt;vi e;DSU(int N){cnt = N;e = vi(N,-1);}
int root(int x){return (e[x] < 0) ? x : e[x] = root(e[x]);}
bool same(int x,int y){return root(x) == root(y);}
void unite(int x,int y){
x = root(x), y = root(y);if(x == y)return;
if(e[y] < e[x])swap(x,y);
e[x] += e[y];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |