QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#750115#5141. Identical Parityckq328WA 0ms3564kbC++20818b2024-11-15 12:45:382024-11-15 12:45:38

Judging History

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

  • [2024-11-15 12:45:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3564kb
  • [2024-11-15 12:45:38]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N=1e6+10,M=200+10,inf=1e18,mod=998244353;
int n,k;
int a[N],f[N];
void solve(){
	cin>>n>>k;
	if(k==1){
		if(n==1) cout<<"yes"<<endl;
		else cout<<"No"<<endl;
	}
	else if(k%2==0) cout<<"yes"<<endl;
	else{
		if(k==n) cout<<"yes"<<endl;
		else{
			vector<int> vc;
			int sum=0;
			for(int i=1;i<=k;i++){
				int cnt=n/k;
				if(n%k>=i) cnt++;
				vc.push_back(cnt);
				sum+=cnt;
			}
			if(sum<n) cout<<"yes"<<endl;
			else{
				cout<<"no"<<endl;
			}
		}
	}
}
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int tt;
	cin>>tt;
	// tt=1;
	while(tt--){
		solve();
	}
}
/*
1
10
598196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754 223219513
*/

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3564kb

input:

3
3 1
4 2
5 3

output:

No
yes
no

result:

wrong answer expected YES, found NO [3rd token]