結果
| 問題 | No.201 yukicoderじゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-12 22:58:45 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 966µs | |
| コード長 | 502 bytes |
| 記録 | |
| コンパイル時間 | 1,631 ms |
| コンパイル使用メモリ | 214,716 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-11-04 17:08:08 |
| 合計ジャッジ時間 | 3,337 ms |
|
ジャッジサーバーID (参考情報) |
judge7_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
bool gt(const string &p1, const string &p2) {
if (p1.size() != p2.size())
return p1.size() > p2.size();
return p1 > p2;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
string s1, s2, p1, p2, _;
cin >> s1 >> p1 >> _;
cin >> s2 >> p2 >> _;
if (gt(p1, p2))
cout << s1 << endl;
else if (gt(p2, p1))
cout << s2 << endl;
else
cout << -1 << endl;
return 0;
}