結果
問題 | No.1885 Flat Permutation |
ユーザー | Shirotsume |
提出日時 | 2021-11-15 12:06:09 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 332 bytes |
コンパイル時間 | 459 ms |
コンパイル使用メモリ | 87,012 KB |
実行使用メモリ | 77,656 KB |
最終ジャッジ日時 | 2023-09-02 07:40:04 |
合計ジャッジ時間 | 6,166 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge16 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | AC | 77 ms
77,252 KB |
testcase_03 | AC | 78 ms
77,252 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 78 ms
77,320 KB |
testcase_17 | AC | 77 ms
77,264 KB |
testcase_18 | AC | 76 ms
77,552 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | AC | 78 ms
77,448 KB |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | AC | 78 ms
77,468 KB |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | AC | 78 ms
77,552 KB |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | AC | 78 ms
77,360 KB |
testcase_39 | AC | 78 ms
77,616 KB |
testcase_40 | AC | 77 ms
77,452 KB |
testcase_41 | AC | 78 ms
77,564 KB |
testcase_42 | AC | 78 ms
77,324 KB |
testcase_43 | AC | 76 ms
77,508 KB |
testcase_44 | AC | 77 ms
77,324 KB |
testcase_45 | AC | 78 ms
77,332 KB |
testcase_46 | AC | 78 ms
77,400 KB |
ソースコード
n, x, y = map(int,input().split()) if y < x: x, y = y, x mod = 998244353 dp = [0] * (2 * 10 ** 5 + 1) #dp[N]: S = 1, T = Nの場合の答え dp[1] = 1 dp[2] = 1 dp[3] = 2 for i in range(4, 2 * 10 ** 5 + 1): dp[i] = dp[i - 1] + dp[i - 3] dp[i] %= mod ans = dp[(y - 1) - (x + 1)] if (y - 1) - (x + 1) > 0 else 0 print(ans)