提交时间:2022-08-03 16:59:51
运行 ID: 56926
#include<bits/stdc++.h> using namespace std; int n; map<char,int> m; int main(){ cin>>n; while(n--){ char a,b; cin>>a>>b; m[a]++; m[b]--; } cout<<"D"<<" "<<m['D']<<endl; cout<<"G"<<" "<<m['G']<<endl; cout<<"Z"<<" "<<m['Z']; return 0; }