結果
| 問題 |
No.3280 Black-Tailed Gull vs Monster
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-26 22:00:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 631 bytes |
| コンパイル時間 | 1,357 ms |
| コンパイル使用メモリ | 163,460 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-09-26 22:00:26 |
| 合計ジャッジ時間 | 4,355 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 35 RE * 5 |
ソースコード
#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;
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;
}