Codeforces Round #704 DIV2 B問題 - Card Deck

Source

Codeforces Round #704 DIV2 B問題 (1000pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20210223-1)のコード

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

//no-unlocked
int N, A[1d5];
int res[1d5], ind[1d5];
{
  REP(rd_int()){
    int ress = 0;
    rd(N,(A--)(N));
    rep(i,N) ind[A[i]] = i;
    RREP(i,N) if(ind[i] < N){
      rep(j,ind[i],N) res[ress++] = A[j];
      N = ind[i];
    }
    wt(res(ress) + 1);
  }
}

Current time: 2024年03月29日10時57分46秒
Last modified: 2021年02月24日08時17分34秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF704 CF_DIV2_B
トップページに戻る

Logged in as: unknown user (not login)

ログイン: