結果

問題 No.2732 Similar Permutations
コンテスト
ユーザー kusirakusira
提出日時 2024-04-05 18:07:29
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 316 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 269 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 109,696 KB
最終ジャッジ日時 2026-04-17 02:05:11
合計ジャッジ時間 19,079 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40 RE * 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]+A[i]
    if(y in dic):
        print(*dic[y])
        print(*P)
        exit()
    dic[y] = P

print(-1)
0