結果
問題 |
No.1876 Xor of Sum
|
ユーザー |
|
提出日時 | 2025-06-19 21:00:42 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 794 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 82,608 KB |
実行使用メモリ | 72,316 KB |
最終ジャッジ日時 | 2025-06-19 21:00:47 |
合計ジャッジ時間 | 4,600 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 1 -- * 26 |
ソースコード
import os,sys,random,threading from random import randint from types import GeneratorType from functools import lru_cache from bisect import bisect_left,bisect_right from collections import Counter,defaultdict,deque from itertools import accumulate,combinations,permutations from heapq import heapify,heappop,heappush from typing import Generic,Iterable,Iterator,TypeVar,Union,List from math import sqrt,log,log10,log2 from sys import stdin, stdout, setrecursionlimit input = lambda: sys.stdin.readline().rstrip("\r\n") MI = lambda :map(int,input().split()) li = lambda :list(MI()) ii = lambda :int(input()) inf=1<<60 n=ii() a=li() f=0 for x in a: tmp=(f<<x)^(1<<x) f^=tmp #print(bin(f)) res=0 for i in range(max(a)*n+1): if f&1: res^=i f>>=1 print(res)