結果

問題 No.3280 Black-Tailed Gull vs Monster
ユーザー daiota
提出日時 2025-09-26 22:04:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 630 bytes
コンパイル時間 1,523 ms
コンパイル使用メモリ 163,264 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-09-26 22:05:12
合計ジャッジ時間 4,452 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 35 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)














int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	ll i,j;







	ll N,X,Q;
	cin >> N >> X >> Q;


	double s=0.0;
	while(Q--){

		ll M;
		cin >> M;

		vector<ll> v(N+1,0);
		bool f=false,g=false;;
		for(i=1;i<=M;i++){

			ll F;
			cin >> F;

			if(F==X) f=true;

			v[F]++;
			if(v[F]>=2) g=true;

		}


		if(f & g) s+=1.0;
		else if(f & !g) s+=1.0;
		else if(!f & g) s+=0.5;



	}



	cout << fixed << setprecision(12) << s << endl;








	return 0;

}





0