#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int main()
{
double ax, ay, bx, by, cx, cy; //координаты
double ab, ac, bc; //стороны треугольников
int i, n, k;
printf("Vvedite kolichestvo treugolnikov: ");
scanf("%d", &n);
k = 0;
for (i=1; i<=n; i++) {
printf("\nTreugolnik #%d", i);
printf("\nVvedite koordinaty tochki A: ");
scanf("%lf %lf", &ax, &ay);
printf("Vvedite koordinaty tochki B: ");
scanf("%lf %lf", &bx, &by);
printf("Vvedite koordinaty tochki C: ");
scanf("%lf %lf", &cx, &cy);
printf("[%lf, %lf], [%lf, %lf], [%lf, %lf]\n", ax, ay, bx, by, cx, cy);
ab = sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by));
ac = sqrt((ax-cx)*(ax-cx)+(ay-cy)*(ay-cy));
bc = sqrt((bx-cx)*(bx-cx)+(by-cy)*(by-cy));
if (ab>bc && ab>ac) {
k++;
}
}
printf("\n%d\n", k);
}