Submission #334938

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3349382020-12-10 11:34:09ronnithKonj (COCI19_konj)C++14
70 / 70
162 ms17516 KiB
#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];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...