提交时间:2022-08-03 17:08:47
运行 ID: 56948
#include<bits/stdc++.h> using namespace std; int n,_[114]; char a,b; int main(){ scanf("%d",&n); while(n--){ cin>>a>>b; _[a]--;_[b]++; } printf("D %d\nG %d\nZ %d\n",_['D'],_['G'],_['Z']); return 0; }