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 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
水题。
给出两个元素的原子序数,要求比较哪个的第一电离能大....
化学都忘得差不多了==
不过好在限定了元素的范围,基本都是短周期的。
需要注意的是二三主族,五六主族,因为p轨道的全空和半充满会有反常情况(这个叫洪特规则?)
/************************************************************************* > File Name: code/multi/#5/1005.cpp > Author: 111qqz > Email: [email protected] > 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\n"); } else { printf("SECOND BIGGER\n"); } } return 0; }
2015 多校 #5 1005 MZL's chemistry