保存されている過去のバージョンの一覧

2019年08月21日05時22分07秒

Codeforces Round #579 DIV3 E問題 - Boxers

Source

Codeforces Round #579 DIV3 E問題
Problem description

問題概要

省略

解法

省略

cLayversion 20190820-1)のコード

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

//no-unlocked
int N, cnt[150002];
{
  int i, res = 0;

  rd(N);
  rep(N){
    rd(i--);
    cnt[i]++;
  }

  rep(i,150001){
    if(i && cnt[i-1]){
      res++;
    } else if(cnt[i]){
      cnt[i]--;
      res++;
    } else if(cnt[i+1]){
      cnt[i+1]--;
      res++;
    }
  }

  wt(res);
}

Current time: 2024年03月29日18時13分06秒
Last modified: 2019年08月21日05時22分07秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF579 CF_Div3_E
トップページに戻る

Logged in as: unknown user (not login)

ログイン: