結果

問題 No.994 ばらばらコイン
ユーザー seriru13seriru13
提出日時 2020-02-21 23:19:30
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 923 bytes
コンパイル時間 1,990 ms
コンパイル使用メモリ 197,000 KB
実行使用メモリ 14,336 KB
最終ジャッジ日時 2024-04-17 09:20:39
合計ジャッジ時間 5,288 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 76 ms
14,336 KB
testcase_03 AC 76 ms
12,672 KB
testcase_04 AC 76 ms
12,672 KB
testcase_05 AC 35 ms
7,936 KB
testcase_06 AC 75 ms
12,672 KB
testcase_07 AC 78 ms
12,672 KB
testcase_08 AC 54 ms
9,728 KB
testcase_09 AC 75 ms
12,032 KB
testcase_10 AC 55 ms
9,856 KB
testcase_11 AC 64 ms
10,624 KB
testcase_12 AC 63 ms
11,264 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define inf 10e17
#define rep(i,n) for(long long i=0; i<n; i++)
#define repr(i,n,m) for(long long i=m; i<n; i++)
#define mod 1000000007
#define sorti(x) sort(x.begin(), x.end())
#define sortd(x) sort(x.begin(), x.end(), std::greater<long long>())
#define debug(x) std::cerr << (x) << std::endl;
#define roll(x) for (auto&& itr : x) { cerr << (itr) << " "; }

template <class T> inline void chmax(T &ans, T t) { if (t > ans) ans = t;}
template <class T> inline void chmin(T &ans, T t) { if (t < ans) ans = t;}

int dfs(const vector<vector<int>> &G, int parent, int now, int p) {
   
  
  return 1;
}

int main() {
  int n, k;
  cin >> n >> k;
  vector<vector<int>> a(n), b(n);
  rep(i, n) {
    int s, t;
    cin >> s >> t;
    a[s].push_back(t);
    b[t].push_back(s);
  }

  if (k > n) {
    cout << -1 << endl;
  } else {
    cout << k-1 << endl;
  }

}
0