結果
| 問題 |
No.8 N言っちゃダメゲーム
|
| ユーザー |
youjo_yamioti
|
| 提出日時 | 2018-12-02 09:46:07 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 487 bytes |
| コンパイル時間 | 1,530 ms |
| コンパイル使用メモリ | 159,096 KB |
| 実行使用メモリ | 9,088 KB |
| 最終ジャッジ日時 | 2024-06-28 11:12:08 |
| 合計ジャッジ時間 | 7,903 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 TLE * 1 -- * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int P,N,K;
cin >> P;
int i;
for(i=0;i<P;i++){
cin >> N >> K;
vector<int> judge(N+1,0);
judge[N-1] = 0;
for(int j=N-2;j>=0;j--){
for(int k=1;k<=K;k++){
if(j + k > N) break;
if(judge[j+k] == 0) judge[j] = 1;
}
}
if(judge[0] == 1) cout << "Win" << endl;
else cout << "Lose" << endl;
}
return 0;
}
youjo_yamioti