您的位置:首页 > 其它

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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  2015 acm hdu 多校 化学