結果
| 問題 |
No.1831 Parasol
|
| コンテスト | |
| ユーザー |
nok0
|
| 提出日時 | 2021-12-07 22:31:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 424 bytes |
| コンパイル時間 | 241 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-06-11 11:22:59 |
| 合計ジャッジ時間 | 5,550 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 WA * 17 |
ソースコード
n = int(input())
print(n * 2 - 1)
ans = []
for i in range(n):
ans.append(i * 2 + 1)
idx = 0
kep = []
for i in range(n * 2 - 2):
print(*ans)
if i == n - 1:
kep = ans.copy()
if i < n - 1:
ans[idx] = (n - 1 - i) * 2
idx += 1
elif i < n * 2 - 3:
idx -= 1
ans[idx] = n - (i - n + 1) * 2
if ans[idx] % 2 == 0:
ans[idx] += 1
if n > 1:
print(*kep)
nok0