結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
![]() |
提出日時 | 2025-01-25 12:53:52 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 140 ms / 2,000 ms |
コード長 | 927 bytes |
コンパイル時間 | 700 ms |
コンパイル使用メモリ | 82,512 KB |
実行使用メモリ | 78,424 KB |
最終ジャッジ日時 | 2025-01-25 22:25:49 |
合計ジャッジ時間 | 6,796 ms |
ジャッジサーバーID (参考情報) |
judge7 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
from collections import defaultdict, deque, Counter# from functools import cache# import copyfrom itertools import combinations, permutations, product, accumulate, groupby, chain# from more_itertools import distinct_permutationsfrom heapq import heapify, heappop, heappush, heappushpopimport mathimport bisect# from pprint import pprintfrom random import randint, shuffle, randrange# from sortedcontainers import SortedSet, SortedList, SortedDictimport sys# sys.setrecursionlimit(2000000)input = lambda: sys.stdin.readline().rstrip('\n')inf = float('inf')mod1 = 10**9+7mod2 = 998244353def ceil_div(x, y): return -(-x//y)#################################################X, Y = map(int, input().split())N = X*Y; M = X*Yprint(N, M)E = []for i in range(X):print(i+1, (i+1)%X+1)u = X+1for i in range(1, X+1):for j in range(Y-2):print(u, u+1)u += 1print(u, i)u += 1