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: 4ms
Memory: 1120kB
Author: CT12811651281
In contest: 1281

#include<stdio.h>
struct number{
	int x,y,z,k;
};
int main(){
	int n,i,j;
	while(scanf("%d",&n)!=EOF){
		struct number a[13];
		int a1,b,c;
		for(i=0;i<n;i++){
			scanf("%d%d%d",&a[i].x,&a[i].y,&a[i].z);
		}
		a1=0;
		for(i=0;i<n;i++){
			a[i].k=1;
		}
		for(i=0;i<n;i++){
			for(j=i+1;j<n;j++){
				if(a[i].x==a[j].x&&a[i].y==a[j].y)
					a[j].k=0;
			}
		}
		for(i=0;i<n;i++){
			a1+=a[i].k;
		}
		b=0;
		for(i=0;i<n;i++){
			a[i].k=1;
		}
		for(i=0;i<n;i++){
			for(j=i+1;j<n;j++){
				if(a[i].x==a[j].x&&a[i].z==a[j].z)
					a[j].k=0;
			}
		}
		for(i=0;i<n;i++){
			b+=a[i].k;
		}
	c=0;
		for(i=0;i<n;i++){
			a[i].k=1;
		}
		for(i=0;i<n;i++){
			for(j=i+1;j<n;j++){
				if(a[i].z==a[j].z&&a[i].y==a[j].y)
					a[j].k=0;
			}
		}
		for(i=0;i<n;i++){
			c+=a[i].k;
		}
		printf("%d %d %d\n",a1,b,c);
	}
}