保存されている過去のバージョンの一覧

2019年10月12日04時13分05秒

Codeforces Round #591 DIV1 B問題/DIV2 D問題 - Sequence Sorting

Source

Codeforces Round #591 DIV1 B問題 (1000pt)
Codeforces Round #591 DIV2 D問題 (2000pt)
Technocup 2020 - Elimination Round 1 D問題 (2000pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20191012-1)のコード

C++に変換後のコードはこちら

//no-unlocked
int N, A[3d5];
int f[3d5], e[3d5];
{
  int i, j, m, mx;
  REP(rd_int()){
    rd(N,A(N));
    m = coordcomp(N, A);
    rep(i,m) f[i] = N, e[i] = -1;
    rep(i,N) f[A[i]] <?= i, e[A[i]] >?= i;
    mx = j = 0;
    rep(i,1,m){
      if(e[i-1] >= f[i]) j = i;
      mx >?= i - j;
    }
    wt(m - mx - 1);
  }
}

Current time: 2024年04月17日02時52分55秒
Last modified: 2019年10月12日04時13分05秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF591 CF_Div1_B CF_Div2_D
トップページに戻る

Logged in as: unknown user (not login)

ログイン: