zoukankan      html  css  js  c++  java
  • 2015 多校 #5 1005 MZL's chemistry

    MZL's chemistry

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


    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
     
    水题。
    给出两个元素的原子序数,要求比较哪个的第一电离能大....
    化学都忘得差不多了==
    不过好在限定了元素的范围,基本都是短周期的。
    需要注意的是二三主族,五六主族,因为p轨道的全空和半充满会有反常情况(这个叫洪特规则?)
    /*************************************************************************
        > File Name: code/multi/#5/1005.cpp
        > Author: 111qqz
        > Email: rkz2013@126.com 
        > Created Time: 2015年08月04日 星期二 13时27分07秒
     ************************************************************************/
    
    #include<iostream>
    #include<iomanip>
    #include<cstdio>
    #include<algorithm>
    #include<cmath>
    #include<cstring>
    #include<string>
    #include<map>
    #include<set>
    #include<queue>
    #include<vector>
    #include<stack>
    #define y0 abc111qqz
    #define y1 hust111qqz
    #define yn hez111qqz
    #define j1 cute111qqz
    #define tm crazy111qqz
    #define lr dying111qqz
    using namespace std;
    #define REP(i, n) for (int i=0;i<int(n);++i)  
    typedef long long LL;
    typedef unsigned long long ULL;
    const int inf = 0x7fffffff;
    
     bool cmp (int x,int y)
    {
        int p[3],g[3];
        int a[3];
        a[1]=x;
        a[2]=y;
        for ( int i = 1;  i <= 2 ; i++)
        {
        if (a[i]>=1&&a[i]<=2)
        {
            p[i] = 1;
        }
        if (a[i]>=3&&a[i]<=10)
        {
            p[i] = 2;
        }
        if (a[i]>=11&&a[i]<=18)
        {
            p[i] = 3;
        }
        if (a[i]>=35&&a[i]<=36)
        {
            p[i]=4;
        }
        if (a[i]>=53&&a[i]<=54)
        {
            p[i] = 5;
        }
        if (a[i]>=85&&a[i]<=86)
        {
            p[i] = 6;
        }
    
        }
        if (p[1]==p[2])
        {
        if (x==4&&y==5)
        {
            return true;
        }
        if (x==5&&y==4)
        {
            return false;
        }
        if (x==12&&y==13)
        {
            return true;
        }
        if (x==13&&y==12)
        {
            return false;
        }
        if (x==7&&y==8)
        {
            return true;
        }
        if (x==8&&y==7)
        {
            return false;
        }
        if (x==15&&y==16)
        {
            return true;
        }
        if (x==16&&y==15)
        {
            return false;
        }
        return x>y;
        }
        else
        {
        return x<y;
        }
    }
    
    int main()
    {
        int  u,v;
        while (~scanf("%d %d",&u,&v))
        {
    
        
        if (cmp(u,v))
        {
            printf("FIRST BIGGER
    ");
        }
        else
        {
            printf("SECOND BIGGER
    ");
        }
        }
      
        return 0;
    }
  • 相关阅读:
    Linux (Ubuntu)安装ssh
    Linux (Ubuntu)提示ifconfig:找不到命令
    Docker介绍
    微服务用到的技术
    移动端BI的设计
    Cobbler Web管理(二)
    基于CentOS7环境下的Cobbler部署介绍(一)
    使用google-perftools优化nginx内存管理提升性能
    解决 nginx 配置TLS1.2无效,总是TLS1.0的问题
    在nginx中将爬虫过来的请求转到指定的后端服务
  • 原文地址:https://www.cnblogs.com/111qqz/p/4711606.html
Copyright © 2011-2022 走看看