結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2016-06-29 11:36:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 524 ms |
コンパイル使用メモリ | 66,144 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-11 22:58:06 |
合計ジャッジ時間 | 2,221 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 29 |
ソースコード
#include <iostream> #include <algorithm> int L[100000]; int main() { int N; std::cin >> N; std::cin >> L[0]; int l = 1; for (int i = 1; i < N; ++i) { int A; std::cin >> A; if (L[l - 1] < A) { ++l; L[l] = A; } else { *std::lower_bound(L, L + l, A) = A; } } std::cout << (N - l) << '\n'; }