結果

問題 No.711 競技レーティング単調増加
ユーザー ei1333333ei1333333
提出日時 2018-06-29 22:50:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 2,039 ms
コンパイル使用メモリ 201,940 KB
実行使用メモリ 14,380 KB
最終ジャッジ日時 2023-09-13 15:31:05
合計ジャッジ時間 7,911 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
11,000 KB
testcase_01 AC 61 ms
10,972 KB
testcase_02 AC 60 ms
10,840 KB
testcase_03 AC 61 ms
10,972 KB
testcase_04 AC 61 ms
11,072 KB
testcase_05 WA -
testcase_06 AC 61 ms
11,148 KB
testcase_07 AC 61 ms
10,948 KB
testcase_08 AC 61 ms
10,916 KB
testcase_09 AC 60 ms
10,916 KB
testcase_10 AC 60 ms
11,028 KB
testcase_11 AC 60 ms
11,040 KB
testcase_12 AC 61 ms
10,952 KB
testcase_13 AC 60 ms
10,924 KB
testcase_14 AC 61 ms
10,936 KB
testcase_15 AC 60 ms
10,908 KB
testcase_16 AC 60 ms
10,916 KB
testcase_17 AC 61 ms
11,048 KB
testcase_18 AC 120 ms
12,368 KB
testcase_19 AC 119 ms
12,596 KB
testcase_20 AC 123 ms
12,948 KB
testcase_21 AC 125 ms
13,936 KB
testcase_22 AC 120 ms
13,384 KB
testcase_23 AC 130 ms
13,304 KB
testcase_24 AC 128 ms
13,436 KB
testcase_25 AC 117 ms
12,600 KB
testcase_26 WA -
testcase_27 AC 118 ms
13,288 KB
testcase_28 AC 116 ms
12,948 KB
testcase_29 AC 125 ms
13,944 KB
testcase_30 AC 122 ms
13,132 KB
testcase_31 AC 134 ms
12,212 KB
testcase_32 AC 138 ms
12,504 KB
testcase_33 AC 131 ms
14,380 KB
testcase_34 AC 125 ms
12,952 KB
testcase_35 AC 133 ms
13,932 KB
testcase_36 AC 99 ms
13,092 KB
testcase_37 AC 137 ms
14,052 KB
testcase_38 AC 116 ms
13,544 KB
testcase_39 AC 92 ms
11,916 KB
testcase_40 AC 101 ms
12,048 KB
testcase_41 AC 61 ms
10,780 KB
testcase_42 AC 94 ms
12,952 KB
testcase_43 AC 107 ms
12,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

const int INF = 1 << 30;

int main() {
  int N;
  vector< int > vs;
  cin >> N;
  for(int i = -1000000; i <= 0; i++) {
    vs.push_back(i);
  }
  for(int i = 0; i < N; i++) {
    int x;
    cin >> x;
    x -= i;
    vs.push_back(x);
  }
  vector< int > lis(vs.size(), INF);
  for(int i = 0; i < vs.size(); i++) {
    *upper_bound(begin(lis), end(lis), vs[i]) = vs[i];
  }
  int sz = lower_bound(begin(lis), end(lis), INF) - begin(lis);
  cout << vs.size() - sz << endl;
}
0