Hdu 5347 MZL's chemistry 2015ACM多校对抗赛第五场
2015-08-06 10:02
441 查看
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=5347
MZL's chemistry
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 396 Accepted Submission(s): 319
Problem Description
MZL define F(X) as
the first ionization energy of the chemical element X
Now he get two chemical elements U,V,given
as their atomic number,he wants to compare F(U) and F(V)
It is guaranteed that atomic numbers belongs to the given set:{1,2,3,4,..18,35,36,53,54,85,86}
It is guaranteed the two atomic numbers is either in the same period or in the same group
It is guaranteed that x≠y
Input
There are several test cases
For each test case,there are two numbers u,v,means
the atomic numbers of the two element
Output
For each test case,if F(u)>F(v),print
"FIRST BIGGER",else print"SECOND BIGGER"
Sample Input
1 2
5 3
Sample Output
SECOND BIGGER
FIRST BIGGER
Source
2015 Multi-University Training Contest 5
自行百度第一电离能~~~~
#include<iostream> #include<cstdio> using namespace std; int a[12]={0,0,0,1,3,2,4,6,5,7,8}; int main(){ int x,y; while(~scanf("%d%d",&x,&y)){ bool first=true; if(x<=2&&y<=2){if(x<y)first=false;} else if(3<=x&&x<=10&&3<=y&&y<=10){ if(a[x]<a[y])first=false; } else if(11<=x&&x<=18&&11<=y&&y<=18){ if(a[x-8]<a[y-8])first=false; } else if (35<=x&&x<=36&&35<=y&&y<=36){ if (x<y) first=false; } else if (53<=x&&x<=54&&53<=y&&y<=54){ if (x<y) first=false; } else if (85<=x&&x<=86&&85<=y&&y<=86){ if (x<y) first=false; }else if (x>y)first=false; if(first)puts("FIRST BIGGER"); else puts("SECOND BIGGER"); } return 0; }
相关文章推荐
- 简单的四则运算
- 数的奇偶性
- 感谢网友[Chen Hypo]帮我设计2015年新年banner
- PE、PVC、PP、PC、PS、PET化学材料简介--转载
- ACM网址
- 1272 小希的迷宫
- 1272 小希的迷宫
- hdu 1250 大数相加并用数组储存
- 矩阵的乘法操作
- 蚂蚁爬行问题
- 蚂蚁爬行问题
- 求两个数的最大公约数【ACM基础题】
- 打印出二进制中所有1的位置
- 杭电题目---一只小蜜蜂
- POJ ACM 1002
- POJ 2635 The Embarrassed Cryptographe
- POJ 3292 Semi-prime H-numbers
- POJ 2773 HAPPY 2006
- POJ 3090 Visible Lattice Points
- HDU 1568