結果
| 問題 | No.201 yukicoderじゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-12 03:03:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 731 bytes |
| 記録 | |
| コンパイル時間 | 2,026 ms |
| コンパイル使用メモリ | 194,084 KB |
| 最終ジャッジ日時 | 2025-01-20 16:14:34 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 RE * 18 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
bool is_integer(double x){
return floor(x) == x;
}
int main(){
string sa,sb,pa,pb,xa,xb;
cin >> sa >> pa >> xa;
cin >> sb >> pb >> xb;
auto comp = [=]() -> bool {
int na = pa.size(),nb = pb.size();
if(na > nb) return true;
else if(na < nb) return false;
else{
bool res = true;
for(int i=na;i >= 0;i--){
if(pa[i] > pb[i]) res = true;
else if(pa[i] < pb[i]) res = false;
else continue;
}
return res;
}
};
if(stoi(pa) == stoi(pb)) cout << -1 << endl;
else cout << (comp() ? sa : sb) << endl;
}