# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
60451 |
2018-07-24T08:14:26 Z |
정원준(#1745) |
Park (JOI17_park) |
C++11 |
|
54 ms |
616 KB |
#include "park.h"
#include <bits/stdc++.h>
#define L long long
using namespace std;
void Answer(int,int);
int Ask(int,int,int*);
int t,n;
int arr[2222];
int bu[2222],lev[2222];
L fin(L x){
return x==bu[x]?x:fin(bu[x]);
}
void uni(int x,int y){
x=fin(x);
y=fin(y);
if(x==y) return;
if(lev[x]>lev[y]) swap(x,y);
bu[x]=y;
if(lev[x]==lev[y]) lev[y]++;
}
void Detect(int T,int N){
t=T;
n=N;
int i,j;
for(i=1;i<=n;i++)
{
bu[i]=i;
}
if(1)
{
for(i=1;i<=n;i++)
{
for(j=i+1;j<=n;j++)
{
if(fin(i)==fin(j)) continue;
arr[i-1]=arr[j-1]=1;
int temp=Ask(i-1,j-1,arr);
if(temp==1)
{
uni(i,j);
Answer(i-1,j-1);
}
arr[i-1]=arr[j-1]=0;
}
}
return;
}
}
/*
int Ask(int st,int ed,int *arr){
return 1;
}
void Answer(int s,int e){
}
int main()
{
}
//*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
376 KB |
Wrong Answer[6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
54 ms |
616 KB |
Wrong Answer[5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
54 ms |
616 KB |
Wrong Answer[5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
43 ms |
616 KB |
Wrong Answer[5] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
47 ms |
616 KB |
Wrong Answer[5] |
2 |
Halted |
0 ms |
0 KB |
- |