結果
問題 |
No.686 Uncertain LIS
|
ユーザー |
![]() |
提出日時 | 2018-12-08 22:14:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 526 ms |
コンパイル使用メモリ | 47,744 KB |
実行使用メモリ | 7,936 KB |
最終ジャッジ日時 | 2024-09-14 13:22:49 |
合計ジャッジ時間 | 3,991 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 23 |
ソースコード
#include <stdio.h> #include <set> using namespace std; multiset<int> S; int main() { int N; scanf ("%d",&N); while (N--) { int x,y; scanf ("%d %d",&x,&y); auto I = S.upper_bound(y); if (I != S.end()) S.erase(I); S.insert(x+1); } printf ("%d\n",S.size()); return 0; }