結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
4,376 KB
testcase_01 AC 7 ms
4,376 KB
testcase_02 AC 8 ms
4,380 KB
testcase_03 AC 8 ms
4,376 KB
testcase_04 AC 8 ms
4,376 KB
testcase_05 WA -
testcase_06 AC 8 ms
4,376 KB
testcase_07 AC 8 ms
4,376 KB
testcase_08 AC 8 ms
4,380 KB
testcase_09 AC 8 ms
4,376 KB
testcase_10 AC 8 ms
4,380 KB
testcase_11 AC 8 ms
4,380 KB
testcase_12 AC 8 ms
4,376 KB
testcase_13 AC 8 ms
4,380 KB
testcase_14 AC 8 ms
4,376 KB
testcase_15 AC 8 ms
4,376 KB
testcase_16 AC 8 ms
4,376 KB
testcase_17 AC 8 ms
4,376 KB
testcase_18 AC 64 ms
5,296 KB
testcase_19 AC 62 ms
5,328 KB
testcase_20 AC 65 ms
5,348 KB
testcase_21 AC 68 ms
5,380 KB
testcase_22 AC 63 ms
5,380 KB
testcase_23 AC 71 ms
5,508 KB
testcase_24 AC 71 ms
5,512 KB
testcase_25 AC 58 ms
5,216 KB
testcase_26 WA -
testcase_27 AC 60 ms
5,080 KB
testcase_28 AC 56 ms
5,484 KB
testcase_29 AC 64 ms
5,308 KB
testcase_30 AC 68 ms
5,104 KB
testcase_31 AC 81 ms
5,296 KB
testcase_32 AC 86 ms
5,520 KB
testcase_33 AC 78 ms
5,520 KB
testcase_34 AC 72 ms
5,444 KB
testcase_35 AC 80 ms
5,688 KB
testcase_36 AC 39 ms
5,356 KB
testcase_37 AC 87 ms
5,384 KB
testcase_38 AC 62 ms
5,448 KB
testcase_39 AC 36 ms
4,736 KB
testcase_40 AC 45 ms
4,844 KB
testcase_41 AC 8 ms
4,380 KB
testcase_42 AC 40 ms
4,840 KB
testcase_43 AC 53 ms
5,136 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 = -100000; i < 0; i++) {
    vs.push_back(i);
  }
  for(int i = 0; i < N; i++) {
    int x;
    cin >> x;
    vs.push_back(x);
  }
  vector< int > lis(vs.size(), INF);
  for(int i = 0; i < vs.size(); i++) {
    vs[i] -= 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