結果
問題 | No.201 yukicoderじゃんけん |
ユーザー |
|
提出日時 | 2018-06-12 23:19:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 457 bytes |
コンパイル時間 | 503 ms |
コンパイル使用メモリ | 65,260 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-30 13:58:17 |
合計ジャッジ時間 | 1,429 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { string name1,name2; string PA,PB; char XA,XB; cin>>name1>>PA>>XA; cin>>name2>>PB>>XB; if (PA.length()>PB.length()){ cout<<name1<<endl; return 0; }else if (PA.length()<PB.length()){ cout<<name2<<endl; return 0; } int P=PA.compare(PB); if (P>0){ cout<<name1<<endl; }else if (P<0){ cout<<name2<<endl; }else{ cout<<-1<<endl; } return 0; }