QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#583923 | #5141. Identical Parity | rxzfn639 | WA | 0ms | 3636kb | C++23 | 619b | 2024-09-23 00:06:46 | 2024-09-23 00:06:47 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 P = 998244353;
void solve() {
int n, k;
cin >> n >> k;
if (k % 2 == 0) {
cout << "Yes\n";
} else {
if (n % 2 == 1 && n / k - 1 <= n % k && n % k <= k / 2) {
cout << "Yes\n";
} else if (n % 2 == 0 && n / k <= n % k && n % k <= k / 2) {
cout << "Yes\n";
} else {
cout << "No\n";
}
}
}
int main() {
ios::sync_with_stdio(0); cin.tie(0), cout.tie(0);
int t = 1;
cin >> t;
while(t--) solve();
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3636kb
input:
3 3 1 4 2 5 3
output:
No Yes No
result:
wrong answer expected YES, found NO [3rd token]