QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
Tip: Click on the bar to expand more detailed information
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]