結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
saio4016
|
| 提出日時 | 2019-02-24 13:51:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 655 bytes |
| コンパイル時間 | 1,504 ms |
| コンパイル使用メモリ | 168,912 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-21 16:35:31 |
| 合計ジャッジ時間 | 2,456 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int INF = 1e9;
const int mod = 1e9+7;
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main()
{
int ans;
string s1,s2,p1,p2,x1,x2;
cin >> s1 >> p1 >> x1
>> s2 >> p2 >> x2;
if(p1 == p2){
if(p1 == p2) ans = 0;
else if((x1 == "R" && x2 == "S") || (x1 == "S" && x2 == "P") || (x1 == "P" && x2 == "S")) ans = 1;
else ans = 2;
}else if(p1 > p2) ans = 1;
else ans = 2;
if(ans) cout << (ans == 1 ? s1 : s2) << endl;
else cout << -1 << endl;
return 0;
}
saio4016