MZL's chemistry

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)

Total Submission(s): 629    Accepted Submission(s): 449

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
 
Author
SXYZ
 
Source
 
Recommend
wange2014   |   We have carefully selected several similar problems for you:  

pid=5416" target="_blank">5416 

pid=5415" target="_blank">5415 5414 5413 5412 

 

打表

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<functional>
#include<iostream>
#include<cmath>
#include<cctype>
#include<ctime>
using namespace std;
#define For(i,n) for(int i=1;i<=n;i++)
#define Fork(i,k,n) for(int i=k;i<=n;i++)
#define Rep(i,n) for(int i=0;i<n;i++)
#define ForD(i,n) for(int i=n;i;i--)
#define RepD(i,n) for(int i=n;i>=0;i--)
#define Forp(x) for(int p=pre[x];p;p=next[p])
#define Forpiter(x) for(int &p=iter[x];p;p=next[p])
#define Lson (x<<1)
#define Rson ((x<<1)+1)
#define MEM(a) memset(a,0,sizeof(a));
#define MEMI(a) memset(a,127,sizeof(a));
#define MEMi(a) memset(a,128,sizeof(a));
#define INF (2139062143)
#define F (100000007)
#define MAXN (1000000+10)
typedef long long ll;
ll mul(ll a,ll b){return (a*b)%F;}
ll add(ll a,ll b){return (a+b)%F;}
ll sub(ll a,ll b){return (a-b+llabs(a-b)/F*F+F)%F;}
void upd(ll &a,ll b){a=(a%F+b%F)%F;}
int a[24]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,35,36,53,54,85,86} ;
double f[24]={1312.0,2372.3,520.2,899.5,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,1139.9,1350.8,1008.4,1170.4,890,1037};
double h[1000];
int main()
{
// freopen("E.in","r",stdin); Rep(i,24) h[a[i]]=f[i]; int u,v;
while (cin>>u>>v)
{
if (h[u]<h[v]) puts("SECOND BIGGER");
else puts("FIRST BIGGER");
} return 0;
}

HDU 5347(MZL&#39;s chemistry-打表)的更多相关文章

  1. hdu 5348 MZL&#39;s endless loop

    给一个无向图(事实上是有向的.可是没有指定边的方向),你须要指定边的方向,使得每一个点入度和出度相差不超过1. 事实上就是找很多条路径.合起来能走完这个图..先统计各个顶点的度.度为奇数必是起点或终点 ...

  2. HDU 5344(MZL&#39;s xor-(ai+aj)的异或和)

    MZL's xor Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total ...

  3. HDU 5351 MZL's Border (规律,大数)

    [HDU 5351 MZL's Border]题意 定义字符串$f_1=b,f_2=a,f_i=f_{i-1}f_{i-2}$. 对$f_n$的长度为$m$的前缀$s$, 求最大的$k$满足$s[1] ...

  4. Hdu 5352 MZL's City (多重匹配)

    题目链接: Hdu 5352 MZL's City 题目描述: 有n各节点,m个操作.刚开始的时候节点都是相互独立的,一共有三种操作: 1:把所有和x在一个连通块内的未重建过的点全部重建. 2:建立一 ...

  5. Hdu 5348 MZL's endless loop (dfs)

    题目链接: Hdu 5348 MZL's endless loop 题目描述: 给出一个无向图(有环,有重边),包含n个顶点,m条边,问能否给m条边指定方向,使每个顶点都满足abs(出度-入度)< ...

  6. hdu5347 MZL's chemistry(打表)

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud MZL's chemistry Time Limit: 2000/1000 MS ...

  7. HDU 1058 Humble Numbers(离线打表)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1058 解题报告:输入一个n,输出第n个质因子只有2,3,5,7的数. 用了离线打表,因为n最大只有58 ...

  8. hdu 5349 MZL's simple problem

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5349 MZL's simple problem Description A simple proble ...

  9. hdu 5343 MZL's Circle Zhou SAM

    MZL's Circle Zhou 题意:给定两个长度不超过a,b(1 <= |a|,|b| <= 90000),x为a的连续子串,b为y的连续子串(x和y均可以是空串):问x+y形成的不 ...

随机推荐

  1. java定时器和实时查询数据库

    定时器: Timer timer = new Timer();                    timer.schedule(new TimerTask() {                  ...

  2. (转)Vue 爬坑之路(三)—— 使用 vue-router 跳转页面

    使用 Vue.js 做项目的时候,一个页面是由多个组件构成的,所以在跳转页面的时候,并不适合用传统的 href,于是 vue-router 应运而生. 官方文档: https://router.vue ...

  3. eclipse安装python开发pydev插件

    eclipse安装python开发pydev插件 下载eclipse的python开发插件pydev http://pan.baidu.com/s/1qXHt8pI 下载python.exe,并安装. ...

  4. sql 分析 依赖beanutils

    你还在为sql语句的拼接而烦恼吗? sql语句支持表达式了! package com.newland.bi.webservice.common.manage; import java.util.Arr ...

  5. (转)Hibernate框架基础——cascade属性

    http://blog.csdn.net/yerenyuan_pku/article/details/52760010 我们以部门和员工的关系为例讲解一对多关联关系映射时,删除部门时,如果部门有关联的 ...

  6. requirejs(模块化)

    <script src="../../dist/js/require.js" data-main="../../dist/js/main.js">& ...

  7. CAD在图纸保存的同时,也把基本信息保存了(网页版)

    主要用到函数说明: MxDrawXCustomFunction::Mx_SaveDwgToURLEx 保存DWG文件到服务器上的扩展函数.详细说明如下: 参数 说明 pszServerUrl 服务器网 ...

  8. 关于Staltstack

    saltstate服务搭建: cat /etc/hosts(master和minion都添加) 127.0.0.1   localhost localhost.localdomain localhos ...

  9. PHP 魔术方法浅谈

    php中把以两个下划线(__)开头的方法称之为魔术方法.魔术方法包括: __construct()    类的构造方法  构建方法时被调用 __destruct()      类的析构方法  明确销毁 ...

  10. pig常用命令

    一.pig: pig提供了一个基于Hadoop的并行地执行数据流处理的引擎.它包含了一种脚本语言,称为Pig Latin.(类似SQL) 二.Pig Latin: 1.注释: 单行:-- 多行:/* ...