結果
問題 | No.2732 Similar Permutations |
ユーザー | mkawa2 |
提出日時 | 2024-04-19 22:21:25 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,179 bytes |
コンパイル時間 | 377 ms |
コンパイル使用メモリ | 82,264 KB |
実行使用メモリ | 115,200 KB |
最終ジャッジ日時 | 2024-10-11 15:50:37 |
合計ジャッジ時間 | 24,208 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
51,968 KB |
testcase_01 | AC | 35 ms
51,968 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 67 ms
82,192 KB |
testcase_05 | AC | 66 ms
79,616 KB |
testcase_06 | AC | 51 ms
68,608 KB |
testcase_07 | WA | - |
testcase_08 | AC | 67 ms
82,432 KB |
testcase_09 | AC | 54 ms
75,008 KB |
testcase_10 | AC | 143 ms
114,688 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 142 ms
112,000 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 116 ms
103,552 KB |
testcase_18 | WA | - |
testcase_19 | AC | 144 ms
112,128 KB |
testcase_20 | AC | 140 ms
112,224 KB |
testcase_21 | AC | 147 ms
111,744 KB |
testcase_22 | AC | 100 ms
97,408 KB |
testcase_23 | AC | 145 ms
111,940 KB |
testcase_24 | AC | 101 ms
99,200 KB |
testcase_25 | AC | 140 ms
112,000 KB |
testcase_26 | AC | 124 ms
110,592 KB |
testcase_27 | AC | 140 ms
111,744 KB |
testcase_28 | AC | 119 ms
107,392 KB |
testcase_29 | AC | 141 ms
112,012 KB |
testcase_30 | AC | 114 ms
103,552 KB |
testcase_31 | AC | 140 ms
111,772 KB |
testcase_32 | AC | 132 ms
111,236 KB |
testcase_33 | AC | 140 ms
111,872 KB |
testcase_34 | AC | 107 ms
100,660 KB |
testcase_35 | AC | 139 ms
111,872 KB |
testcase_36 | AC | 134 ms
111,232 KB |
testcase_37 | AC | 142 ms
112,000 KB |
testcase_38 | AC | 129 ms
110,460 KB |
testcase_39 | AC | 140 ms
111,976 KB |
testcase_40 | AC | 127 ms
110,868 KB |
testcase_41 | AC | 144 ms
112,256 KB |
testcase_42 | AC | 119 ms
106,624 KB |
testcase_43 | AC | 145 ms
111,960 KB |
testcase_44 | AC | 96 ms
96,896 KB |
testcase_45 | AC | 142 ms
112,256 KB |
testcase_46 | AC | 131 ms
111,360 KB |
testcase_47 | AC | 141 ms
115,200 KB |
testcase_48 | AC | 109 ms
100,068 KB |
testcase_49 | AC | 139 ms
115,200 KB |
testcase_50 | AC | 108 ms
99,584 KB |
testcase_51 | AC | 139 ms
114,688 KB |
testcase_52 | AC | 127 ms
110,580 KB |
testcase_53 | WA | - |
testcase_54 | AC | 144 ms
112,128 KB |
testcase_55 | AC | 140 ms
112,088 KB |
testcase_56 | AC | 139 ms
112,136 KB |
testcase_57 | AC | 97 ms
97,024 KB |
testcase_58 | AC | 113 ms
103,772 KB |
testcase_59 | AC | 109 ms
103,168 KB |
testcase_60 | WA | - |
testcase_61 | WA | - |
testcase_62 | AC | 130 ms
110,592 KB |
testcase_63 | AC | 37 ms
52,352 KB |
testcase_64 | AC | 36 ms
51,968 KB |
testcase_65 | AC | 36 ms
52,352 KB |
testcase_66 | AC | 37 ms
52,352 KB |
testcase_67 | AC | 36 ms
52,264 KB |
testcase_68 | AC | 36 ms
52,480 KB |
testcase_69 | WA | - |
testcase_70 | WA | - |
testcase_71 | AC | 37 ms
52,352 KB |
testcase_72 | WA | - |
testcase_73 | WA | - |
testcase_74 | AC | 37 ms
52,224 KB |
testcase_75 | AC | 37 ms
52,224 KB |
testcase_76 | AC | 39 ms
52,480 KB |
testcase_77 | AC | 39 ms
52,224 KB |
testcase_78 | WA | - |
testcase_79 | AC | 38 ms
52,224 KB |
testcase_80 | AC | 36 ms
52,480 KB |
testcase_81 | WA | - |
testcase_82 | AC | 38 ms
52,480 KB |
testcase_83 | WA | - |
testcase_84 | AC | 37 ms
52,224 KB |
testcase_85 | AC | 37 ms
52,352 KB |
testcase_86 | AC | 37 ms
52,352 KB |
testcase_87 | WA | - |
testcase_88 | WA | - |
testcase_89 | AC | 37 ms
52,608 KB |
testcase_90 | AC | 36 ms
52,480 KB |
testcase_91 | WA | - |
testcase_92 | AC | 38 ms
52,480 KB |
testcase_93 | AC | 37 ms
52,224 KB |
testcase_94 | WA | - |
testcase_95 | AC | 36 ms
52,096 KB |
testcase_96 | AC | 37 ms
52,608 KB |
testcase_97 | AC | 37 ms
51,968 KB |
testcase_98 | AC | 37 ms
52,488 KB |
testcase_99 | AC | 37 ms
52,608 KB |
testcase_100 | WA | - |
testcase_101 | WA | - |
testcase_102 | WA | - |
ソースコード
import sys # sys.setrecursionlimit(200005) # sys.set_int_max_str_digits(200005) int1 = lambda x: int(x)-1 pDB = lambda *x: print(*x, end="\n", file=sys.stderr) p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LI1(): return list(map(int1, sys.stdin.readline().split())) def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def SI(): return sys.stdin.readline().rstrip() dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] # dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] # inf = -1-(-1 << 31) inf = -1-(-1 << 62) # md = 10**9+7 md = 998244353 n=II() aa=LI() if n==1: print(-1) elif n==2: p=aa[:] q=aa[:] p[0]^=1 p[1]^=2 q[0]^=2 q[1]^=1 if p==q: print(1,2) print(2,1) else: print(-1) else: i,j=0,1 if aa[i]&1!=aa[j]&1:j=2 if aa[i]&1!=aa[j]&1:i=1 p=list(range(1,n+1)) q=list(range(1,n+1)) p[i]=q[j]=2 p[j]=q[i]=3 p[3-i-j]=q[3-i-j]=1 print(*p) print(*q)