Educational Codeforces Round 76 C問題
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N, A[2d5], cnt[2d5];
{
REP(rd_int()){
int res = int_inf;
rd(N,(A--)(N));
rep(i,N) cnt[i] = -1;
rep(i,N){
if(cnt[A[i]] >= 0) res <?= i - cnt[A[i]] + 1;
cnt[A[i]] = i;
}
wt(if[res==int_inf, -1, res]);
}
}
Current time: 2024年04月20日18時14分53秒
Last modified: 2019年11月23日18時55分15秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces
トップページに戻る
Logged in as: unknown user (not login)