码迷,mamicode.com
首页 > 其他好文 > 详细

hdu5347 MZL's chemistry(打表)

时间:2015-08-05 22:03:16      阅读:109      评论:0      收藏:0      [点我收藏+]

标签:

转载请注明出处: http://www.cnblogs.com/fraud/           ——by fraud

 

MZL‘s chemistry

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


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

 百度第一电离能,然后打个表就好

 1 /**
 2  * code generated by JHelper
 3  * More info: https://github.com/AlexeyDmitriev/JHelper
 4  * @author xyiyy
 5  */
 6 
 7 #include <iostream>
 8 #include <fstream>
 9 
10 //#####################
11 //Author:fraud
12 //Blog: http://www.cnblogs.com/fraud/
13 //#####################
14 //#pragma comment(linker, "/STACK:102400000,102400000")
15 #include <iostream>
16 #include <sstream>
17 #include <ios>
18 #include <iomanip>
19 #include <functional>
20 #include <algorithm>
21 #include <vector>
22 #include <string>
23 #include <list>
24 #include <queue>
25 #include <deque>
26 #include <stack>
27 #include <set>
28 #include <map>
29 #include <cstdio>
30 #include <cstdlib>
31 #include <cmath>
32 #include <cstring>
33 #include <climits>
34 #include <cctype>
35 
36 using namespace std;
37 
38 double f[100] = {1312.0, 2372.0, 520.2, 899.5, 800.6,
39                  1086.5, 1402.3, 1313.9, 1681.0, 2080.7,
40                  495.8, 737.7, 577.5, 786.5, 1011.8,
41                  999.6, 1251.2, 1520.6, 418.8, 589.8,
42                  633.1, 658.8, 650.9, 652.9, 717.3,
43                  762.5, 760.4, 737.1, 745.5, 906.4,
44                  578.8, 762, 947, 941, 1139.9,
45                  1350.8, 403, 549.5, 600, 640.1,
46                  652.1, 684.3, 702, 710.2, 719.7,
47                  804.4, 731.0, 867.8, 558.3, 708.6,
48                  834, 869.3, 1008.4, 1170.4, 375.7};
49 
50 double gao(int x) {
51     if (x == 85)return 890;
52     if (x == 86)return 1037;
53     return f[x - 1];
54 }
55 
56 class hdu5347 {
57 public:
58     void solve(std::istream &in, std::ostream &out) {
59         int a, b;
60         while (in >> a >> b) {
61             double x = gao(a);
62             double y = gao(b);
63             if (x > y) out << "FIRST BIGGER" << endl;
64             else out << "SECOND BIGGER" << endl;
65         }
66     }
67 };
68 
69 
70 int main() {
71     std::ios::sync_with_stdio(false);
72     std::cin.tie(0);
73     hdu5347 solver;
74     std::istream &in(std::cin);
75     std::ostream &out(std::cout);
76     solver.solve(in, out);
77     return 0;
78 }

 

 

hdu5347 MZL's chemistry(打表)

标签:

原文地址:http://www.cnblogs.com/fraud/p/4705813.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!