結果
| 問題 |
No.3280 Black-Tailed Gull vs Monster
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-27 13:47:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 124 ms / 2,000 ms |
| コード長 | 560 bytes |
| コンパイル時間 | 1,729 ms |
| コンパイル使用メモリ | 200,268 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-09-27 13:47:39 |
| 合計ジャッジ時間 | 4,319 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 40 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | scanf("%d", &t);
| ~~~~~^~~~~~~~~~
main.cpp:20:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
20 | scanf("%d", &v);
| ~~~~~^~~~~~~~~~
ソースコード
#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;
}