結果

問題 No.1831 Parasol
ユーザー first_vilfirst_vil
提出日時 2022-02-05 09:31:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 637 bytes
コンパイル時間 329 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 77,812 KB
最終ジャッジ日時 2023-09-02 06:28:30
合計ジャッジ時間 5,879 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

int1 = lambda x: int(x) - 1

# input = lambda: sys.stdin.buffer.readline()
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
i1 = lambda: int1(input())
mi = lambda: map(int, input().split())
mi1 = lambda: map(int1, input().split())
li = lambda: list(mi())
li1 = lambda: list(mi1())
lli = lambda n: [li() for _ in range(n)]

INF = float("inf")
mod = int(1e9 + 7)
# mod = 998244353

n = ii()
print(2 * n - 1)
c = [i for i in range(2 * n)]
cur = []
for i in range(1, 2 * n):
    while c[i] > 0:
        cur.append(i)
        if len(cur) == n:
            print(*cur)
            cur = []
        c[i] -= 1
0