結果

問題 No.669 対決!!! 飲み比べ
ユーザー polylogK
提出日時 2018-05-12 11:17:27
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 1,475 ms
コンパイル使用メモリ 167,272 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-28 09:32:19
合計ジャッジ時間 2,334 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 22 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using std::cout;
using std::endl;
using std::cin;

int main(){
	int n, k; cin >> n >> k;
	
	long ans = 0;
	for(int i = 0; i < n; i++){
		int a; cin >> a;
		if(!a) continue;
		
		ans ^= (a - 1) % k;
	}
	
	if(ans) cout << "YES" << endl;
	else cout << "NO" << endl;
	return 0;
}
0