首页 > 其他 > 详细

HDU 5347 MZL's chemistry

时间:2015-08-05 16:29:55      阅读:337      评论:0      收藏:0      [点我收藏+]

MZL‘s chemistry

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 345    Accepted Submission(s): 287


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 <cstring>
#include <cstdio>
#include <stdlib.h>
#include <algorithm>
using namespace std;
int main()
{
    int a[25]=
    {
        2,10,9,18,7,36,8,
        1, 17, 54, 35, 6, 87,
        15,53,16,86,4,5,14,12,13,3,11
    };
    int x,y;
    while(~scanf("%d%d",&x,&y))
    {
        int xx,yy;
        for(int i=0; i<25; i++)
        {
            if(a[i]==x)
            {
                xx=i;
                break;
            }
        }

        for(int i=0; i<25; i++)
        {
            if(a[i]==y)
            {
                yy=i;
                break;
            }
        }
        if(xx<yy)
            printf("FIRST BIGGER\n");
        else printf("SECOND BIGGER\n");
    }
    return 0;
}


 

版权声明:本文为博主原创文章,如有特殊需要请与博主联系 QQ : 793977586。

HDU 5347 MZL's chemistry

原文:http://blog.csdn.net/yeguxin/article/details/47297491

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!