結果

問題 No.2732 Similar Permutations
ユーザー Yukino DX.Yukino DX.
提出日時 2024-04-20 10:56:27
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 735 bytes
コンパイル時間 183 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 116,768 KB
最終ジャッジ日時 2024-04-20 10:56:56
合計ジャッジ時間 23,179 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,840 KB
testcase_01 AC 38 ms
51,840 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 66 ms
80,768 KB
testcase_06 WA -
testcase_07 AC 91 ms
92,544 KB
testcase_08 AC 77 ms
83,200 KB
testcase_09 AC 62 ms
75,648 KB
testcase_10 AC 152 ms
116,536 KB
testcase_11 AC 50 ms
72,108 KB
testcase_12 AC 145 ms
110,348 KB
testcase_13 AC 141 ms
110,464 KB
testcase_14 AC 144 ms
110,336 KB
testcase_15 AC 145 ms
110,344 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 140 ms
112,848 KB
testcase_19 AC 143 ms
110,608 KB
testcase_20 AC 145 ms
116,768 KB
testcase_21 AC 146 ms
110,772 KB
testcase_22 AC 101 ms
98,036 KB
testcase_23 AC 141 ms
110,640 KB
testcase_24 AC 105 ms
100,608 KB
testcase_25 AC 140 ms
110,592 KB
testcase_26 AC 127 ms
111,744 KB
testcase_27 AC 133 ms
110,844 KB
testcase_28 AC 124 ms
108,184 KB
testcase_29 WA -
testcase_30 AC 114 ms
104,660 KB
testcase_31 AC 149 ms
110,464 KB
testcase_32 AC 139 ms
112,640 KB
testcase_33 AC 142 ms
110,592 KB
testcase_34 AC 111 ms
101,656 KB
testcase_35 AC 142 ms
110,644 KB
testcase_36 AC 129 ms
112,560 KB
testcase_37 AC 143 ms
110,592 KB
testcase_38 AC 130 ms
112,512 KB
testcase_39 AC 141 ms
110,464 KB
testcase_40 AC 135 ms
111,704 KB
testcase_41 AC 143 ms
110,624 KB
testcase_42 AC 126 ms
107,648 KB
testcase_43 AC 141 ms
116,608 KB
testcase_44 AC 102 ms
97,536 KB
testcase_45 AC 149 ms
116,480 KB
testcase_46 AC 133 ms
112,524 KB
testcase_47 AC 139 ms
116,224 KB
testcase_48 AC 107 ms
100,736 KB
testcase_49 AC 147 ms
116,224 KB
testcase_50 AC 109 ms
100,480 KB
testcase_51 AC 145 ms
116,224 KB
testcase_52 AC 121 ms
111,128 KB
testcase_53 WA -
testcase_54 AC 148 ms
110,720 KB
testcase_55 AC 143 ms
110,464 KB
testcase_56 AC 140 ms
110,344 KB
testcase_57 WA -
testcase_58 AC 120 ms
104,508 KB
testcase_59 WA -
testcase_60 WA -
testcase_61 AC 100 ms
95,360 KB
testcase_62 WA -
testcase_63 AC 32 ms
53,488 KB
testcase_64 AC 34 ms
52,716 KB
testcase_65 AC 35 ms
53,352 KB
testcase_66 AC 35 ms
52,280 KB
testcase_67 AC 34 ms
52,836 KB
testcase_68 AC 34 ms
52,656 KB
testcase_69 AC 35 ms
52,776 KB
testcase_70 AC 34 ms
53,796 KB
testcase_71 AC 39 ms
53,500 KB
testcase_72 AC 34 ms
53,492 KB
testcase_73 AC 34 ms
52,284 KB
testcase_74 AC 35 ms
52,656 KB
testcase_75 AC 35 ms
53,544 KB
testcase_76 AC 33 ms
52,372 KB
testcase_77 AC 34 ms
52,004 KB
testcase_78 AC 37 ms
53,096 KB
testcase_79 AC 36 ms
52,628 KB
testcase_80 AC 34 ms
53,112 KB
testcase_81 AC 34 ms
52,996 KB
testcase_82 AC 34 ms
52,932 KB
testcase_83 AC 34 ms
52,248 KB
testcase_84 AC 34 ms
52,472 KB
testcase_85 AC 34 ms
53,016 KB
testcase_86 AC 33 ms
53,284 KB
testcase_87 AC 33 ms
53,236 KB
testcase_88 AC 33 ms
53,404 KB
testcase_89 AC 34 ms
52,828 KB
testcase_90 AC 33 ms
53,732 KB
testcase_91 AC 35 ms
52,544 KB
testcase_92 AC 40 ms
53,420 KB
testcase_93 AC 34 ms
53,184 KB
testcase_94 AC 34 ms
52,404 KB
testcase_95 AC 34 ms
52,632 KB
testcase_96 AC 32 ms
52,668 KB
testcase_97 AC 33 ms
52,528 KB
testcase_98 AC 32 ms
53,488 KB
testcase_99 AC 33 ms
52,200 KB
testcase_100 AC 32 ms
53,132 KB
testcase_101 AC 34 ms
52,560 KB
testcase_102 AC 35 ms
53,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations

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

memo = dict()
if n < 10:
    for per in permutations(range(1, n + 1)):
        xor = 0
        for i in range(n):
            xor ^= a[i] + per[i]

        if xor in memo:
            print(*memo[xor])
            print(*per)
            exit()

        memo[xor] = tuple(per)

else:
    for per in permutations(range(n - 10 + 1, n + 1)):
        xor = 0
        for i in range(10):
            xor ^= a[n - 10 + i - 1] + per[i - 1]

        if xor in memo:
            print(*(tuple(range(1, n - 10 + 1)) + memo[xor]))
            print(*(tuple(range(1, n - 10 + 1)) + tuple(per)))
            exit()

        memo[xor] = tuple(per)

print(-1)
0