結果
| 問題 | No.1082 XORのXOR |
| コンテスト | |
| ユーザー |
Yusei Kato
|
| 提出日時 | 2020-06-22 20:20:17 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 2,000 ms |
| コード長 | 1,033 bytes |
| コンパイル時間 | 2,321 ms |
| コンパイル使用メモリ | 110,996 KB |
| 実行使用メモリ | 27,864 KB |
| 最終ジャッジ日時 | 2024-07-03 18:46:53 |
| 合計ジャッジ時間 | 2,964 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
コンパイルメッセージ
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 Problem1082
{
class Program
{
static void Main(string[] args)
{
int N = GetInt();
var A = GetLongArray();
long max = 0;
for(int i = 0; i < N; i++)
{
for(int j = i + 1; j < N; j++)
{
max = max < (A[i] ^ A[j]) ? A[i] ^ A[j] : max;
}
}
Console.WriteLine(max);
}
public static int GetInt() => int.Parse(Console.ReadLine());
public static int[] GetIntArray() => Console.ReadLine().Split().Select(int.Parse).ToArray();
public static double GetDouble() => double.Parse(Console.ReadLine());
public static double[] GetDoubleArray() => Console.ReadLine().Split().Select(double.Parse).ToArray();
public static long GetLong() => long.Parse(Console.ReadLine());
public static long[] GetLongArray() => Console.ReadLine().Split().Select(long.Parse).ToArray();
}
}
Yusei Kato