結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,420 KB
testcase_01 AC 2 ms
5,488 KB
testcase_02 AC 3 ms
5,888 KB
testcase_03 AC 2 ms
5,384 KB
testcase_04 AC 2 ms
5,448 KB
testcase_05 AC 2 ms
5,404 KB
testcase_06 AC 4 ms
6,520 KB
testcase_07 AC 2 ms
5,476 KB
testcase_08 AC 2 ms
5,372 KB
testcase_09 AC 2 ms
5,492 KB
testcase_10 AC 4 ms
7,336 KB
testcase_11 AC 7 ms
7,448 KB
testcase_12 AC 2 ms
5,480 KB
testcase_13 AC 3 ms
5,776 KB
testcase_14 AC 2 ms
5,440 KB
testcase_15 AC 2 ms
5,528 KB
testcase_16 AC 2 ms
5,360 KB
testcase_17 AC 2 ms
5,380 KB
testcase_18 AC 2 ms
5,444 KB
testcase_19 AC 2 ms
5,456 KB
testcase_20 AC 2 ms
5,556 KB
testcase_21 AC 2 ms
5,452 KB
testcase_22 AC 2 ms
5,448 KB
testcase_23 AC 7 ms
7,532 KB
testcase_24 AC 2 ms
5,396 KB
testcase_25 AC 2 ms
5,440 KB
testcase_26 AC 2 ms
5,440 KB
testcase_27 AC 2 ms
5,492 KB
testcase_28 AC 2 ms
5,436 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 i = 1; i <= max_a; ++i) {
    grendy[i] = i % (k+1);
  }

  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