結果

問題 No.1748 Parking Lot
ユーザー chineristACchineristAC
提出日時 2021-11-19 22:55:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,627 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 83,180 KB
最終ジャッジ日時 2023-08-30 09:54:19
合計ジャッジ時間 5,891 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
82,892 KB
testcase_01 AC 136 ms
83,176 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 136 ms
82,824 KB
testcase_08 AC 133 ms
82,684 KB
testcase_09 AC 132 ms
82,984 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 137 ms
83,112 KB
testcase_16 AC 134 ms
82,972 KB
testcase_17 AC 136 ms
82,816 KB
testcase_18 AC 131 ms
82,720 KB
testcase_19 AC 132 ms
82,896 KB
testcase_20 WA -
testcase_21 AC 131 ms
82,844 KB
testcase_22 AC 134 ms
82,968 KB
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()
if K!=N:
    print(K+1)
else:
    print(N-1)
0