結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-25 12:52:04 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 157 ms / 2,000 ms |
コード長 | 541 bytes |
コンパイル時間 | 1,131 ms |
コンパイル使用メモリ | 82,496 KB |
実行使用メモリ | 99,840 KB |
最終ジャッジ日時 | 2025-01-25 22:24:49 |
合計ジャッジ時間 | 8,295 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
import sys # sys.setrecursionlimit(10**8) def debug(*args): print(*args, file=sys.stderr) x, y = map(int, input().split()) # edges = [[] for _ in range(x*y)] edges = [] # cycle for i in range(0, x): edges.append((i+1, (i+1)%x+1)) # edges[i+1].append((i+1)%x+1) # edges[(i+1)%x+1].append(i+1) for i in range(y-1): for j in range(1, x+1): edges.append((j+x*i, j+x*(i+1))) # edges[j+x*i].append(j+x*(i+1)) # edges[j+x*(i+1)].append(j+x*i) print(x*y, x*y) for u, v in edges: print(u, v)