結果
問題 |
No.3280 Black-Tailed Gull vs Monster
|
ユーザー |
|
提出日時 | 2025-09-26 22:07:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 645 bytes |
コンパイル時間 | 1,385 ms |
コンパイル使用メモリ | 163,340 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-26 22:07:56 |
合計ジャッジ時間 | 4,340 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.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; else s+=0.0; } cout << fixed << setprecision(12) << s << endl; return 0; }