結果

問題 No.994 ばらばらコイン
ユーザー kyo1
提出日時 2020-08-09 03:28:28
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 2,226 ms
コンパイル使用メモリ 190,644 KB
最終ジャッジ日時 2025-01-12 19:17:14
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, K;
  cin >> N >> K;
  for (int i = 0; i < N - 1; i++) {
    int a, b;
    cin >> a >> b;
  }
  if (N >= K) {
    cout << K - 1 << '\n';
  } else {
    cout << -1 << '\n';
  }
  return 0;
}
0