結果
| 問題 | No.2881 Mod 2^N |
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2024-09-08 12:45:29 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 63 ms / 2,000 ms |
| + 764µs | |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 243 ms |
| コンパイル使用メモリ | 96,228 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-08-25 14:50:42 |
| 合計ジャッジ時間 | 4,161 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
n, x, y = map(int, input().split())
if x == y:
print(0)
exit()
if y % 2 == 0:
print(-1)
exit()
ans = []
pre = n
for i in range(n)[::-1]:
if y >> i & 1:
ans.append(pre - i)
pre = i
print(len(ans))
print(*ans)
Kude