結果

問題 No.8 N言っちゃダメゲーム
ユーザー 佐藤竜也佐藤竜也
提出日時 2021-06-24 13:11:00
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 862 bytes
コンパイル時間 1,660 ms
コンパイル使用メモリ 164,836 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-07 13:22:05
合計ジャッジ時間 2,475 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
#define rep2(i, n, s) for (int i = (n - 1); i >= (s); i--)

template<class T> inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

ll INF = 1000000000000000000;

// rep(i, 0, 4) => 上下左右, rep(i, 0, 8) => 斜めも含む
vector<int> dy = {-1, 0, 1, 0, -1, -1, 1, 1};
vector<int> dx = {0, 1, 0, -1, -1, 1, 1, -1};

int main() {
    int P;
    cin >> P;
    rep(i, 0, P) {
        int N, K;
        cin >> N >> K;
        int c = (N - 1) % (K + 1);
        if (1 <= c && c <= K) cout << "Win" << endl;
        else cout << "Lose" << endl;
    }
}
0