题解
太巧妙了!!!
code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin>>n>>m; int r=0,b=0,y=0;
for(int i=1;i<=n;i++)
{
string s;
cin>>s;
for(int j=0;s[j];j++)
{
if(s[j]=='1') r++;
else if(s[j]=='2') b++;
else if(s[j]=='3') y++;
}
}
printf("%d %d %d\n",(2*r-y)/3,y-b,b-(r+y)/3);
return 0;
}
标签:游戏,int,题解,else,++,方块
From: https://www.cnblogs.com/pure4knowledge/p/18191081