-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1065.cpp
More file actions
33 lines (31 loc) · 683 Bytes
/
Copy path1065.cpp
File metadata and controls
33 lines (31 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// 1065.cpp
// 算法
//
// Created by 王怡凡 on 2017/8/27.
// Copyright © 2017年 王怡凡. All rights reserved.
//
#include <stdio.h>
typedef long long ll;
ll a,b,c;
int main(){
int n,i;
scanf("%d",&n);
ll sum;
for(i=0;i<n;i++) {
scanf("%lld%lld%lld",&a,&b,&c);
sum = a+b;
if(a>0&&b>0&&sum<0) {
printf("Case #%d: true\n",i+1);
} else if(a<0&&b<0&&sum>=0) {
printf("Case #%d: false\n",i+1);
} else {
if(sum>c) {
printf("Case #%d: true\n",i+1);
} else {
printf("Case #%d: false\n",i+1);
}
}
}
return 0;
}