結果

問題 No.669 対決!!! 飲み比べ
ユーザー ryoissyryoissy
提出日時 2018-03-23 22:32:11
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 1,381 ms
コンパイル使用メモリ 143,020 KB
実行使用メモリ 7,820 KB
最終ジャッジ日時 2023-09-07 07:41:30
合計ジャッジ時間 2,794 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
7,560 KB
testcase_01 AC 6 ms
7,484 KB
testcase_02 AC 6 ms
7,560 KB
testcase_03 AC 6 ms
7,616 KB
testcase_04 AC 7 ms
7,548 KB
testcase_05 AC 7 ms
7,496 KB
testcase_06 AC 7 ms
7,616 KB
testcase_07 AC 7 ms
7,676 KB
testcase_08 AC 7 ms
7,500 KB
testcase_09 AC 7 ms
7,820 KB
testcase_10 AC 7 ms
7,488 KB
testcase_11 AC 6 ms
7,544 KB
testcase_12 AC 6 ms
7,484 KB
testcase_13 AC 7 ms
7,480 KB
testcase_14 AC 7 ms
7,488 KB
testcase_15 AC 7 ms
7,548 KB
testcase_16 AC 7 ms
7,500 KB
testcase_17 AC 6 ms
7,648 KB
testcase_18 AC 7 ms
7,604 KB
testcase_19 AC 6 ms
7,556 KB
testcase_20 AC 6 ms
7,500 KB
testcase_21 AC 7 ms
7,488 KB
testcase_22 AC 7 ms
7,484 KB
testcase_23 AC 6 ms
7,496 KB
testcase_24 AC 6 ms
7,484 KB
testcase_25 AC 6 ms
7,584 KB
testcase_26 AC 7 ms
7,548 KB
testcase_27 AC 6 ms
7,488 KB
testcase_28 AC 6 ms
7,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int n,k;
int a[1000001];
int dp[1000001];
int cnt[1001];

int main(void){
	scanf("%d%d",&n,&k);
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(int i=1;i<=1000000;i++){
		dp[i]=i%(k+1);
	}
	int bi=0;
	for(int i=0;i<n;i++){
		bi^=dp[a[i]];
	}
	printf("%s\n",bi!=0?"YES":"NO");
	return 0;
}
0