結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2019-09-13 08:48:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 589 bytes |
コンパイル時間 | 1,644 ms |
コンパイル使用メモリ | 166,848 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-07-04 03:43:22 |
合計ジャッジ時間 | 1,954 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string sa, sb, pa, pb, ans = "-1"; char c; cin >> sa >> pa >> c >> sb >> pb >> c; int len = pa.length(); if (pa.length() > pb.length()) ans = sa; else if (pa.length() == pb.length()) { while (len > 0) { if (pa[len-1] > pb[len-1]) { ans = sa; break; } else if (pa[len-1] < pb[len-1]) { ans = sb; break; } len--; } } else ans = sb; cout << ans << endl; return 0; }