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

2020年12月05日15時19分38秒

Codeforces Round #688 DIV2 D問題 - Checkpoints

Source

Codeforces Round #688 DIV2 D問題 (2000pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20201205-1)のコード

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

//no-unlocked
int N, A[2000];
{
  REP(rd_int()){
    ll @K, c;
    if(K%2) wt(-1), continue;
    K = (K-2) / 2;
    N = c = A[0] = 1;
    while(K){
      if(K >= 2*c) A[N++] = 0, K -= (c *= 2), continue;
      A[N++] = 1;
      K -= (c = 1);
    }
    wt(N);
    wt(A(N));
  }
}

Current time: 2024年04月25日13時27分50秒
Last modified: 2020年12月05日15時19分38秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF688 CF_DIV2_D
トップページに戻る

Logged in as: unknown user (not login)

ログイン: