标签:区间 mask 正整数 center stat style targe ++ sub
4
1 2 3
2 3 4
2147483647 0 2147483646
0 -2147483648 -2147483647
Case #1: false
Case #2: true
Case #3: true
Case #4: false
参考代码:
#include<stdio.h>
void look(long long a,long long b,long long c,int X){
if(a+b>c){
printf("Case #%d: true\n",X);
}else{
printf("Case #%d: false\n",X);
}
}
int main(){
long long a, b, c;
int t,i = 1;
scanf("%d",&t);
while(t--&&t<=10){
scanf("%lld %lld %lld",&a,&b,&c);
look(a,b,c,i++);
}
return 0;
}
注意整数范围,使用long long型~
标签:区间 mask 正整数 center stat style targe ++ sub
原文地址:http://www.cnblogs.com/zhhjthing/p/7805994.html