結果
問題 | No.817 Coin donation |
ユーザー |
|
提出日時 | 2019-04-23 21:07:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 635 ms |
コンパイル使用メモリ | 68,608 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-15 16:38:41 |
合計ジャッジ時間 | 4,854 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 13 |
ソースコード
#include <iostream> #include <vector> using namespace std; typedef long long LL; struct X{ LL A; LL B; }; int main(int argc, char* argv[]) { LL N,K,i; cin>>N>>K; vector<X> AB(N); LL A1,B1; for (i=0;i<N;i++){ cin>>AB[i].A>>AB[i].B; } LL k=0; LL M=1; while (true){ for (i=0;i<N;i++){ if (M>=AB[i].A && M<=AB[i].B){ k++; } if (k==K){ cout<<M<<endl; return 0; } } M++; } return 0; }