Codeforces Good Bye 2020 B問題 (750pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N, A[1d5], cnt[2d5+1];
{
REP(rd_int()){
rd(N,(A--)(N));
rep(i,2*N+1) cnt[i] = 0;
rep(i,N) cnt[A[i]]++;
rep(i,2*N){
if(cnt[i] > 1){
cnt[i] = 1;
cnt[i+1]++;
}
}
wt(sum(cnt(2*N+1)));
}
}
Current time: 2024年04月19日10時24分25秒
Last modified: 2021年01月02日16時11分47秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Good_Bye_2020
トップページに戻る
Logged in as: unknown user (not login)