Why this is not giving 100 percent output

This is the question

this is my code

hello @dhruvilcodes
what issue u r getting?

it can only pass samplecase 0

PLEASE SIR HELP ME IN THIS

dont use sqrt for calculating area, simply remove it.
also for swapping two triangle u can do it in 3 lines, no need to spend 7-8 lines for same.

#include <stdio.h>
#include <stdlib.h>

struct Triangle
{
   int a, b, c;
};

int square(struct Triangle t)
{
    int a = t.a, b = t.b, c = t.c;
    return (a + b + c)*(a + b - c)*(a - b + c)*(-a + b + c);
}

void sort_by_square(struct Triangle* a, int n)
{
    for (int i = 0; i < n; i++)
        for (int j = i + 1; j < n; j++)
            if (square(a[i]) > square(a[j]))
            {
                struct Triangle temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
}

int main()
{
   int n;
   scanf("%d", &n);
   struct Triangle *a = calloc(n, sizeof(struct Triangle));
   for (int i = 0; i < n; i++)
      scanf("%d%d%d", &a[i].a, &a[i].b, &a[i].c);
   sort_by_square(a, n);
   for (int i = 0; i < n; i++)
      printf("%d %d %d\n", a[i].a, a[i].b, a[i].c);
   return 0;
}

WHAT IS THIS SQUARE FUNCTION/

it is just this. giving square of triange area

OK
GOT IT THANK YOU SIR\