point cond new point for cond new point for cond graph comp list add i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
point []cond=new point[n];
for (i=0;i<n;i++) {
cond[i]=new point();
}
for(i=0;i<n;i++)
{
cond[graph[i].comp].list.add(i);
if(cond[graph[i].comp].low==-1 || i<cond[graph[i].comp].low)
cond[graph[i].comp].low=i;
}
int [] base=new int[n];
List<Integer> Base = new ArrayList<>();
for(i=0;i<n;i++)
base[i]=1;
for(i=0;i<n;i++){
sizelen=graph[i].cap;
for(j=0;j<sizelen;j++){
if(graph[i].comp!=graph[graph[i].list.get(j)].comp)
base[graph[graph[i].list.get(j)].comp]=0;
}
}
for(i=0;i<n;i++){
if(base[i]==1){
Base.add(cond[i].low);
}
}
Collections.sort(Base);
sizelen=Base.size();
for(i=0;i<sizelen;i++)
System.out.println(Base.get(i));