
转载请注明出处: 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
5 3
Sample Output
SECOND BIGGER
FIRST BIGGER
百度第一电离能,然后打个表就好
/**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author xyiyy
*/ #include <iostream>
#include <fstream> //#####################
//Author:fraud
//Blog: http://www.cnblogs.com/fraud/
//#####################
//#pragma comment(linker, "/STACK:102400000,102400000")
#include <iostream>
#include <sstream>
#include <ios>
#include <iomanip>
#include <functional>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cctype> using namespace std; double f[] = {1312.0, 2372.0, 520.2, 899.5, 800.6,
1086.5, 1402.3, 1313.9, 1681.0, 2080.7,
495.8, 737.7, 577.5, 786.5, 1011.8,
999.6, 1251.2, 1520.6, 418.8, 589.8,
633.1, 658.8, 650.9, 652.9, 717.3,
762.5, 760.4, 737.1, 745.5, 906.4,
578.8, , , , 1139.9,
1350.8, , 549.5, , 640.1,
652.1, 684.3, , 710.2, 719.7,
804.4, 731.0, 867.8, 558.3, 708.6,
, 869.3, 1008.4, 1170.4, 375.7}; double gao(int x) {
if (x == )return ;
if (x == )return ;
return f[x - ];
} class hdu5347 {
public:
void solve(std::istream &in, std::ostream &out) {
int a, b;
while (in >> a >> b) {
double x = gao(a);
double y = gao(b);
if (x > y) out << "FIRST BIGGER" << endl;
else out << "SECOND BIGGER" << endl;
}
}
}; int main() {
std::ios::sync_with_stdio(false);
std::cin.tie();
hdu5347 solver;
std::istream &in(std::cin);
std::ostream &out(std::cout);
solver.solve(in, out);
return ;
}