結果
| 問題 | No.1689 Set Cards |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-06-04 23:33:38 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 154 ms / 2,000 ms |
| + 418µs | |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 95,604 KB |
| 実行使用メモリ | 86,192 KB |
| 最終ジャッジ日時 | 2026-07-11 05:53:54 |
| 合計ジャッジ時間 | 4,326 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
from collections import defaultdict
dic = defaultdict(int)
MOD = 998244353
N = int(input())
A = []
for i in range(N):
k, *C = list(map(int, input().split()))
tmp = 0
for c in C:
tmp |= (1 << (c - 1))
A.append(tmp)
for a in A:
for k, v in list(dic.items()):
dic[a & k] += v
dic[a & k] %= MOD
dic[a] += 1
dic[a] %= MOD
print(dic[0])
ntuda