結果

問題 No.711 競技レーティング単調増加
ユーザー ransewhaleransewhale
提出日時 2018-07-13 21:43:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 694 bytes
コンパイル時間 1,592 ms
コンパイル使用メモリ 162,804 KB
実行使用メモリ 6,912 KB
最終ジャッジ日時 2024-04-17 11:04:50
合計ジャッジ時間 4,671 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,376 KB
testcase_01 AC 3 ms
5,376 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 WA -
testcase_04 AC 3 ms
5,376 KB
testcase_05 WA -
testcase_06 AC 3 ms
5,376 KB
testcase_07 AC 3 ms
5,376 KB
testcase_08 AC 3 ms
5,376 KB
testcase_09 AC 3 ms
5,376 KB
testcase_10 AC 3 ms
5,376 KB
testcase_11 AC 3 ms
5,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 3 ms
5,376 KB
testcase_16 AC 3 ms
5,376 KB
testcase_17 AC 3 ms
5,376 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 70 ms
6,656 KB
testcase_31 AC 83 ms
6,656 KB
testcase_32 AC 88 ms
6,528 KB
testcase_33 AC 85 ms
6,912 KB
testcase_34 AC 76 ms
6,656 KB
testcase_35 AC 88 ms
6,656 KB
testcase_36 AC 41 ms
6,912 KB
testcase_37 AC 95 ms
6,784 KB
testcase_38 AC 67 ms
6,784 KB
testcase_39 AC 34 ms
6,016 KB
testcase_40 AC 44 ms
6,144 KB
testcase_41 AC 3 ms
5,376 KB
testcase_42 AC 39 ms
6,016 KB
testcase_43 AC 52 ms
6,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<double, int> P;
typedef pair<int, P> E;
#define MOD (1000000007ll)
#define l_ength size
#define EPS (1e-10)

void add_mod(ll &a, ll b){
	a += b;
	a %= MOD;
}

void mul_mod(ll &a, ll b){
	a *= b;
	a %= MOD;
}

int main(void){
	int n,i;
	ll a[225816],b[225816];
	fill(b,b+225816,INFLL);
	cin >> n;
	for(i=0; i<n; ++i){
		cin >> a[i];
		a[i] -= i;
	}
	for(i=0; i<n; ++i){
		if(*lower_bound(b,b+n,a[i]) == a[i]){
			*lower_bound(b,b+n,a[i]+1) = a[i];
		}else{
			*lower_bound(b,b+n,a[i]) = a[i];
		}
	}
	cout << ((n-(int)(lower_bound(b,b+n,INFLL)-b))) << endl;
	return 0;
}
0