結果
問題 | No.669 対決!!! 飲み比べ |
ユーザー |
|
提出日時 | 2024-07-02 15:31:50 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 636 bytes |
コンパイル時間 | 15,449 ms |
コンパイル使用メモリ | 168,684 KB |
実行使用メモリ | 186,728 KB |
最終ジャッジ日時 | 2024-07-02 15:32:09 |
合計ジャッジ時間 | 18,612 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (99 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;using System.Collections.Generic;using System.Linq;public class Program{static void Main(){//long N = long.Parse(Console.ReadLine());int N, K;{int[] vs = Console.ReadLine().Split().Select(_ => int.Parse(_)).ToArray();N = vs[0];K = vs[1];}int[] A = Console.ReadLine().Split().Select(_ => int.Parse(_)).ToArray();int xor = 0;for (int i = 0; i < N; i++)xor ^= A[i] % (K + 1);if (xor != 0)Console.WriteLine("YES");elseConsole.WriteLine("NO");}}