結果
| 問題 |
No.8 N言っちゃダメゲーム
|
| コンテスト | |
| ユーザー |
mannshi222
|
| 提出日時 | 2022-04-24 12:59:58 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 690 bytes |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 72,208 KB |
| 最終ジャッジ日時 | 2025-01-28 21:22:49 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 6 |
ソースコード
#include <iostream>
#include <stdbool.h>
#include <vector>
using namespace std;
#define MAX 120000
vector<bool> wl(MAX, true);
void makewl(int n, int k )
{
for( int i = 2; i <= n; i++ ) {
if( i <= k+1 ) {
wl[i] = true;
continue;
}
bool f = false;
for( int j = 1; j <= k; j++ ) {
if( wl[ i - j ] == false ) {
f = true;
break;
}
}
if( f ) {
wl[i] = true;
}
else {
wl[i] = false;
}
}
}
bool check( int N,int K )
{
return true;
}
int main()
{
int P, N, K;
cin >> P;
for( int i = 0; i < P; i++ ) {
cin >> N >> K;
makewl( N, K );
if( wl[N]) {
cout << "Win" << endl;
}
else {
cout << "Lose" << endl;
}
}
return 0;
}
mannshi222