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
 
 
 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
 
F(u)>F(v),print "FIRST BIGGER",else print"SECOND BIGGER"
 
 
Sample Input
 
1 2 5 3
 
 
Sample Output
 
SECOND BIGGER FIRST BIGGER
 
 
Source
 
2015 Multi-University Training Contest 5
 
 
点击打开链接
 
 
 
 
#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;
} 
 
 
 










