| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 56805 | 安一宸 | Bill | C++ | Accepted | 100 | 1 MS | 252 KB | 424 | 2022-08-03 14:52:24 |
#include<bits/stdc++.h> using namespace std; int n,x1,x2,x3; char a,b; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a>>b; if(a=='D'&&b=='G') x1++,x2--; if(a=='G'&&b=='D') x2++,x1--; if(a=='G'&&b=='Z') x2++,x3--; if(a=='Z'&&b=='G') x3++,x2--; if(a=='D'&&b=='Z') x1++,x3--; if(a=='Z'&&b=='D') x3++,x1--; } cout<<"D "<<x1<<endl; cout<<"G "<<x2<<endl; cout<<"Z "<<x3<<endl; return 0; }