結果

問題 No.669 対決!!! 飲み比べ
ユーザー ixTL255
提出日時 2018-07-10 23:27:29
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 1,106 ms
コンパイル使用メモリ 113,540 KB
実行使用メモリ 27,352 KB
最終ジャッジ日時 2024-09-14 00:40:52
合計ジャッジ時間 3,100 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

public class Yuki669
{
	public static void Main()
	{
		var nk = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
		var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
		var g = new List<int>();
		
		foreach(var n in a) g.Add(n % (nk[1] + 1));
		
		var ans = 0;
		foreach(var n in g)
		{
			ans = ans ^ n;
		}
		Console.WriteLine(ans == 0 ? "NO" : "YES");
	}
}
0