結果

問題 No.1885 Flat Permutation
ユーザー ShirotsumeShirotsume
提出日時 2021-11-15 12:41:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 87,072 KB
実行使用メモリ 77,844 KB
最終ジャッジ日時 2023-09-02 07:40:38
合計ジャッジ時間 5,983 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
77,728 KB
testcase_01 AC 80 ms
77,504 KB
testcase_02 AC 84 ms
77,616 KB
testcase_03 AC 82 ms
77,844 KB
testcase_04 AC 82 ms
77,512 KB
testcase_05 AC 83 ms
77,524 KB
testcase_06 AC 83 ms
77,588 KB
testcase_07 AC 82 ms
77,568 KB
testcase_08 AC 82 ms
77,388 KB
testcase_09 AC 82 ms
77,576 KB
testcase_10 AC 81 ms
77,732 KB
testcase_11 AC 81 ms
77,608 KB
testcase_12 AC 82 ms
77,580 KB
testcase_13 AC 82 ms
77,724 KB
testcase_14 AC 79 ms
77,524 KB
testcase_15 AC 80 ms
77,484 KB
testcase_16 AC 82 ms
77,484 KB
testcase_17 AC 82 ms
77,500 KB
testcase_18 AC 82 ms
77,684 KB
testcase_19 AC 82 ms
77,508 KB
testcase_20 AC 82 ms
77,580 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 82 ms
77,344 KB
testcase_24 AC 82 ms
77,656 KB
testcase_25 AC 82 ms
77,392 KB
testcase_26 AC 81 ms
77,600 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 82 ms
77,628 KB
testcase_30 AC 82 ms
77,384 KB
testcase_31 AC 82 ms
77,572 KB
testcase_32 AC 80 ms
77,480 KB
testcase_33 AC 81 ms
77,468 KB
testcase_34 AC 82 ms
77,688 KB
testcase_35 AC 80 ms
77,480 KB
testcase_36 AC 81 ms
77,464 KB
testcase_37 AC 86 ms
77,480 KB
testcase_38 AC 82 ms
77,524 KB
testcase_39 AC 82 ms
77,480 KB
testcase_40 AC 83 ms
77,496 KB
testcase_41 AC 82 ms
77,508 KB
testcase_42 AC 82 ms
77,460 KB
testcase_43 AC 81 ms
77,456 KB
testcase_44 AC 81 ms
77,608 KB
testcase_45 AC 82 ms
77,604 KB
testcase_46 AC 82 ms
77,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x, y = map(int,input().split())
if y < x: x, y = y, x
mod = 998244353
dp = [0] * (2 * 10 ** 5 + 100)
#S = 1, T = Nの場合の答え
dp[0] = 1
for i in range(0, 2 * 10 ** 5 + 1):
    dp[i + 1] += dp[i]
    dp[i + 3] += dp[i]
    dp[i + 1] %= mod
    dp[i + 3] %= mod
if x == 1 and y == n:
    print(dp[y - 1])
elif x == 1:
    print(dp[y - 1])
elif y == n:
    print(dp[y - (x + 1)])
else:
    print(dp[y - 1 - (x + 1)])
0