結果
問題 |
No.669 対決!!! 飲み比べ
|
ユーザー |
![]() |
提出日時 | 2018-04-07 05:04:45 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 564 bytes |
コンパイル時間 | 846 ms |
コンパイル使用メモリ | 106,752 KB |
実行使用メモリ | 19,584 KB |
最終ジャッジ日時 | 2024-06-26 10:56:22 |
合計ジャッジ時間 | 2,514 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 WA * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; namespace y { class Program { static void Main(string[] args) { string[] ss = Console.ReadLine().Split(); int n = int.Parse(ss[0]); int k = int.Parse(ss[1]); var a = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray(); var xor = 0; for (int i = 0; i < a.Length; i++) { xor = xor ^ a[i]; } Console.WriteLine(xor == 0 || xor == a.Sum() ? "NO" : "YES"); } } }