結果

問題 No.1082 XORのXOR
ユーザー cleanttedcleantted
提出日時 2020-06-27 20:46:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 688 ms / 2,000 ms
コード長 951 bytes
コンパイル時間 128 ms
コンパイル使用メモリ 10,860 KB
実行使用メモリ 9,676 KB
最終ジャッジ日時 2023-09-19 09:34:40
合計ジャッジ時間 19,727 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,288 KB
testcase_01 AC 26 ms
9,332 KB
testcase_02 AC 27 ms
9,284 KB
testcase_03 AC 688 ms
9,504 KB
testcase_04 AC 683 ms
9,624 KB
testcase_05 AC 683 ms
9,568 KB
testcase_06 AC 684 ms
9,648 KB
testcase_07 AC 686 ms
9,524 KB
testcase_08 AC 682 ms
9,640 KB
testcase_09 AC 684 ms
9,580 KB
testcase_10 AC 681 ms
9,552 KB
testcase_11 AC 679 ms
9,660 KB
testcase_12 AC 684 ms
9,556 KB
testcase_13 AC 682 ms
9,552 KB
testcase_14 AC 685 ms
9,548 KB
testcase_15 AC 686 ms
9,496 KB
testcase_16 AC 684 ms
9,656 KB
testcase_17 AC 682 ms
9,632 KB
testcase_18 AC 684 ms
9,632 KB
testcase_19 AC 676 ms
9,676 KB
testcase_20 AC 681 ms
9,500 KB
testcase_21 AC 680 ms
9,492 KB
testcase_22 AC 682 ms
9,500 KB
testcase_23 AC 681 ms
9,644 KB
testcase_24 AC 683 ms
9,632 KB
testcase_25 AC 684 ms
9,656 KB
testcase_26 AC 684 ms
9,544 KB
testcase_27 AC 688 ms
9,588 KB
testcase_28 AC 26 ms
9,340 KB
testcase_29 AC 27 ms
9,376 KB
testcase_30 AC 27 ms
9,340 KB
testcase_31 AC 26 ms
9,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
import copy
import heapq
import sys
import itertools
import math
import queue
from functools import lru_cache
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
mod = 10 ** 9 + 7 

def read_values(): return map(int, input().split())
def read_index(): return map(lambda x: int(x) - 1, input().split())
def read_list(): return list(read_values())
def read_lists(N): return [read_list() for n in range(N)]


class V:
    def __init__(self, f, v=None):
        self.f = f
        self.v = v
 
    def __str__(self):
        return str(self.v)
 
    def ud(self, n):
        if n is None:
            return

        if self.v is None:
            self.v = n
            return
        self.v = self.f(self.v, n) 


def main():
    N = int(input())
    A = read_list()
    
    res = V(max)
    for i in range(N - 1):
        for j in range(i, N):
            res.ud(A[i]^A[j])

    print(res)


if __name__ == "__main__":
    main()

0