#include #include #include #include #include #define MAX 10000 using namespace std; int main(int argc, const char * argv[]) { int P; cin >> P; int array[P][2]; for (int i = 0; i < P*2; i++) { cin >> array[i/2][i%2]; } for (int x = 0; x < P; x++) { int n = array[x][0]; int k = array[x][1]; if((n-1)%(k+1) == 0)cout << "Lose\n"; else cout << "Win\n"; //動的計画法で解く //bool dp[n]; //初期化 //for (int i = 0; i <= n; i++) { // dp[i] = false; //} //dp[0] = true; //埋めていく //for (int i = 0; i <= n; i++) { // for (int j = 1; j <= k; j++) { // if(i - j < 0)break; // dp[i] |= !dp[i - j]; // } //} //if(dp[n])cout << "Win\n"; //else cout << "Lose\n"; } }