码迷,mamicode.com
首页 > 其他好文 > 详细

HDU-5347 MZL's chemistry

时间:2015-08-05 12:28:08      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

 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;
}

 

HDU-5347 MZL's chemistry

标签:

原文地址:http://www.cnblogs.com/cancangood/p/4703997.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!