結果

問題 No.365 ジェンガソート
ユーザー Iruyan_Zak
提出日時 2016-09-19 00:26:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 486 ms
コンパイル使用メモリ 53,820 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-17 09:07:31
合計ジャッジ時間 2,155 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int ans[100001], n, inp;
int main(){
    cin >> n;
    for(int i=0; i<n; ++i){
        cin >> inp;
        ans[inp] = ans[inp-1] + 1;
    }
    cout << n - ans[n] << endl;
}
0