ZOJ 3322Who is Older?(模拟)
来源:互联网 发布:淘宝店铺代销货源 编辑:程序博客网 时间:2024/06/04 19:20
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3322
输入两个人的生日 判断年龄大小
#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+7using namespace std;int main(){int T;cin >> T;while (T--){int y1, y2, m1, m2, d1, d2;scanf("%d %d %d %d %d %d", &y1, &m1, &d1, &y2, &m2, &d2);int flag = 0;if (y1 < y2)flag = 1;else if (y1>y2)flag = 2;else{if (m1 < m2)flag = 1;else if (m1>m2)flag = 2;else{if (d1 < d2)flag = 1;else if (d1>d2)flag = 2;else flag = 3;}}if (flag == 1)printf("javaman\n");else if (flag == 2)printf("cpcs\n");else printf("same\n");}return 0;}
0 0
- ZOJ 3322Who is Older?(模拟)
- ZOJ 3322 Who is Older?.
- ZOJ 3322Who is Older?
- ZOJ 3322 Who is Older?
- ZOJ 3322 Who is Older?
- ZOJ 3322Who is Older?
- ZOJ 省赛题 Who is Older?
- ZOJ-3322-Who is Older?【7th浙江省赛】
- ZOJ 3333 Guess the Price 3323 Somali Pirates 3322 Who is Older?(超级水)
- ZOJ3322-Who is Older?
- A. Who is Older?
- 周赛问题 福州 A - Who is Older?
- ZOJ-#3519 Who is the Smartest Man(贪心)
- ZOJ 3519 Who is the Smartest Man (贪心)
- zoj 3519 Who is the Smartest Man
- zoj 3519 Who is the Smartest Man
- 2014ACM集训13级PK赛2-Who is Older?
- The7th Zhejiang Provincial Collegiate Programming Contest->Problem A:A - Who is Older?
- android内部存储读写文件详解
- SpringMvc定时器自己的配置详细~~~
- fork之源码剖析
- behemoth - 06
- 模板类的继承
- ZOJ 3322Who is Older?(模拟)
- Android studio之配置NDK开发环境
- Java Reflection(三):构造器
- Apache+Tomcat集群配置+session共享
- 表的storage (MINEXTENTS 属性对truncate后表大小的影响
- 视频监控大数据的关键技术和应用(来自中国安防)
- C++基础::便捷函数
- iOS开发之引用第三方PNChart画图表出现Unknown type name “CGFloat”错误的解决方法
- android studio插件推荐