結果
問題 | No.1304 あなたは基本が何か知っていますか?私は知っています. |
ユーザー | mkawa2 |
提出日時 | 2021-02-10 11:03:27 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 548 ms / 2,000 ms |
コード長 | 1,068 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-06-12 17:25:28 |
合計ジャッジ時間 | 35,674 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 29 ms
10,496 KB |
testcase_01 | AC | 34 ms
10,624 KB |
testcase_02 | AC | 29 ms
10,624 KB |
testcase_03 | AC | 58 ms
10,624 KB |
testcase_04 | AC | 548 ms
10,752 KB |
testcase_05 | AC | 244 ms
10,624 KB |
testcase_06 | AC | 33 ms
10,496 KB |
testcase_07 | AC | 480 ms
10,496 KB |
testcase_08 | AC | 70 ms
10,624 KB |
testcase_09 | AC | 403 ms
10,752 KB |
testcase_10 | AC | 344 ms
10,624 KB |
testcase_11 | AC | 419 ms
10,624 KB |
testcase_12 | AC | 324 ms
10,624 KB |
testcase_13 | AC | 245 ms
10,752 KB |
testcase_14 | AC | 300 ms
10,752 KB |
testcase_15 | AC | 272 ms
10,624 KB |
testcase_16 | AC | 336 ms
10,752 KB |
testcase_17 | AC | 81 ms
10,752 KB |
testcase_18 | AC | 304 ms
10,624 KB |
testcase_19 | AC | 184 ms
10,624 KB |
testcase_20 | AC | 53 ms
10,624 KB |
testcase_21 | AC | 158 ms
10,624 KB |
testcase_22 | AC | 348 ms
10,624 KB |
testcase_23 | AC | 399 ms
10,496 KB |
testcase_24 | AC | 507 ms
10,624 KB |
testcase_25 | AC | 49 ms
10,624 KB |
testcase_26 | AC | 64 ms
10,624 KB |
testcase_27 | AC | 80 ms
10,624 KB |
testcase_28 | AC | 55 ms
10,752 KB |
testcase_29 | AC | 55 ms
10,624 KB |
testcase_30 | AC | 35 ms
10,496 KB |
testcase_31 | AC | 46 ms
10,624 KB |
testcase_32 | AC | 82 ms
10,624 KB |
testcase_33 | AC | 47 ms
10,624 KB |
testcase_34 | AC | 81 ms
10,496 KB |
testcase_35 | AC | 48 ms
10,752 KB |
testcase_36 | AC | 47 ms
10,624 KB |
testcase_37 | AC | 45 ms
10,752 KB |
testcase_38 | AC | 32 ms
10,496 KB |
testcase_39 | AC | 39 ms
10,624 KB |
testcase_40 | AC | 48 ms
10,624 KB |
testcase_41 | AC | 42 ms
10,752 KB |
testcase_42 | AC | 50 ms
10,752 KB |
testcase_43 | AC | 46 ms
10,624 KB |
testcase_44 | AC | 46 ms
10,496 KB |
04_evil_A_01 | RE | - |
04_evil_A_02 | RE | - |
04_evil_A_03 | RE | - |
04_evil_A_04 | RE | - |
04_evil_A_05 | RE | - |
04_evil_A_06 | RE | - |
04_evil_A_07 | RE | - |
04_evil_A_08 | RE | - |
04_evil_A_09 | RE | - |
04_evil_A_10 | RE | - |
05_evil_B_01 | RE | - |
05_evil_B_02 | RE | - |
05_evil_B_03 | RE | - |
05_evil_B_04 | RE | - |
05_evil_B_05 | RE | - |
05_evil_B_06 | RE | - |
05_evil_B_07 | RE | - |
05_evil_B_08 | RE | - |
05_evil_B_09 | RE | - |
05_evil_B_10 | RE | - |
06_evil_C_01 | TLE | - |
06_evil_C_02 | TLE | - |
06_evil_C_03 | TLE | - |
06_evil_C_04 | TLE | - |
06_evil_C_05 | TLE | - |
06_evil_C_06 | TLE | - |
06_evil_C_07 | TLE | - |
06_evil_C_08 | TLE | - |
06_evil_C_09 | TLE | - |
06_evil_C_10 | AC | 32 ms
10,752 KB |
ソースコード
import sys sys.setrecursionlimit(10**6) int1 = lambda x: int(x)-1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.buffer.readline()) def MI(): return map(int, sys.stdin.buffer.readline().split()) def MI1(): return map(int1, sys.stdin.buffer.readline().split()) def LI(): return list(map(int, sys.stdin.buffer.readline().split())) def LI1(): return list(map(int1, sys.stdin.buffer.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def BI(): return sys.stdin.buffer.readline().rstrip() def SI(): return sys.stdin.buffer.readline().rstrip().decode() # dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] dij = [[(-1, 0), (1, 0)], [(0, -1), (0, 1)]] inf = 10**16 md = 998244353 # md = 10**9+7 mx = 1024 n, k, x, y = MI() aa = LI() dp = [[0]*mx for _ in range(n+1)] dp[0][0] = 1 for i in range(n): for j in range(mx): if i==1 and j==0:continue if i: dp[i+1][j] -= dp[i-1][j]*(k-1) for a in aa: dp[i+1][j] += dp[i][j ^ a] # p2D(dp) ans = sum(dp[-1][j] for j in range(x, y+1)) print(ans)