結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
4,656 KB
testcase_01 AC 14 ms
4,460 KB
testcase_02 AC 14 ms
4,468 KB
testcase_03 AC 14 ms
4,552 KB
testcase_04 AC 13 ms
4,552 KB
testcase_05 WA -
testcase_06 AC 14 ms
4,748 KB
testcase_07 AC 14 ms
4,752 KB
testcase_08 AC 13 ms
4,552 KB
testcase_09 AC 14 ms
4,660 KB
testcase_10 AC 14 ms
4,552 KB
testcase_11 AC 14 ms
4,692 KB
testcase_12 AC 14 ms
4,620 KB
testcase_13 AC 14 ms
4,652 KB
testcase_14 AC 13 ms
4,736 KB
testcase_15 AC 14 ms
4,744 KB
testcase_16 AC 14 ms
4,612 KB
testcase_17 AC 14 ms
4,556 KB
testcase_18 AC 73 ms
6,176 KB
testcase_19 AC 70 ms
5,916 KB
testcase_20 AC 74 ms
6,400 KB
testcase_21 AC 77 ms
6,224 KB
testcase_22 AC 73 ms
6,076 KB
testcase_23 AC 81 ms
6,120 KB
testcase_24 AC 79 ms
6,224 KB
testcase_25 AC 68 ms
5,960 KB
testcase_26 WA -
testcase_27 AC 69 ms
5,956 KB
testcase_28 AC 67 ms
5,916 KB
testcase_29 AC 77 ms
6,036 KB
testcase_30 AC 74 ms
5,912 KB
testcase_31 AC 86 ms
6,228 KB
testcase_32 AC 91 ms
6,112 KB
testcase_33 AC 82 ms
6,184 KB
testcase_34 AC 77 ms
6,072 KB
testcase_35 AC 85 ms
6,228 KB
testcase_36 AC 52 ms
6,028 KB
testcase_37 AC 91 ms
6,072 KB
testcase_38 AC 68 ms
6,216 KB
testcase_39 AC 44 ms
5,592 KB
testcase_40 AC 52 ms
5,860 KB
testcase_41 AC 14 ms
4,660 KB
testcase_42 AC 46 ms
5,384 KB
testcase_43 AC 59 ms
6,044 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