結果

問題 No.630 門松グラフ
ユーザー KoshStormKoshStorm
提出日時 2018-01-05 22:53:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 486 bytes
コンパイル時間 522 ms
コンパイル使用メモリ 10,996 KB
実行使用メモリ 13,268 KB
最終ジャッジ日時 2023-08-24 21:09:41
合計ジャッジ時間 6,903 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
8,296 KB
testcase_02 AC 16 ms
8,096 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,824 KB
testcase_05 AC 15 ms
8,320 KB
testcase_06 AC 16 ms
8,280 KB
testcase_07 AC 15 ms
8,276 KB
testcase_08 AC 15 ms
7,864 KB
testcase_09 AC 16 ms
8,248 KB
testcase_10 AC 16 ms
8,300 KB
testcase_11 WA -
testcase_12 AC 15 ms
7,828 KB
testcase_13 AC 15 ms
8,244 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 15 ms
7,780 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 16 ms
8,168 KB
testcase_22 WA -
testcase_23 AC 16 ms
8,164 KB
testcase_24 WA -
testcase_25 AC 15 ms
8,336 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M = map(int,input().split(" "))

if M > ((N-2) * 2) or (N-1) > M :
	print("NO")
	exit(0)
else:
	print("YES")

a = [100000,99999]
remain_ver = [i for i in range(1,N-1)]
a.extend(remain_ver)

for num in a:
	print(num,end=" ")
print()

if M % 2 == 0:
	for i in range(3,N+1):
		if M == 0:
			exit(0)
		print(str(i) + " 1")
		print(str(i) + " 2")
		M -= 2
else:
	for i in range(3,N+1):
		if M == 1:
			print(str(i) + " 1")
			exit(0)
		print(str(i) + " 1")
		print(str(i) + " 2")
		M -= 2
0