Codeforces Good Bye 2021: 2022 is NEAR A問題 - Integer Diversity

Source

Codeforces Good Bye 2021: 2022 is NEAR A問題 (500pt)
Problem description

問題概要

省略

解法

省略

cLay(version 20211231-1)のコード

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

//no-unlocked
REP(rd_int()){
  int @N, @A[N], cnt[101] = {}, res = 0;
  rep(i,N) cnt[abs(A[i])]++;
  rep(i,101) res += min(cnt[i], if[i==0, 1, 2]);
  wt(res);
}

Current time: 2024年05月19日03時26分33秒
Last modified: 2021年12月31日18時00分55秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces Codeforces_Good_Bye_2021
トップページに戻る

Logged in as: unknown user (not login)

ログイン: