QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#630414#5141. Identical Parityadivse#WA 0ms3584kbC++20511b2024-10-11 18:25:252024-10-11 18:25:26

Judging History

你现在查看的是最新测评结果

  • [2024-10-11 18:25:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3584kb
  • [2024-10-11 18:25:25]
  • 提交

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]