本蒟蒻参加2021年第一场NOI Online 入门组时的代码
不喜勿喷
我硬是磕了一个半小时
#include <bits/stdc++.h>
using namespace std;
int m[10000];
int main()
{
//freopen("cake.in","r",stdin);
//freopen("cake.out","w",stdout);
int n;
cin>>n;
int a[n],b[n],c[n];
for(int i=1;i<=n;i++)
{
cin>>a[i]>>b[i]>>c[i];
}
for(int i=1;i<=n;i++)
{
if(a[i]==b[i]&&a[i]==0||a[i]==c[i]&&a[i]==0||b[i]==c[i]&&c[i]==0)
{
m[i]==0;
continue;
}
if(a[i]==b[i]&&c[i]==0||a[i]==c[i]&&b[i]==0||c[i]==b[i]&&a[i]==0)
{
m[i]=1;
continue;
}
if(a[i]==0||b[i]==0||c[i]==0||a[i]+b[i]==c[i]||a[i]+c[i]==b[i]||c[i]+b[i]==a[i]||a[i]==b[i]||a[i]==c[i]||b[i]==c[i])
{
m[i]=2;
continue;
}
m[i]=3;
}
for(int i=1;i<=n;i++)
cout<<m[i]<<endl;
return 0;
}