結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
4,548 KB
testcase_01 AC 14 ms
4,472 KB
testcase_02 AC 14 ms
4,508 KB
testcase_03 AC 14 ms
4,660 KB
testcase_04 AC 14 ms
4,544 KB
testcase_05 WA -
testcase_06 AC 14 ms
4,616 KB
testcase_07 AC 14 ms
4,660 KB
testcase_08 AC 14 ms
4,604 KB
testcase_09 AC 14 ms
4,676 KB
testcase_10 AC 14 ms
4,660 KB
testcase_11 AC 14 ms
4,508 KB
testcase_12 AC 14 ms
4,656 KB
testcase_13 AC 14 ms
4,688 KB
testcase_14 AC 14 ms
4,688 KB
testcase_15 AC 14 ms
4,824 KB
testcase_16 AC 14 ms
4,660 KB
testcase_17 AC 14 ms
4,828 KB
testcase_18 AC 72 ms
6,228 KB
testcase_19 AC 69 ms
6,040 KB
testcase_20 AC 74 ms
6,112 KB
testcase_21 AC 77 ms
6,180 KB
testcase_22 AC 72 ms
6,096 KB
testcase_23 AC 80 ms
6,072 KB
testcase_24 AC 80 ms
6,236 KB
testcase_25 AC 67 ms
5,956 KB
testcase_26 WA -
testcase_27 AC 68 ms
6,124 KB
testcase_28 AC 67 ms
5,912 KB
testcase_29 AC 77 ms
6,224 KB
testcase_30 AC 73 ms
5,856 KB
testcase_31 AC 86 ms
6,304 KB
testcase_32 AC 91 ms
6,224 KB
testcase_33 AC 83 ms
6,032 KB
testcase_34 AC 78 ms
6,176 KB
testcase_35 AC 85 ms
6,176 KB
testcase_36 AC 51 ms
6,116 KB
testcase_37 AC 91 ms
6,092 KB
testcase_38 AC 68 ms
6,096 KB
testcase_39 AC 43 ms
5,320 KB
testcase_40 AC 52 ms
5,644 KB
testcase_41 AC 14 ms
4,468 KB
testcase_42 AC 45 ms
5,240 KB
testcase_43 AC 59 ms
5,768 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 = -200000; 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