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: CT12810571281
In contest: 1281

#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{ 
	int n,x[15],y[15],z[15];
	while(scanf("%d",&n)!=EOF){
		int a=0,b=0,c=0,flag=1;
		for(int i=0;i<n;i++){
			scanf("%d %d %d",&x[i],&y[i],&z[i]);
		}
		for(int i=0;i<n;i++){
			flag=1;
			for(int j=0;j<i;j++){
				if(x[i]==x[j]&&y[i]==y[j]){
					flag=0;
					break;
				}
			}
				if(flag) a++;
		}
		
			for(int i=0;i<n;i++){
				flag=1;
			for(int j=0;j<i;j++){
				if(x[i]==x[j]&&z[i]==z[j]){
					flag=0;
					break;
				}
			}
				if(flag) b++;
		}
			
				for(int i=0;i<n;i++){
					flag=1;
			for(int j=0;j<i;j++){
				if(z[i]==z[j]&&y[i]==y[j]){
					flag=0;
					break;
				}
			}
				if(flag) c++;
		}
				printf("%d %d %d\n",a,b,c);
	}
	return 0;
}