HDU 5655 CA Loves Stick
来源:互联网 发布:asyncio python详解 编辑:程序博客网 时间:2024/06/06 01:13
HDU 5655
注意long long 超范围和长度为0的情况。
#include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <cmath>using namespace std;int exam(long long a, long long b, long long c, long long d) {if(b + c < 0) return 1;if(c + d < 0) return 1;if(b + d < 0) return 1;if(b + c + d < 0) return 1;if(a < b + c + d) return 1;return 0;}int main() {int T;scanf("%d", &T);long long a, b, c, d;while(T--) {scanf("%I64d %I64d %I64d %I64d", &a, &b, &c, &d);if(a != 0 && b != 0 && c != 0 && d != 0 && exam(a, b, c, d) && exam(b, a, c, d) && exam(c, a, b, d) && exam(d, a, b, c)) {printf("Yes\n");}else printf("No\n");} return 0;}
0 0
- HDU 5655 CA Loves Stick
- HDU 5655 CA Loves Stick
- HDU - 5655 CA Loves Stick
- HDU 5655 CA Loves Stick
- hdu 5655 CA Loves Stick
- HDU 5655 CA Loves Stick
- HDU 5655 CA Loves Stick
- CA Loves Stick HDU
- CA Loves Stick HDU
- hdu 5655 CA Loves Stick【思维】
- HDU-5655 CA Loves Stick(Water) 判断
- 【HDU 5655】【水题】CA Loves Stick
- hdu 5655 CA Loves Stick(水题)
- HDU-5655 CA Loves Stick(数学)
- BestCoder Round #78 1001/ hdu 5655 CA Loves Stick
- HDU 5655 CA Loves Stick(思维题目)【bestcoder】
- 杭电5655 CA Loves Stick
- HDOJ 5655-CA Loves Stick【思维题】
- latex的数学公式方法
- iOS_加密保护2_sqlite
- 研究生第一个月感悟
- 压缩感知的常见测量矩阵
- HDU5655 CA Loves Stick (BC)
- HDU 5655 CA Loves Stick
- 《深入理解java虚拟机》学习笔记4——Java虚拟机垃圾收集器
- Android-文本类组件(二)
- ZOJ 3710 Friends(思维,最短路,图论)
- HTTP缓存原理
- js+css分页效果
- 程序员面试宝典
- 正则表达式
- [博弈游戏]Euclid's Game(0099)-SWUST_OJ