結果

問題 No.3280 Black-Tailed Gull vs Monster
ユーザー rabimea
提出日時 2025-09-27 08:11:57
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 580 bytes
コンパイル時間 3,454 ms
コンパイル使用メモリ 283,056 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2025-09-27 08:12:03
合計ジャッジ時間 5,667 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using ll = long long;
using std::cin, std::cout;

int main() {
    std::ios::sync_with_stdio(false);
    int n, x, q; cin >> n >> x >> q;
    double ans = 0.0;
    while(q --) {
        int m; cin >> m;
        std::map<int, int> map;
        while(m --) {
            int a; cin >> a;
            map[a] ++;
        }
        if(map.count(x)) ans += 1.0;
        else {
            for(auto [k, c] : map)
                if(c >= 2) {
                    ans += 0.5;
                    break;
                }
        }
    }
    cout << ans << '\n';
}
0