HDU 5347(MZL's chemistry-打表)
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
as the first ionization energy of the chemical element
X
Now he get two chemical elements U,V
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
For each test case,there are two numbers u,v
the atomic numbers of the two element
"FIRST BIGGER",else print"SECOND BIGGER"
1 2
5 3
SECOND BIGGER
FIRST BIGGER
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's chemistry-打表)的更多相关文章
- hdu 5348 MZL's endless loop
给一个无向图(事实上是有向的.可是没有指定边的方向),你须要指定边的方向,使得每一个点入度和出度相差不超过1. 事实上就是找很多条路径.合起来能走完这个图..先统计各个顶点的度.度为奇数必是起点或终点 ...
- HDU 5344(MZL's xor-(ai+aj)的异或和)
MZL's xor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total ...
- 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] ...
- Hdu 5352 MZL's City (多重匹配)
题目链接: Hdu 5352 MZL's City 题目描述: 有n各节点,m个操作.刚开始的时候节点都是相互独立的,一共有三种操作: 1:把所有和x在一个连通块内的未重建过的点全部重建. 2:建立一 ...
- Hdu 5348 MZL's endless loop (dfs)
题目链接: Hdu 5348 MZL's endless loop 题目描述: 给出一个无向图(有环,有重边),包含n个顶点,m条边,问能否给m条边指定方向,使每个顶点都满足abs(出度-入度)< ...
- hdu5347 MZL's chemistry(打表)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud MZL's chemistry Time Limit: 2000/1000 MS ...
- HDU 1058 Humble Numbers(离线打表)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1058 解题报告:输入一个n,输出第n个质因子只有2,3,5,7的数. 用了离线打表,因为n最大只有58 ...
- hdu 5349 MZL's simple problem
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5349 MZL's simple problem Description A simple proble ...
- 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形成的不 ...
随机推荐
- Nginx一个实现负载均衡的强大web server
<转>nginx 这个轻量级.高性能的 web server 主要可以干两件事情: 〉直接作为http server(代替apache,对PHP需要FastCGI处理器支持): 〉另外一个 ...
- IIS设置HTTP To HTTPS
转自: http://www.cnblogs.com/yipu/p/3880518.html 1.购买SSL证书,参考:http://www.cnblogs.com/yipu/p/3722135.ht ...
- session一致性架构设计实践.
一.缘起 什么是session? 服务器为每个用户创建一个会话,存储用户的相关信息,以便多次请求能够定位到同一个上下文. Web开发中,web-server可以自动为同一个浏览器的访问用户自动创建se ...
- firefox 附加组件栏安装
firefox 在升级到 30的版本后,发现附加组件栏不兼容了. 搜索组件,add-on bar 会得到一个 new add-on bar的组件,安装完后发现上面不显示ip, 后来才发现,应该安装Th ...
- Contact
UF3000: 1.wafer进去prober后,默认probercard不会跟chuck上的wafer接触. 2.通过prober界面上的按钮向上移动,使得prober card和wafer的距离为 ...
- cms判断写法
cms比较容易写出循环的网页内容,对于有些循环的网页内容有不同css设定,这样在写cms时需要对循环做出条件判断:{if 判断条件}输出内容{else}输出内容{/if}.通过判断可以实现图片轮播效果 ...
- [Windows Server 2008] 查看ASP详细错误信息方法
★ 欢迎来到[护卫神·V课堂],网站地址:http://v.huweishen.com ★ 护卫神·V课堂是护卫神旗下专业提供服务器教学视频的网站,每周更新视频. ★ 本节我们将带领大家:查看IIS下 ...
- THREE.js代码备份——webgl - scene animation(通过加载json文件来加载动画和模型)
<!DOCTYPE html> <html lang="en"> <head> <title>three.js webgl - sc ...
- linux安装mysql可视化工具MySQL-workbench 连接数据库 执行sql
Step1:建立数据库连接 点击新建连接的按钮,符号是“+”的按钮,出现下图,在“Connection name”输入连接名称. 填写连接信息 输入数据库连接密码 测试连接: 再次点击连接时会要求输入 ...
- 【源码阅读】opencv中opencl版本的dft函数的实现细节
1.函数声明 opencv-3.4.3\modules\core\include\opencv2\core.hpp:2157 CV_EXPORTS_W void dft(InputArray src, ...