AC代码

#include <cstdio>

int main() {
#ifdef ONLINE_JUDGE
#else
freopen("1.txt", "r", stdin);
#endif // ONLINE_JUDGE
char str[2][10] = {"false", "true"};
int n, tcase = 1;
scanf("%d", &n);
for(int i = 0; i < n; i++) {
int flag = 0;
long long a, b, c;
scanf("%lld%lld%lld", &a, &b, &c);
long long d = a + b;
//printf("%lld %lld %lld %lld\n", a, b, c, d);
/*if(c - b >= a) {
flag = 0;
printf("flag:%d\n", flag);
} else {
flag = 1;
printf("flag:%d\n", flag);
}*/
if(a > 0 && b > 0 && d < 0) flag = 1;
else if(a < 0 && b < 0 && d >= 0) flag = 0;
else if(d > c) flag = 1;
else flag = 0;
printf("Case #%d: %s\n", tcase++, str[flag]);
}
return 0;
}

PAT A1065 A+B and C (64bit) (20 分)的更多相关文章

  1. A1065 A+B and C (64bit) (20)(20 分)

    A1065 A+B and C (64bit) (20)(20 分) Given three integers A, B and C in [-2^63^, 2^63^], you are suppo ...

  2. PAT 甲级 1065 A+B and C (64bit) (20 分)(溢出判断)*

    1065 A+B and C (64bit) (20 分)   Given three integers A, B and C in [−], you are supposed to tell whe ...

  3. PAT (Advanced Level) Practice 1046 Shortest Distance (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1046 Shortest Distance (20 分) 凌宸1642 题目描述: The task is really simple: ...

  4. PAT (Advanced Level) Practice 1042 Shuffling Machine (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1042 Shuffling Machine (20 分) 凌宸1642 题目描述: Shuffling is a procedure us ...

  5. PAT (Advanced Level) Practice 1041 Be Unique (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1041 Be Unique (20 分) 凌宸1642 题目描述: Being unique is so important to peo ...

  6. PAT (Advanced Level) Practice 1015 Reversible Primes (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1015 Reversible Primes (20 分) 凌宸1642 题目描述: A reversible prime in any n ...

  7. PAT甲级:1136 A Delayed Palindrome (20分)

    PAT甲级:1136 A Delayed Palindrome (20分) 题干 Look-and-say sequence is a sequence of integers as the foll ...

  8. PAT乙级:1094 谷歌的招聘 (20分)

    PAT乙级:1094 谷歌的招聘 (20分) 题干 2004 年 7 月,谷歌在硅谷的 101 号公路边竖立了一块巨大的广告牌(如下图)用于招聘.内容超级简单,就是一个以 .com 结尾的网址,而前面 ...

  9. PAT乙级:1053 住房空置率 (20分)

    PAT乙级:1053 住房空置率 (20分) 题干 在不打扰居民的前提下,统计住房空置率的一种方法是根据每户用电量的连续变化规律进行判断.判断方法如下: 在观察期内,若存在超过一半的日子用电量低于某给 ...

随机推荐

  1. CoreText学习(二)之Hello world

    最后更新:2017-08-10 部分内容丢失,后续补上 相关配置: Xcode 8.3.3 Swift 3.0 macOS Sierra 一.CoreText 简介 CoreText 是用于处理文字和 ...

  2. JavaWeb_(Hibernate框架)Hibernate中数据查询语句HQL基本用法

    HQL(Hibernate Query Language) 是面向对象的查询语言, 它和 SQL 查询语言有些相似. 在 Hibernate 提供的各种检索方式中, HQL 是使用最广的一种检索方式. ...

  3. ubuntu 文件管理器 异常 强制关闭

    搜索进程号 ps -A | grep nautilus 杀掉 sudo kill xxxxx

  4. javascript实现集合Set、字典Dictionary、HashTable

    集合是由一组无序且唯一(即不能重复)的项组成的.这个数据结构使用了与有限集合相同的数学概念,但应用在计算机科学的数据结构中. function Set() { this.items = {}; } S ...

  5. vs2017中信号与槽连接

    在vs2012里和在Qt Creator里添加信号和槽不一样,这里把两种环境下怎么添加详细说明一下 1.在vs2012里添加信号和槽 新建一个qt的项目QtDemo 在qtdeom.h里添加槽 pri ...

  6. YOLO: You Only Look Once论文阅读摘要

    论文链接: https://arxiv.org/pdf/1506.02640.pdf 代码下载: https://github.com/gliese581gg/YOLO_tensorflow Abst ...

  7. POJ2513:Colored Sticks(字典树+欧拉路径+并查集)

    http://poj.org/problem?id=2513 Description You are given a bunch of wooden sticks. Each endpoint of ...

  8. 数据分析 - pandas 模块

    数据读取结构 -  DataFrame Series (collection of values) DataFrame (collection of Series objects) Panel (co ...

  9. 使用IEDriverServer.exe驱动IE,实现自动化测试

    1. 下载IEDriverServer: https://www.nuget.org/packages?q=IEDriver 2. 解压缩得到IEDriverServer.exe和IEDriverSe ...

  10. C# 打包安装部署 属性中找不到 查找目标或打开文件位置

    用第三方工具OrcaMis (一个可以修改msi文件的工具)来实现的 最后我又试了几次,以为是再程序打包的时候设置有问题,结果都没有找到原因,没有办法只有需求网络资源,网络上有朋友说VS创建的快捷方式 ...