Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
56803 吴乐涵 Bill C++ Accepted 100 1 MS 252 KB 436 2022-08-03 14:51:45

Tests(10/10):


#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=='Z') x2++,x3--; if(a=='D'&&b=='Z') x1++,x3--; if(a=='G'&&b=='D') x2++,x1--; if(a=='Z'&&b=='G') x3++,x2--; if(a=='Z'&&b=='D') x3++,x1--; } cout<<"D"<<" "<<x1<<endl; cout<<"G"<<" "<<x2<<endl; cout<<"Z"<<" "<<x3<<endl; return 0; }


Judgement Protocol: