GETTING WRONG ANSWER

#include<stdio.h>
int main(){
int t,n,x[101],y[101],tr1,tr2,tr3,ash,resn,resd,i;
float cx,cy;
scanf("%d",&t);
for(;t>0;t–){resn=0;resd=0;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d%d",&x[i],&y[i]);
for(tr1=0;tr1<n;tr1++){
for(tr2=0;tr2<n;tr2++){
if(tr2!=tr1){
for(tr3=0;tr3<n;tr3++){
if(tr3!=tr2&&tr3!=tr1){resd++;
if((x[tr1]-x[tr2])(y[tr2]-y[tr3])-(y[tr1]-y[tr2])(x[tr2]-x[tr3])){
for(ash=0;ash<n;ash++){
if(ash!=tr1&&ash!=tr2&&ash!=tr3){
cy=((x[tr2]-x[tr3])*(x[tr1]*x[tr1]+y[tr1]*y[tr1]-x[tr2]*x[tr2]-y[tr2]y[tr2])-(x[tr1]-x[tr2])(x[tr2]*x[tr2]+y[tr2]y[tr2]-x[tr3]x[tr3]-y[tr3]y[tr3]))1.0/(2((x[tr2]-x[tr3])(y[tr1]-y[tr2])-(x[tr1]-x[tr2])(y[tr2]-y[tr3])));
cx=-((y[tr2]-y[tr3])
(x[tr1]x[tr1]+y[tr1]y[tr1]-x[tr2]x[tr2]-y[tr2]y[tr2])-(y[tr1]-y[tr2])(x[tr2]x[tr2]+y[tr2]y[tr2]-x[tr3]x[tr3]-y[tr3]y[tr3]))1.0/(2((x[tr2]-x[tr3])(y[tr1]-y[tr2])-(x[tr1]-x[tr2])(y[tr2]-y[tr3])));
if((x[ash]-x[tr1])
(2
cx-x[ash]-x[tr1])+(y[ash]-y[tr1])
(2
cy-y[ash]-y[tr1])>=0.0)
resn++; }}}}}}}}
printf("%f",resn
1.0/((n-3)*resd));}
return 0;}

Your code is completely vague.
Please post it in a better way to have some help.

1 Like
//