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) 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 xy
 

 

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
#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[111]={0,1312,2372.3,520.2,932,800.6,
1086.5,1402.3,1313.9,1681,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[35]=1139.9;
    s[36]=1350.8;
    s[53]=1008.4;
    s[54]=1170.4;
    s[85]=920;
    s[86]=1037;
    while(scanf("%d%d",&i,&j)!=EOF)
    {
        if(s[i]>s[j])puts("FIRST BIGGER");
        else puts("SECOND BIGGER");
    }
    return 0;
}

 

posted @ 2015-08-05 10:23  疯狂的癫子  阅读(174)  评论(0编辑  收藏  举报