您的位置:首页 > 其它

2015-多校5-MZL's chemistry

2015-08-04 16:51 330 查看
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)

Total Submission(s): 0 Accepted Submission(s): 0



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




找元素第一电里能的大小比较

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <iostream>
#include <string>
#include <queue>
#include <set>
#include <algorithm>

using namespace std;
int a[1000000+100];

int main()
{
    double a[100];
    a[1]=1312.0;
    a[2]=2372.3;
    a[3]=520.2;
    a[4]=899.5;
    a[5]=800.6;
    a[6]=1086.5;
    a[7]=1402.3;
    a[8]=1313.9;
    a[9]=1681.0;

    a[10]=2080.7;
    a[11]=495.8;
    a[12]=737.7;
    a[13]=577.5;
    a[14]=786.5;
    a[15]=1011.8;
    a[16]=999.6;
    a[17]=1251.2;
    a[18]=1520.6;
    a[35]=1139.9;
    a[36]=1350.8;
    a[53]=1008.4;
    a[54]=1170.4;
    a[85]=890;
    a[86]=1037;
    int u, v;
    while(scanf("%d %d", &u, &v)!=EOF)
    {
        if(a[u]>a[v]) printf("FIRST BIGGER\n");
        else printf("SECOND BIGGER\n");
    }
    return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: