結果

問題 No.264 じゃんけん
ユーザー Kak1_n0_taneKak1_n0_tane
提出日時 2020-08-27 22:35:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 1,033 bytes
コンパイル時間 822 ms
コンパイル使用メモリ 91,476 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-26 04:13:32
合計ジャッジ時間 1,431 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iomanip>
#include <vector>
#include <cstring>
#include <queue>
#include <map>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
using namespace std;
//typedef long long ll;
//typedef long double ld;
//typedef unsigned long long ull;
//typedef unsigned long double uld;
typedef pair<int,int> P;
const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};
template<class T> inline bool chmax(T &a,T& b){if(a < b){a = b; return true;} else return false;}
template<class T> inline bool chmin(T &a,T& b){if(a > b){a = b; return true;} else return false;}
//struct area

//function area

//main area
int main(){
    int me, you;
    cin >> me >> you;
    if(me == you){
        cout << "Drew" << endl;
    }
    else if(you - me == 1 || (me == 2 && you == 0)){
        cout << "Won" << endl;
    }
    else{
        cout << "Lost" << endl;
    }
}
/*

me == you  >  Drew
0 1 Win
0 2 Lose
1 0 Lose
1 2 Win
2 0 Win
2 1 Lose

*/
0