結果

問題 No.201 yukicoderじゃんけん
ユーザー moti
提出日時 2015-11-18 04:04:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 57,388 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 16:56:19
合計ジャッジ時間 1,150 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
string names[2]; string hensati[2]; string hoge;
for(int i=0;i<2;i++) {
cin >> names[i] >> hensati[i] >> hoge;
}
if(hensati[0].size()  < hensati[1].size()) {
cout << names[1] << endl;
}
else if(hensati[0].size() > hensati[1].size()) {
cout << names[0] << endl;
}
else if(hensati[0] == hensati[1]) {
cout << -1 << endl;
}
else {
cout << names[hensati[0] < hensati[1]] << endl;
}
return 0;
}
0