結果
問題 |
No.3280 Black-Tailed Gull vs Monster
|
ユーザー |
|
提出日時 | 2025-09-26 21:35:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 151 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 1,887 ms |
コンパイル使用メモリ | 200,080 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2025-09-26 21:35:23 |
合計ジャッジ時間 | 5,219 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 40 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main () { int n, x, q; cin >> n >> x >> q; double ans = 0; set<int> s; while (q--) { int m; cin >> m; bool ex = false, d = false; s.clear(); while (m--) { int a; cin >> a; ex = ex || (a == x); d = d || (s.find(a) != s.end()); s.insert(a); } if (ex) { ans += 1; }else if (d) { ans += 0.5; } } cout << setprecision(20) << ans << endl; }