結果

問題 No.1880 Many Ways
ユーザー ああいいああいい
提出日時 2022-03-19 00:09:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 82,328 KB
実行使用メモリ 54,300 KB
最終ジャッジ日時 2024-04-14 12:53:09
合計ジャッジ時間 15,135 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,556 KB
testcase_01 AC 39 ms
53,228 KB
testcase_02 AC 37 ms
53,844 KB
testcase_03 AC 37 ms
53,280 KB
testcase_04 AC 39 ms
53,712 KB
testcase_05 AC 39 ms
53,676 KB
testcase_06 AC 38 ms
54,300 KB
testcase_07 AC 38 ms
52,804 KB
testcase_08 AC 38 ms
53,364 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 39 ms
53,868 KB
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

A = int(input())

edge = []
edge.append((1,39))
edge.append((1,40))
for i in range(2,38):
    edge.append((i,i+1))
edge.append((38,128))
for i in range(39,39 + 2 * 39,2):
    edge.append((i,i+2))
    #if i + 3 < 40 + 2 * 39:
    edge.append((i,i+3))
    edge.append((i+1,i+3))
    edge.append((i+1,i+2))
for k in range(40):
    mask = 1 << k
    if A & mask:
        if k < 39:
            edge.append((39 + k * 2,k + 2))
        else:
            edge.append((39 + 2 * k,128))

print(128,len(edge))
for a,b in edge:
    print(a,b)
0