結果

問題 No.1748 Parking Lot
ユーザー chineristACchineristAC
提出日時 2021-11-19 22:54:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,593 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 83,276 KB
最終ジャッジ日時 2023-08-30 09:53:24
合計ジャッジ時間 4,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
82,840 KB
testcase_01 AC 130 ms
82,972 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 127 ms
82,852 KB
testcase_08 AC 129 ms
83,032 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 127 ms
82,664 KB
testcase_16 AC 129 ms
82,660 KB
testcase_17 AC 128 ms
82,844 KB
testcase_18 AC 126 ms
83,116 KB
testcase_19 AC 136 ms
82,880 KB
testcase_20 WA -
testcase_21 AC 131 ms
82,816 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = 2*10**5
mod = 998244353
g1 = [1]*(N+1) # 元テーブル
g2 = [1]*(N+1) #逆元テーブル
inverse = [1]*(N+1) #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1[i]=( ( g1[i-1] * i ) % mod )
    inverse[i]=( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2[i]=( (g2[i-1] * inverse[i]) % mod )
inverse[0]=0

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

def fwt(n,A):
    assert len(A) == 2**n
    for i in range(n):
        t = 2**i
        for j in range(2**n):
            if j&t==0:
                A[j] += A[j|t]
    return A

def ifwt(n,A):
    assert len(A) == 2**n
    for i in range(n):
        t = 2**i
        for j in range(2**n):
            if j&t==0:
                A[j] -= A[j|t]
    return A

inv = pow(1024,mod-2,mod)
 
def _fourier(f, inverse = False):
    f = f[:]
    n = (len(f) - 1).bit_length()
    for d in range(n):
        for U in range(1 << n):
            if not U >> d & 1:
                s, t = f[U], f[U | 1 << d]
                f[U], f[U | 1 << d] = (s + t)%mod, (s - t)%mod
    if inverse:
        f = [v *inv % mod for v in f]
    return f
 
def convolution(f, g):
    return _fourier([a * b  % mod for a, b in zip(_fourier(f), _fourier(g))], inverse = 1)

import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import log,gcd

input = lambda :sys.stdin.readline()
mi = lambda :map(int,input().split())
li = lambda :list(mi())

N,K = mi()
print(K+1)
0