結果
| 問題 |
No.2522 Fall in love, Girls!
|
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2022-01-24 17:39:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 338 bytes |
| コンパイル時間 | 597 ms |
| コンパイル使用メモリ | 82,516 KB |
| 実行使用メモリ | 66,952 KB |
| 最終ジャッジ日時 | 2024-09-25 13:15:24 |
| 合計ジャッジ時間 | 3,833 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 30 |
ソースコード
import sys
input = sys.stdin.readline
n, s = map(int, input().split())
a = [1, 2]
for i in range(n - 2):
a.append(a[i] + a[i + 1])
if(sum(a) < s):
print("No")
exit(0)
print("Yes")
cnt = 0
ans = []
for i in range(n - 1, -1, -1):
if(a[i] <= s):
ans.append(i + 1)
cnt += 1
s -= a[i];
if(s == 0):
break
print(cnt)
print(*ans)
MasKoaTS