Logo
(追記) (追記ここまで)

30798번 - gahui and sousenkyo 6 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1.5 초 512 MB114382325.275%

문제

Gahui is watching the annual character election. After the election, The top 16 characters receive enormous benefits for one year. For that reason, fans vote passionately to get their favorite characters into the top 16. Remarkably, at least one Cinderella appears in every election, achieving an outstanding outcome.

Gahui missed the broadcast of the fascinating character election. On the Internet, there was only the following information:

  • The number of characters participating in the election is $n$.
  • No two characters have the same number of votes, and each character has received at least one vote.
  • When the bitwise-xor operation is applied to the votes of all characters, the result is $x$.
  • The number of votes for every character is less than 2ドル^{63}$.

Find character election results.

입력

$n$ and $x$ are given, separated by spaces.

출력

Print $n$ in the first line. $n$ is the number of characters participating in the election.

In the following $n$ lines, print the number of votes obtained by rank.

If there are multiple solutions, you may output any of them.

제한

  • 4ドル \le n \le 10^6$
  • 0ドル \le x \le 2^{30}$

예제 입력 1

4 3112

예제 출력 1

4
45000
43000
40000
39000

힌트

출처

Contest > BOJ User Contest > 가희와 함께 하는 코딩 테스트 > 가희와 함께 하는 6회 코딩 테스트 J번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /