結果
問題 |
No.2844 Birthday Party Decoration
|
ユーザー |
|
提出日時 | 2024-09-30 13:42:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 282 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 82,352 KB |
実行使用メモリ | 75,108 KB |
最終ジャッジ日時 | 2024-09-30 13:42:54 |
合計ジャッジ時間 | 909 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 4 |
ソースコード
T = int(input()) for _ in range(T): N, X = map(int, input().split()) C = list(map(int, input().split())) ans = 0 for c in C: if X >> c & 1 == 0: mask = ((1 << c) - 1) & X ans = max(ans, ((X | (1 << c)) ^ mask) - X) print(2 * ans)