/in/foo.cc: In function 'void kruskal()':
/in/foo.cc:25:13: warning: array subscript is above array bounds [-Warray-bounds]
q=find(a[i].from);
~~~^
/in/foo.cc:26:13: warning: array subscript is above array bounds [-Warray-bounds]
p=find(a[i].to);
~~~^
/in/foo.cc:28:11: warning: array subscript is above array bounds [-Warray-bounds]
sum+=a[i].wi;
~~~^
/in/foo.cc: In function 'int main()':
/in/foo.cc:44:33: warning: array subscript is above array bounds [-Warray-bounds]
cin>>a[i].from>>a[i].to>>a[i].wi;
^~
/in/foo.cc:44:24: warning: array subscript is above array bounds [-Warray-bounds]
cin>>a[i].from>>a[i].to>>a[i].wi;
^~
/in/foo.cc:44:13: warning: array subscript is above array bounds [-Warray-bounds]
cin>>a[i].from>>a[i].to>>a[i].wi;
^~~~
/in/foo.cc:45:11: warning: array subscript is above array bounds [-Warray-bounds]
ans+=a[i].wi;
~~~^