/in/foo.cc: In function 'int main()':
/in/foo.cc:61:30: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
p[cnt].x = x[i][j];
~~~~~~^
/in/foo.cc:58:26: note: within this loop
for(int j = 1; j <= 4; ++j)
~~^~~~
/in/foo.cc:40:20: warning: array subscript is above array bounds [-Warray-bounds]
dis2 = dist(x[i][1],y[i][1],x[i][3],y[i][3]),
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:40:20: warning: array subscript is above array bounds [-Warray-bounds]
/in/foo.cc:41:20: warning: array subscript is above array bounds [-Warray-bounds]
dis3 = dist(x[i][2],y[i][2],x[i][3],y[i][3]);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:41:20: warning: array subscript is above array bounds [-Warray-bounds]
/in/foo.cc:45:45: warning: array subscript is above array bounds [-Warray-bounds]
x[i][4] = x[i][1]+x[i][2]-x[i][3];
~~~~~~^
/in/foo.cc:45:19: warning: array subscript is above array bounds [-Warray-bounds]
x[i][4] = x[i][1]+x[i][2]-x[i][3];
~~~~~~^
/in/foo.cc:46:45: warning: array subscript is above array bounds [-Warray-bounds]
y[i][4] = y[i][1]+y[i][2]-y[i][3];
~~~~~~^
/in/foo.cc:46:19: warning: array subscript is above array bounds [-Warray-bounds]
y[i][4] = y[i][1]+y[i][2]-y[i][3];
~~~~~~^
/in/foo.cc:50:37: warning: array subscript is above array bounds [-Warray-bounds]
x[i][4] = x[i][1]+x[i][3]-x[i][2];
~~~~~~^
/in/foo.cc:50:19: warning: array subscript is above array bounds [-Warray-bounds]
x[i][4] = x[i][1]+x[i][3]-x[i][2];
~~~~~~^
/in/foo.cc:51:37: warning: array subscript is above array bounds [-Warray-bounds]
y[i][4] = y[i][1]+y[i][3]-y[i][2];
~~~~~~^
/in/foo.cc:51:19: warning: array subscript is above array bounds [-Warray-bounds]
y[i][4] = y[i][1]+y[i][3]-y[i][2];
~~~~~~^
/in/foo.cc:55:37: warning: array subscript is above array bounds [-Warray-bounds]
x[i][4] = x[i][2]+x[i][3]-x[i][1];
~~~~~~^
/in/foo.cc:55:19: warning: array subscript is above array bounds [-Warray-bounds]
x[i][4] = x[i][2]+x[i][3]-x[i][1];
~~~~~~^
/in/foo.cc:56:37: warning: array subscript is above array bounds [-Warray-bounds]
y[i][4] = y[i][2]+y[i][3]-y[i][1];
~~~~~~^
/in/foo.cc:56:19: warning: array subscript is above array bounds [-Warray-bounds]
y[i][4] = y[i][2]+y[i][3]-y[i][1];
~~~~~~^