2020年12月05日15時19分38秒に更新されたバージョンを表示しています.
最新のページはこちらをご覧ください.
Codeforces Round #688 DIV2 D問題 (2000pt)
Problem description
省略
省略
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年05月04日23時45分32秒
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)