Saleh127

at 151C

Sep 24th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int n,m,p,x[100002]= {0},ac=0,wa[100002]= {0},i,j,k,l;
  6. int main()
  7. {
  8. ios_base::sync_with_stdio(0);
  9. cin.tie(0);
  10. cout.tie(0);
  11.  
  12. string s[100002];
  13.  
  14. cin>>n>>m;
  15.  
  16. for(i=0; i<m; i++)
  17. {
  18. cin>>p>>s[i];
  19. if(x[p]==0 && s[i]=="WA")
  20. {
  21. wa[p]++;
  22. }
  23. if(x[p]==0 && s[i]=="AC")
  24. {
  25. x[p]=1;
  26. ac++;
  27. }
  28. }
  29.  
  30. for(i=1; i<=n; i++)
  31. {
  32. if(x[i]==1)
  33. {
  34. wa[0]+=wa[i];
  35. }
  36. }
  37. cout<<ac<<" "<<wa[0]<<endl;
  38. return 0;
  39. }
  40.  
Advertisement
Add Comment
Please, Sign In to add comment