Lammah Sumfour by Muffie

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
570 B
4
Indexable
Never
// by hBarcellos 2022

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

#define N 2500

int va[N], vb[N], vc[N], vd[N];

int main(int argc, char *argv[])
{
	int n, i,j,k,l;
	int soma;
	unsigned int total = 0;

	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%d %d %d %d", &va[i], &vb[i], &vc[i], &vd[i]);
	}
	
	for (i=0;i<n;i++)
		for (j=0;j<n;j++)
			for (k=0;k<n;k++)
				for (l=0;l<n;l++) {
					soma=va[i]+vb[j]+vc[k]+vd[l];
					if (soma==0) {
						total++;
						//printf("%d %d %d %d\n",va[i],vb[j],vc[k],vd[l]);
					}
				}

	printf("%u\n", total);
	return 0;
}