if狂欢
2024-11-20 22:13:53
发布于:云南
1阅读
0回复
0点赞
我才不用map呢
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,b; cin >> a >> b;
if(a == b) cout << "Equal";
else{
int n,m;
if(a == "3" || a == "4" || a == "5" || a == "6" || a == "7" || a == "8" || a == "9") n = a[0] - '0';
else if(a == "10") n = 10;
else if(a == "J") n = 11;
else if(a == "Q") n = 12;
else if(a == "K") n = 13;
else if(a == "A") n = 14;
else if(a == "2") n = 15;
else n = 16;
if(b == "3" || b == "4" || b == "5" || b == "6" || b == "7" || b == "8" || b == "9") m = b[0] - '0';
else if(b == "10") m = 10;
else if(b == "J") m = 11;
else if(b == "Q") m = 12;
else if(b == "K") m = 13;
else if(b == "A") m = 14;
else if(b == "2") m = 15;
else m = 16;
if(n > m) cout << "First";
else cout << "Second";
}
return 0;
}
这里空空如也
有帮助,赞一个