結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-19 21:12:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 372 bytes |
| コンパイル時間 | 1,843 ms |
| コンパイル使用メモリ | 168,580 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-10-01 23:02:32 |
| 合計ジャッジ時間 | 3,627 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const int INF = 1e9;
signed main(){
int n; cin >> n;
vector<int> a(n), dp(n, INF);
for(int i = 0; i < n; i++) scanf("%d", &a[i]);
for(int i = 0; i < n; i++){
*lower_bound(dp.begin(), dp.end(), a[i]) = a[i];
}
cout << n - (lower_bound(dp.begin(), dp.end(), INF) - dp.begin()) << endl;
}