# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
448698 | MOUF_MAHMALAT | Izlet (COI19_izlet) | C++14 | 810 ms | 35792 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#define all(s) s.begin(),s.end()
using namespace std;
typedef int ll;
ll n,a[3009][3009],p[3009],sz[3009],c[3009],o,op,t;
ll gp(ll z)
{
if(p[z]==z)
return z;
return p[z]=gp(p[z]);
}
void mrg(ll x,ll y)
{
x=gp(x),y=gp(y);
if(x==y)
return;
if(sz[y]>sz[x])
swap(x,y);
p[y]=x;
sz[x]+=sz[y];
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
scanf("%d%d",&t,&n);
for(ll i=1; i<=n; i++)
p[i]=i,sz[i]=1;
for(ll i=1; i<=n; i++)
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |