結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2016-06-29 11:38:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 507 ms |
コンパイル使用メモリ | 65,652 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-11 22:58:10 |
合計ジャッジ時間 | 2,251 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#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] = A; ++l; } else { *std::lower_bound(L, L + l, A) = A; } } std::cout << (N - l) << '\n'; }