結果

問題 No.669 対決!!! 飲み比べ
ユーザー DameningenDameningen
提出日時 2018-03-23 23:23:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,034 bytes
コンパイル時間 840 ms
コンパイル使用メモリ 89,476 KB
実行使用メモリ 7,484 KB
最終ジャッジ日時 2023-09-07 04:18:58
合計ジャッジ時間 2,070 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
5,784 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
5,528 KB
testcase_06 AC 4 ms
6,748 KB
testcase_07 AC 2 ms
5,676 KB
testcase_08 AC 2 ms
5,588 KB
testcase_09 WA -
testcase_10 AC 4 ms
7,060 KB
testcase_11 AC 6 ms
7,456 KB
testcase_12 AC 2 ms
5,364 KB
testcase_13 AC 3 ms
5,800 KB
testcase_14 AC 2 ms
5,540 KB
testcase_15 AC 2 ms
5,672 KB
testcase_16 AC 2 ms
5,456 KB
testcase_17 AC 2 ms
5,352 KB
testcase_18 AC 2 ms
5,352 KB
testcase_19 AC 2 ms
5,464 KB
testcase_20 AC 2 ms
5,408 KB
testcase_21 AC 2 ms
5,416 KB
testcase_22 AC 2 ms
5,448 KB
testcase_23 AC 6 ms
7,484 KB
testcase_24 AC 2 ms
5,568 KB
testcase_25 AC 2 ms
5,440 KB
testcase_26 AC 2 ms
5,408 KB
testcase_27 AC 2 ms
5,524 KB
testcase_28 AC 2 ms
5,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstring>
#include<string>
#include<vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<list>
#include<set>
#include<map>
#include<complex>
#include<sstream>
#include<climits>
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define all(X) (X).begin(),(X).end()
#define pb push_back
#define mk make_pair
#define fi first
#define sc second
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

const int MAX_N = 1e6, MAX_A = 1e6;

int n, k;
int a[MAX_N];

int grendy[MAX_A+1];


int main() {
  cin >> n >> k;
  rep(i,n) cin >> a[i];

  grendy[0] = 0;

  int max_a = *max_element(a, a+n);

  for (int j = 1; j <= max_a; ++j) {
    grendy[j] = j % k;
  }

  int win = 0;
  for (int i = 0; i < n; ++i) win ^= grendy[a[i]];

  if (win != 0) puts("YES");
  else puts("NO");

  return 0;
}

0