結果
| 問題 |
No.1981 [Cherry 4th Tune N] アルゴリズムが破滅する例
|
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2022-06-17 22:41:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 269 bytes |
| コンパイル時間 | 432 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 62,720 KB |
| 最終ジャッジ日時 | 2024-10-09 08:57:55 |
| 合計ジャッジ時間 | 6,212 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 44 |
ソースコード
import sys
input = sys.stdin.readline
N,K=map(int,input().split())
if K==0:
print(-1)
exit()
edge = [(1,1)]
for i in range(2,N+1):
if K<N:
edge.append((i-1,i))
K+=1
edge.append((i,i))
print(len(edge))
for a,b in edge:
print(a,b)
ikoma