結果

問題 No.8 N言っちゃダメゲーム
ユーザー dosuken123dosuken123
提出日時 2016-02-12 15:39:12
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 986 bytes
コンパイル時間 589 ms
コンパイル使用メモリ 68,736 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-22 02:35:35
合計ジャッジ時間 1,428 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
using namespace std;

//int cur;
//vector<int> N;
//vector<int> K;
//bool recursive(int n) {
//    if (n >= N[cur])
//        return false;
//    for (int i = 1; i <= K[i]; i++) {
//        recursive(i);
//    }
//}

int main() {
    int P;
    cin >> P;
    vector<int> N(P);
    vector<int> K(P);
//    N.resize(P);
//    K.resize(P);
    for (int i = 0; i < P; i++) cin >> N[i] >> K[i];
    for (int i = 0; i < P; i++) {
//        cur = i;
//        vector<vector<bool>> dp(N[i]);
//        for (int j = 0; j < N[i]; j++) dp[i] = true;
//        for (int j = 1; j <= K[i]; j++) dp[j] = true;
//        recursive(0);
        
        if ((N[i]-1)%(K[i]+1))
            cout << "Win" << endl;
        else
            cout << "Lose" << endl;
    }
    
//    sort(W.begin(),W.end());
//    int ret = 0;
//    while (L>0&&ret<N) L -= W[ret++];
//    if (L<0) ret--;
//    cout << ret << endl;
    return 0;
}
0