結果

問題 No.994 ばらばらコイン
ユーザー flippergoflippergo
提出日時 2020-12-30 09:49:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 202 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 93,952 KB
最終ジャッジ日時 2024-04-16 06:40:57
合計ジャッジ時間 4,279 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,584 KB
testcase_01 AC 42 ms
52,480 KB
testcase_02 AC 157 ms
93,952 KB
testcase_03 AC 202 ms
93,696 KB
testcase_04 AC 198 ms
93,824 KB
testcase_05 AC 137 ms
85,120 KB
testcase_06 AC 201 ms
93,952 KB
testcase_07 AC 198 ms
93,696 KB
testcase_08 AC 156 ms
88,576 KB
testcase_09 AC 194 ms
93,824 KB
testcase_10 AC 161 ms
88,832 KB
testcase_11 AC 174 ms
90,112 KB
testcase_12 AC 183 ms
91,904 KB
testcase_13 AC 42 ms
51,456 KB
testcase_14 AC 42 ms
51,840 KB
testcase_15 AC 41 ms
51,840 KB
testcase_16 AC 42 ms
51,456 KB
testcase_17 AC 43 ms
51,712 KB
testcase_18 AC 43 ms
51,840 KB
testcase_19 AC 42 ms
51,584 KB
testcase_20 AC 42 ms
52,096 KB
testcase_21 AC 42 ms
51,712 KB
testcase_22 AC 41 ms
51,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
G = {i:[] for i in range(1,N+1)}
for _ in range(N-1):
    a,b = map(int,input().split())
    G[a].append(b)
    G[b].append(a)
if K>N:
    print(-1)
else:
    print(K-1)
0