結果
| 問題 | No.201 yukicoderじゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-08 17:00:44 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 852 bytes |
| 記録 | |
| コンパイル時間 | 539 ms |
| コンパイル使用メモリ | 64,512 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 15:04:19 |
| 合計ジャッジ時間 | 1,205 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<iostream>
using namespace std;
int main(){
string s1, s2;
string yf1, yf2;
char hand1, hand2;
cin >> s1 >> yf1 >> hand1;
cin >> s2 >> yf2 >> hand2;
if(yf1.size() == yf2.size()){
if(yf1 == yf2){
cout << "-1";
}else{
int one, two;
for(int i = 0; i < yf1.size(); i++){
one = (int)(yf1[i] - '0');
two = (int)(yf2[i] - '0');
if(one != two){
if(one > two){
cout << s1;
}else{
cout << s2;
}
break;
}
}
}
}else if(yf1.size() > yf2.size()){
cout << s1;
}else if(yf1.size() < yf2.size()){
cout << s2;
}
cout << endl;
return 0;
}