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: 1760kB
Author: CT12811941281
In contest: 1281

#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<string.h>
#include<map>
#include<math.h>
#include<map>
#include<string>
using namespace std;
const int maxn=100020;
const int inf=0x3f3f3f;
map<int,int>xoy;
map<int,int>xoz;
map<int,int>yoz;
int main(){
	int cntxoy,cntxoz,cntyoz;
	int n;
	int a,b,c;
	while(scanf("%d",&n)!=EOF){
		cntxoy=0;
		cntxoz=0;
		cntyoz=0;
		xoy.clear();
		xoz.clear();
		yoz.clear();
		while(n--){
			scanf("%d %d %d",&a,&b,&c);
			if(xoy[a*1000+b]==0){
				cntxoy++;
				xoy[a*1000+b]++;
			}
			if(xoz[a*1000+c]==0){
				cntxoz++;
				xoz[a*1000+c]++;
			}
			if(yoz[b*1000+c]==0){
				cntyoz++;
				yoz[b*1000+c]++;
			}
		}
		printf("%d %d %d\n",cntxoy,cntxoz,cntyoz);
	}
	
}