結果
問題 |
No.201 yukicoderじゃんけん
|
ユーザー |
![]() |
提出日時 | 2017-03-23 21:49:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 510 ms |
コンパイル使用メモリ | 65,536 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 18:55:16 |
合計ジャッジ時間 | 1,223 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 6 |
ソースコード
#include <iostream> using namespace std; string solve(string sa,string sb,string pa,string pb){ if(pa.size()<pb.size()){ return sb; } else if(pa.size()>pb.size()){ return sa; } else{ for(int i = 0; i < pa.size(); ++i){ return((pa[i]<pb[i]) ? sb : sa); }} return "-1"; } int main(){ string sa,sb,pa,pb,xa,xb; cin >> sa >> pa >> xa; cin >> sb >> pb >> xb; cout << solve(sa,sb,pa,pb) << endl; return 0; }