| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56928 | 梅煦洋 | Bill | C++ | Accepted | 100 | 1 MS | 248 KB | 452 | 2022-08-03 17:00:59 |
#include<bits/stdc++.h> using namespace std; char fi,ei; int n; int dd=0,gg=0,zz=0; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>fi>>ei; if(fi=='D'){ dd+=1; } if(fi=='G'){ gg+=1; } if(fi=='Z'){ zz+=1; } if(ei=='D'){ dd-=1; } if(ei=='G'){ gg-=1; } if(ei=='Z'){ zz-=1; } } cout<<"D"<<" "<<dd<<endl; cout<<"G"<<" "<<gg<<endl; cout<<"Z"<<" "<<zz<<endl; return 0; }