結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
|
提出日時 | 2020-09-18 11:42:31 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 548 bytes |
コンパイル時間 | 2,283 ms |
コンパイル使用メモリ | 192,860 KB |
最終ジャッジ日時 | 2025-01-14 16:06:36 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; string s1, s2; string p1, p2, s; void input() { cin >> p1 >> s1 >> s >> p2 >> s2 >> s; } void solve() { string ans; if (s1 == s2) { ans = "-1"; } else { if (s1.size() == s2.size()) { if (s1 > s2) { ans = p1; } else { ans = p2; } } else { if (s1.size() > s2.size()) { ans = p1; } else { ans = p2; } } } cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); input(); solve(); }