結果
問題 |
No.365 ジェンガソート
|
ユーザー |
|
提出日時 | 2016-06-29 11:31:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 392 bytes |
コンパイル時間 | 594 ms |
コンパイル使用メモリ | 66,960 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 22:58:01 |
合計ジャッジ時間 | 3,413 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 23 RE * 6 |
ソースコード
#include <iostream> #include <algorithm> int L[10000]; 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'; }