結果

問題 No.3280 Black-Tailed Gull vs Monster
コンテスト
ユーザー The Forsaking
提出日時 2025-09-27 13:47:15
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 88 ms / 2,000 ms
+ 617µs
コード長 560 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,131 ms
コンパイル使用メモリ 216,684 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2026-07-15 07:22:14
合計ジャッジ時間 4,031 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
const int N = 2000086, MOD = 998244353, INF = 0x3f3f3f3f;
int n, m, w[N];



int main() {
    int x, t, v, ans = 0;
    cin >> n >> x >> m;
    while (m--) {
        int s = 0;
        scanf("%d", &t);
        map<int, int> ma;
        while (t--) {
            scanf("%d", &v);
            if (v == x) s = 2;
            if (ma.count(v)) s = max(1, s);
            ma[v]++;
        }
        ans += s;
    }
    printf("%lf\n", ans / (double)2);
    return 0;
}
0