結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
古寺いろは
|
| 提出日時 | 2015-05-03 23:23:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 560 bytes |
| コンパイル時間 | 1,201 ms |
| コンパイル使用メモリ | 161,736 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-05 17:51:00 |
| 合計ジャッジ時間 | 1,689 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
bool big(string a, string b){
if (a.size() > b.size()) return true;
if (b.size() > a.size()) return false;
for (int i = 0; i < a.size(); i++)
{
if (a[i] > b[i]) return true;
if (b[i] > a[i]) return false;
}
return false;
}
int main() {
string name[2];
string point[2];
string meguru;
cin >> name[0] >> point[0] >> meguru;
cin >> name[1] >> point[1] >> meguru;
string ans = "-1";
if (big(point[0], point[1])) ans = name[0];
if (big(point[1], point[0])) ans = name[1];
cout << ans << endl;
}
古寺いろは