結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
|
提出日時 | 2020-06-12 22:58:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 502 bytes |
コンパイル時間 | 1,858 ms |
コンパイル使用メモリ | 194,120 KB |
最終ジャッジ日時 | 2025-01-11 02:53:35 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#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; }