1 条题解
-
1
#include <bits/stdc++.h> using namespace std; const long long N = 1e4 + 5; long long n, x, a[N], t; bool b = true;
int main() { cin >> t; while (t--) { cin >> n >> x; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 2; i <= n; i++) { if (a[i - 1] == a[i]) { continue; } else if (a[i - 1] > a[i]) { if (a[i - 1] - a[i] > x) { cout << "Lose\n"; b = false; break; } else { continue; } } else { if (a[i] - a[i - 1] > 1) { cout << "Lose\n"; b = false; break; } else { continue; } } } if (b) { cout << "Win\n"; } b = true; }
return 0;}
信息
- ID
- 28689
- 时间
- 2000ms
- 内存
- 512MiB
- 难度
- 1
- 标签
- 递交数
- 76
- 已通过
- 25
- 上传者