結果
問題 |
No.3280 Black-Tailed Gull vs Monster
|
ユーザー |
|
提出日時 | 2025-09-26 21:28:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 179 ms / 2,000 ms |
コード長 | 957 bytes |
コンパイル時間 | 3,932 ms |
コンパイル使用メモリ | 257,360 KB |
実行使用メモリ | 12,928 KB |
最終ジャッジ日時 | 2025-09-26 21:28:13 |
合計ジャッジ時間 | 7,125 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 40 |
ソースコード
#include<iostream> #include<atcoder/all> #include<vector> #include<algorithm> #include<bits/stdc++.h> #include<math.h> #include <numeric> #include <random> #include<map> #include<queue> #include<deque> #include <bitset> #include<stack> #include<set> using namespace std; using namespace atcoder; #define int long long using mint=modint998244353; double pi=3.141592653589793128; //cout << fixed << setprecision(10); #define all(x) (x).begin(),(x).end() #define rep(i,n) for (int i=0;i<(n);++i) #define prep(i,n) for (int i=1;i<=(n);++i) #define ep(i,j,n) for (int i=j+1;i<=(n);++i) long long INF = 900000000000000; int mod=998244353; signed main(){ int n,x,q;cin>>n>>x>>q; double ans=0.0; rep(i,q){ int m;cin>>m; map<int,int> mp; int p=1;int q=1; rep(j,m){ int c;cin>>c; if(c==x)p=0; else{mp[c]++;} if(mp[c]==2)q=0; } if(p==0){ans+=1.0;continue;} if(q==0)ans+=0.5; } cout<<ans; }