OJ-Problems-Source/CodeVS/4511-unfinished_冰封.c

36 lines
622 B
C
Raw Normal View History

2016-07-06 14:28:18 +08:00
/*
:
:p4511 NOIP2015 day1 T2
*/
#include <stdio.h>
const int size = 0xfff;
typedef struct {
int known[size];
int kcnt;
int to;
} Line ;
int main(int argc, char* argv[]) {
int a, i;
Line l[size];
scanf("%i", &a);
for(i = 0; i < a; i++){
int x,y;
scanf("%i", &l[i].to);
l[i].kcnt = 1;
l[i].known[0] = i;
}
for(i = 0; ; i++){
int j, k;
for(j = 0; j < a; j++){
for(k = 0; k < l[l[j].to].kcnt; k++){
if(l[l[j].to].known[k] == )
}
}
}
return 0;
}