結果
| 問題 | No.3280 Black-Tailed Gull vs Monster | 
| コンテスト | |
| ユーザー |  tau1235 | 
| 提出日時 | 2025-09-26 21:27:23 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 166 ms / 2,000 ms | 
| コード長 | 398 bytes | 
| コンパイル時間 | 2,580 ms | 
| コンパイル使用メモリ | 280,820 KB | 
| 実行使用メモリ | 10,496 KB | 
| 最終ジャッジ日時 | 2025-09-26 21:27:36 | 
| 合計ジャッジ時間 | 5,764 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 40 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,x,q;
  cin>>n>>x>>q;
  int s=0;
  for (int i=0;i<q;i++){
    int m;
    cin>>m;
    set<int> st;
    int cnt=0;
    for (int j=0;j<m;j++){
      int f;
      cin>>f;
      if (f==x) cnt=2;
      if (st.count(f)) cnt=max(cnt,1);
      st.insert(f);
    }
    s+=cnt;
  }
  cout<<fixed<<setprecision(10);
  cout<<double(s)/2<<endl;
}
            
            
            
        