結果

問題 No.3280 Black-Tailed Gull vs Monster
ユーザー highlighter
提出日時 2025-09-13 22:35:56
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 412 bytes
コンパイル時間 3,135 ms
コンパイル使用メモリ 283,636 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-13 22:36:02
合計ジャッジ時間 6,454 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
	int N,X,Q;
	cin >> N >> X >> Q;
	int ans=0;
	for(;Q--;){
		int M;
		cin >> M;
		vector<int> F(M);
		for(int i=0;i<M;i++) cin >> F[i];
		sort(F.begin(),F.end());
		F.erase(unique(F.begin(),F.end()),F.end());
		if(binary_search(F.begin(),F.end(),X)) ans+=2;
		else if((int)(F.size())!=M) ans++;
	}
	cout << ans/2;
	if(ans&1) cout << ".5";
	cout << '\n';
}
0