結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-25 13:33:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 164 ms / 2,000 ms |
コード長 | 492 bytes |
コンパイル時間 | 416 ms |
コンパイル使用メモリ | 81,664 KB |
実行使用メモリ | 77,312 KB |
最終ジャッジ日時 | 2025-01-25 22:50:37 |
合計ジャッジ時間 | 8,337 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge8 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
def ii(): S = input() return map(int,S.split()) if " " in S else int(S) def ai(N = 0): return [list(map(int,input().split())) for _ in range(N)] if N!= 0 else list(map(int,input().split())) def yn(BOOL): print("Yes" if BOOL==1 else "No") import sys,math,heapq,bisect from collections import defaultdict X,Y = ii() n = X*Y print(n,n) for y in range(Y-1): for x in range(X): print(x+1+y*X,x+1+(y+1)*X) for x in range(X): print(x+1+X*(Y-1),(x+1)%X+1+X*(Y-1))