HDU-5347 MZL's chemistry

时间:2023-03-09 18:02:14
HDU-5347        MZL's chemistry

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): 308 Accepted Submission(s):
255

Problem Description
MZL define F(X)HDU-5347        MZL's chemistry

as the first ionization energy of the chemical element XHDU-5347        MZL's chemistry

Now he get two chemical elements U,VHDU-5347        MZL's chemistry

,given as their atomic number,he wants to compare F(U)HDU-5347        MZL's chemistry

and F(V)HDU-5347        MZL's chemistry

It is guaranteed that atomic numbers belongs to the given set:{1,2,3,4,..18,35,36,53,54,85,86}HDU-5347        MZL's chemistry

It is guaranteed the two atomic numbers is either in the same period or
in the same group

It is guaranteed that x≠yHDU-5347        MZL's chemistry

Input
There are several test cases

For each test
case,there are two numbers u,vHDU-5347        MZL's chemistry

,means the atomic numbers of the two element

Output
For each test case,if F(u)>F(v)HDU-5347        MZL's chemistry

,print "FIRST BIGGER",else print"SECOND BIGGER"

Sample Input
1 2
5 3
Sample Output
SECOND BIGGER
FIRST BIGGER
Source
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define Max(a,b) (a>b?a:b)
#define Min(a,b) (a<b?a:b)
using namespace std;
double s[]={,,2372.3,520.2,,800.6,
1086.5,1402.3,1313.9,,2080.7,495.8,737.7,
577.5,786.5,1011.8,999.6,1251.2,1520.6
};
int main()
{
int i,j,k,l;
s[]=1139.9;
s[]=1350.8;
s[]=1008.4;
s[]=1170.4;
s[]=;
s[]=;
while(scanf("%d%d",&i,&j)!=EOF)
{
if(s[i]>s[j])puts("FIRST BIGGER");
else puts("SECOND BIGGER");
}
return ;
}