結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
77,512 KB
testcase_01 AC 87 ms
77,480 KB
testcase_02 AC 89 ms
77,512 KB
testcase_03 AC 84 ms
77,772 KB
testcase_04 AC 87 ms
77,736 KB
testcase_05 AC 85 ms
77,832 KB
testcase_06 AC 85 ms
77,588 KB
testcase_07 AC 85 ms
77,624 KB
testcase_08 AC 87 ms
77,596 KB
testcase_09 AC 86 ms
77,532 KB
testcase_10 AC 86 ms
77,600 KB
testcase_11 AC 85 ms
77,632 KB
testcase_12 AC 85 ms
77,588 KB
testcase_13 AC 86 ms
77,608 KB
testcase_14 AC 84 ms
77,864 KB
testcase_15 AC 86 ms
77,528 KB
testcase_16 AC 86 ms
77,600 KB
testcase_17 AC 86 ms
77,600 KB
testcase_18 AC 87 ms
77,600 KB
testcase_19 AC 87 ms
77,720 KB
testcase_20 AC 87 ms
77,704 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 84 ms
77,688 KB
testcase_24 AC 84 ms
77,608 KB
testcase_25 AC 86 ms
77,512 KB
testcase_26 AC 86 ms
77,688 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 84 ms
77,616 KB
testcase_30 AC 84 ms
77,552 KB
testcase_31 AC 86 ms
77,628 KB
testcase_32 AC 85 ms
77,600 KB
testcase_33 AC 86 ms
77,740 KB
testcase_34 AC 87 ms
77,692 KB
testcase_35 AC 87 ms
77,484 KB
testcase_36 AC 87 ms
77,744 KB
testcase_37 AC 88 ms
77,652 KB
testcase_38 AC 86 ms
77,640 KB
testcase_39 AC 85 ms
77,672 KB
testcase_40 AC 84 ms
77,784 KB
testcase_41 AC 85 ms
77,628 KB
testcase_42 AC 86 ms
77,676 KB
testcase_43 AC 85 ms
77,580 KB
testcase_44 AC 88 ms
77,596 KB
testcase_45 AC 91 ms
77,720 KB
testcase_46 AC 84 ms
77,688 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 - x])
elif x == 1:
    print(dp[y - x])
elif y == n:
    print(dp[y - (x + 1)])
else:
    print(dp[y - 1 - (x + 1)])


0