Codeforces Manthan Codefest 19 B問題 (1000pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N, A[2000];
int cnt[2000];
{
int i, j, k, m, res, tmp;
rd(N,A(N));
m = coordcomp(N, A);
res = 0;
rep(k,N){
rep(i,m) cnt[i] = 0;
rep(i,k) if(cnt[A[i]]++) break;
if(i!=k) break;
tmp = k;
res >?= tmp;
for(j=N-1;j>=k;j--){
if(cnt[A[j]]++) break;
tmp++;
res >?= tmp;
}
}
res = N - res;
wt(res);
}
Current time: 2024年04月27日14時05分16秒
Last modified: 2019年08月30日20時25分23秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces
トップページに戻る
Logged in as: unknown user (not login)