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

2019年06月08日14時23分03秒
2019年06月08日14時20分44秒

Codeforces Round #563 DIV2 D問題 - Ehab and the Expected XOR Problem

Source

Codeforces Round #563 DIV2 D問題 (1750pt)
Problem description

問題概要

省略

解法

省略

cLayversion 20190608-2)のコード

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

//no-unlocked
int N, X;

int ress, res[3d5];
int b[20], bs;
{
  int i, j, k;
  rd(N,X);

  rep(i,N){
    if(X == (1<<i)) continue;
    if(X & (1<<i)) X ^= (1<<i);
    b[bs++] = i;
  }

  rep(i,bs){
    k = ress;
    res[ress++] = (1<<b[i]);
    rep(j,k) res[ress++] = res[j];
  }

  wt(ress);
  wt(res(ress));
}

Current time: 2024年04月21日01時39分35秒
Last modified: 2019年06月08日14時23分03秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF563 CF_Div2_D
トップページに戻る

Logged in as: unknown user (not login)

ログイン: