QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#630414 | #5141. Identical Parity | adivse# | WA | 0ms | 3584kb | C++20 | 511b | 2024-10-11 18:25:25 | 2024-10-11 18:25:26 |
Judging History
answer
#include <bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
const int N = 200005;
const int inf = 1e9;
void solve() {
int n, k; cin >> n >> k;
if (k % 2 == 0) {
if (n % k % 2 == 0) {
cout << "YES" << endl;
return;
}
} else {
if (n % k > n / k && (n % k - n / k) % 2 == 0) {
cout << "YES" << endl;
return;
}
}
return;
}
signed main() {
ios::sync_with_stdio(false),cin.tie(0);
int T; cin >> T;
while (T--) solve();
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
3 3 1 4 2 5 3
output:
YES
result:
wrong answer expected NO, found YES [1st token]