結果
| 問題 | No.3280 Black-Tailed Gull vs Monster | 
| コンテスト | |
| ユーザー |  timi | 
| 提出日時 | 2025-09-26 21:25:53 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 212 ms / 2,000 ms | 
| コード長 | 277 bytes | 
| コンパイル時間 | 168 ms | 
| コンパイル使用メモリ | 82,592 KB | 
| 実行使用メモリ | 120,848 KB | 
| 最終ジャッジ日時 | 2025-09-26 21:25:59 | 
| 合計ジャッジ時間 | 5,513 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 40 | 
ソースコード
N,X,Q=map(int, input().split())
ans=0
for i in range(Q):
  M=int(input())
  D=list(map(int, input().split()))
  F={};f=0
  for d in D:
    if d not in F:
      F[d]=0
    F[d]+=1
    if d!=X and F[d]>1:
      f=1 
  if X in F:
    ans+=2 
  elif f==1:
    ans+=1 
print(ans/2)
            
            
            
        