結果

問題 No.2045 Two Reflections
ユーザー ShirotsumeShirotsume
提出日時 2022-08-09 00:28:55
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 431 bytes
コンパイル時間 1,308 ms
コンパイル使用メモリ 81,140 KB
実行使用メモリ 65,596 KB
最終ジャッジ日時 2023-10-19 12:12:13
合計ジャッジ時間 4,294 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,264 KB
testcase_01 AC 40 ms
53,264 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 40 ms
53,264 KB
testcase_13 AC 40 ms
53,264 KB
testcase_14 AC 38 ms
53,264 KB
testcase_15 AC 39 ms
53,264 KB
testcase_16 AC 38 ms
53,264 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

n, p, q = mi()
if n > 5000:
    raise Exception
a = list(range(1, n + 1))
s = set()
s.add(tuple(a))
for i in range(n):

    a = a[:p][::-1] + a[p:]
    s.add(tuple(a))
    a = a[:n - q] + a[n - q:][::-1]
    s.add(tuple(a))

print(len(s) % 998244353)
0