結果
問題 | No.994 ばらばらコイン |
ユーザー |
![]() |
提出日時 | 2020-02-21 21:30:41 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 60 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 1,794 ms |
コンパイル使用メモリ | 190,848 KB |
最終ジャッジ日時 | 2025-01-09 01:26:42 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 10000000000000000 int main(){ int N,K; cin>>N>>K; for(int i=0;i<N-1;i++){ int a,b; cin>>a>>b; } if(N<K){ cout<<-1<<endl; } else{ cout<<K-1<<endl; } return 0; }