Start: Jul, 05, 2019 08:40:00
2019年度暑期短学期达标测试
End: Jul, 05, 2019 11:40:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 3ms
Memory: 1120kB
Author: CT12812931281
In contest: 1281

#include<stdio.h>
#include<math.h>
int main(){
	int a,b,c,n;
	int A[11][3];
	while(scanf("%d",&n)!=EOF){
		a=b=c=0;
		for(int i=0;i<n;++i){
			scanf("%d%d%d",&A[i][0],&A[i][1],&A[i][2]);
			a++;
			b++;
			c++;
			int fa=0,fb=0,fc=0;
			for(int j=0;j<i;++j){
				if(A[i][0]==A[j][0]&&A[i][1]==A[j][1])
					fa=1;
				if(A[i][1]==A[j][1]&&A[i][2]==A[j][2])
					fc=1;
				if(A[i][0]==A[j][0]&&A[i][2]==A[j][2])
					fb=1;
			}
			if(fa==1)
				a--;
			if(fb==1)
				b--;
			if(fc==1)
				c--;
		}
		printf("%d %d %d\n",a,b,c);
	}
	return 0;
}