ZOJ 3333 Guess the Price(模拟)
2016-02-23 17:35
375 查看
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3333
比大小
比大小
#include<iostream> #include<cstdio> #include<set> #include<string> #include<string.h> #include<cstring> #include<vector> #include<map> #include<queue> #include<stack> #include<cctype> #include<algorithm> #include<sstream> #include<utility> #include<cmath> #define mt(a) memset(a,0,sizeof (a)) #define fl(a,b,c) fill(a,b,c) #define SWAP(a,b,t) (t=a,a=b,b=t) #define inf 1000000000+7 using namespace std; int main() { int T; cin >> T; while (T--) { int p, p1, p2; cin >> p >> p1 >> p2; char flag = ((abs(p - p1) > abs(p - p2)) ? 'B' : 'A'); printf("%c\n", flag); } return 0; }
相关文章推荐
- mac下通过xcodebuild使用oclint
- UIAlertController使用
- UICollectionView
- Android BuildConfig.DEBUG的妙用
- Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certific
- request.get... getHeader 能取得的信息 参数
- Map集合中value()方法与keySet()、entrySet()区别 《转》
- APUE 头文件 "apue.h" 中包含的头文件解释
- 3.UIButton
- BEx Query Designer中的变量及其增强
- Android更新UI的2种方法
- 22.UIButton的标题和图片位置的调整/Image和BackgroundImage
- Animation动画详解(五)——ValueAnimator高级进阶(一)
- [Sequence Alignment Methods] Dynamic time warping (DTW)
- 《iOS Human Interface Guidelines》——Keyboards and Input Views
- UINavigationController实现全屏滑动返回功能
- iOS UIKit - 通知机制
- iOS UIKit - 键盘处理
- iOS UIKit - 手势处理
- iOS UIKit - TabBarController