結果
問題 |
No.3280 Black-Tailed Gull vs Monster
|
ユーザー |
![]() |
提出日時 | 2025-09-27 17:26:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 153 ms / 2,000 ms |
コード長 | 494 bytes |
コンパイル時間 | 1,455 ms |
コンパイル使用メモリ | 167,620 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2025-09-27 17:26:13 |
合計ジャッジ時間 | 5,172 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 40 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) using ll = long long; int main() { int n, x, q; cin >> n >> x >> q; double ans = 0; rep(qi, 0, q) { int m, xc = 0, fc = 0; cin >> m; set<int> st; rep(i, 0, m) { int f; cin >> f; if(f == x) xc++; else { if(st.count(f)) fc = 1; else st.insert(f); } } if(xc) ans += 2; else { if(fc) ans += 1; } } cout << fixed << setprecision(12) << ans / 2 << endl; }