結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2022-07-25 04:08:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 467 bytes |
コンパイル時間 | 2,074 ms |
コンパイル使用メモリ | 195,796 KB |
最終ジャッジ日時 | 2025-01-30 13:56:59 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; const int INF=1e9+7; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; vector<int> A(n); rep(i,n) cin>>A[i]; vector<int> L(n+1); rep(i,n+1) L[i]=INF; rep(i,n) *lower_bound(ALL(L),A[i])=A[i]; cout<<n-(lower_bound(ALL(L),INF)-L.begin())<<endl; return 0; }