結果

問題 No.2719 Equal Inner Products in Permutation
ユーザー hiro1729hiro1729
提出日時 2024-04-05 23:06:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 138,060 KB
最終ジャッジ日時 2024-04-05 23:06:23
合計ジャッジ時間 8,170 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,844 KB
testcase_01 WA -
testcase_02 AC 39 ms
51,844 KB
testcase_03 AC 38 ms
51,844 KB
testcase_04 AC 38 ms
51,844 KB
testcase_05 AC 39 ms
51,844 KB
testcase_06 AC 39 ms
51,844 KB
testcase_07 AC 37 ms
51,844 KB
testcase_08 AC 38 ms
51,844 KB
testcase_09 AC 37 ms
51,844 KB
testcase_10 AC 49 ms
62,084 KB
testcase_11 AC 51 ms
62,340 KB
testcase_12 AC 49 ms
61,956 KB
testcase_13 AC 49 ms
61,828 KB
testcase_14 AC 50 ms
62,468 KB
testcase_15 AC 170 ms
127,152 KB
testcase_16 AC 172 ms
133,052 KB
testcase_17 AC 131 ms
118,196 KB
testcase_18 AC 174 ms
133,260 KB
testcase_19 AC 155 ms
126,448 KB
testcase_20 AC 123 ms
114,028 KB
testcase_21 AC 178 ms
137,416 KB
testcase_22 AC 144 ms
121,584 KB
testcase_23 AC 138 ms
122,620 KB
testcase_24 AC 121 ms
113,192 KB
testcase_25 AC 181 ms
137,884 KB
testcase_26 AC 181 ms
138,060 KB
testcase_27 AC 183 ms
138,056 KB
testcase_28 AC 180 ms
137,912 KB
testcase_29 AC 180 ms
138,060 KB
testcase_30 AC 178 ms
138,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = []
B = []
C = []
st = 0
if N % 3 == 2:
	A = [2, 4]
	B = [1, 6]
	C = [3, 5]
	st = 15
if N % 3 == 0:
	A = [1, 5, 9]
	B = [2, 6, 7]
	C = [3, 4, 8]
	st = 18
if N % 3 == 1:
	A = [1, 4, 7, 12]
	B = [2, 5, 8, 11]
	C = [3, 6, 9, 10]
	st = 21
for i in range(st, 3 * N + 1, 9):
	A += [i - 8, i - 4, i]
	B += [i - 7, i - 3, i - 2]
	C += [i - 6, i - 5, i - 1]
print(*(B + A + C))
0