結果

問題 No.669 対決!!! 飲み比べ
ユーザー GrenacheGrenache
提出日時 2018-04-01 21:15:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 191 ms / 2,000 ms
コード長 813 bytes
コンパイル時間 3,928 ms
コンパイル使用メモリ 73,356 KB
実行使用メモリ 56,088 KB
最終ジャッジ日時 2023-09-08 12:35:05
合計ジャッジ時間 9,409 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
56,088 KB
testcase_01 AC 127 ms
55,716 KB
testcase_02 AC 126 ms
56,080 KB
testcase_03 AC 126 ms
55,876 KB
testcase_04 AC 126 ms
55,720 KB
testcase_05 AC 125 ms
55,716 KB
testcase_06 AC 126 ms
55,704 KB
testcase_07 AC 126 ms
55,744 KB
testcase_08 AC 130 ms
55,932 KB
testcase_09 AC 126 ms
55,784 KB
testcase_10 AC 129 ms
55,708 KB
testcase_11 AC 128 ms
55,692 KB
testcase_12 AC 131 ms
55,496 KB
testcase_13 AC 131 ms
55,824 KB
testcase_14 AC 129 ms
55,848 KB
testcase_15 AC 128 ms
55,688 KB
testcase_16 AC 136 ms
55,548 KB
testcase_17 AC 126 ms
55,784 KB
testcase_18 AC 133 ms
55,660 KB
testcase_19 AC 130 ms
55,604 KB
testcase_20 AC 130 ms
55,560 KB
testcase_21 AC 130 ms
55,716 KB
testcase_22 AC 136 ms
53,828 KB
testcase_23 AC 191 ms
55,744 KB
testcase_24 AC 168 ms
54,100 KB
testcase_25 AC 125 ms
55,716 KB
testcase_26 AC 128 ms
55,592 KB
testcase_27 AC 127 ms
55,680 KB
testcase_28 AC 127 ms
55,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder669 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		int k = sc.nextInt();

		int xor = 0;
		for (int i = 0; i < n; i++) {
			int a = sc.nextInt();

			xor ^= a % (k + 1);
		}

		if (xor == 0) {
			pr.println("NO");
		} else {
			pr.println("YES");
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0