Codeforces Round #704 DIV2 B問題 (1000pt)
Problem description
省略
省略
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)