結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
Lay_ec
|
| 提出日時 | 2015-05-03 23:32:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 682 bytes |
| コンパイル時間 | 492 ms |
| コンパイル使用メモリ | 80,988 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 17:04:32 |
| 合計ジャッジ時間 | 1,185 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>
using namespace std;
int main()
{
string name1,name2,score1,score2,dummy1,dummy2;
cin>>name1>>score1>>dummy1>>name2>>score2>>dummy2;
string win="-1";
if(score1.size()>score2.size()) win=name1;
else if(score1.size()<score2.size()) win=name2;
else{
for(int i=0;i<score1.size();i++){
if(score1[i]>score2[i]){win=name1; break;}
else if(score1[i]<score2[i]){win=name2; break;}
}
}
cout<<win<<endl;
return 0;
}
Lay_ec