結果

問題 No.2732 Similar Permutations
コンテスト
ユーザー kusirakusira
提出日時 2024-04-05 18:11:12
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 319 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 153 ms
コンパイル使用メモリ 85,120 KB
実行使用メモリ 101,644 KB
最終ジャッジ日時 2026-04-17 02:05:35
合計ジャッジ時間 14,672 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40 WA * 61
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import itertools

n = int(input())
A = list(map(int, input().split()))

s = max(n-10,0)
t = n-s
dic = {}

for P in itertools.permutations(range(s+1,s+t+1)):
    y = 0
    for i in range(s, s+t):
        y ^= P[i-s]+A[i]
    if(y in dic):
        print(*dic[y])
        print(*P)
        exit()
    dic[y] = P

print(-1)
0