AcWing 3315. 切蛋糕
原题链接
简单
作者:
saih
,
2021-03-30 21:01:47
,
所有人可见
,
阅读 325
#include <iostream>
using namespace std;
int main(void){
int n;
scanf("%d", &n);
while(n --){
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
int cnt = 0;
cnt += a == 0;
cnt += b == 0;
cnt += c == 0;
if(cnt == 2)
printf("0\n");
else if(cnt == 1)
if(b == c || a == c || a == b)
printf("1\n");
else
printf("2\n");
else
if(b == c || a == c || a == b || a + b == c || a + c == b || b + c == a)
printf("2\n");
else
printf("3\n");
}
return 0;
}