結果
問題 | No.2881 Mod 2^N |
ユーザー |
|
提出日時 | 2024-09-08 13:31:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 82,468 KB |
実行使用メモリ | 53,856 KB |
最終ジャッジ日時 | 2024-09-08 13:31:15 |
合計ジャッジ時間 | 3,078 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
n,x,y=map(int,input().split())if x==y:print(0)print()exit()elif y%2==0:print(-1)exit()t=[]for i in range(n):if y>>i&1:t.append(i)# print(t)t.reverse()ans=[n]for i in range(len(t)-1):ans.append(t[i]-t[i+1])print(len(ans))print(*ans)