結果
| 問題 |
No.3280 Black-Tailed Gull vs Monster
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-11 08:32:55 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 137 ms / 2,000 ms |
| コード長 | 531 bytes |
| コンパイル時間 | 2,799 ms |
| コンパイル使用メモリ | 283,200 KB |
| 実行使用メモリ | 12,928 KB |
| 最終ジャッジ日時 | 2025-10-11 08:33:02 |
| 合計ジャッジ時間 | 6,671 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 40 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int inf=1e18;
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
double ans=0;
int n,x,q;cin>>n>>x>>q;
while(q--){
int m;cin>>m;
map<int,int>cnt;
bool ok=false;
while(m--){
int id;cin>>id;
cnt[id]++;
if(cnt[id]>=2&&id!=x)ok=true;
}
if(cnt[x]>=1)ans++;
else if(ok)ans+=(double)1/2;
}
cout<<fixed<<setprecision(18)<<ans<<endl;
}