結果
| 問題 | No.3280 Black-Tailed Gull vs Monster |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2025-09-27 15:28:34 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| + 521µs | |
| コード長 | 793 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 57,676 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-15 07:28:55 |
| 合計ジャッジ時間 | 3,062 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 40 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 3280.cc: No.3280 Black-Tailed Gull vs Monster - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_M = 200000;
/* typedef */
/* global variables */
int fs[MAX_M];
/* subroutines */
/* main */
int main() {
int n, x, qn;
scanf("%d%d%d", &n, &x, &qn);
int sum = 0;
while (qn--) {
int m;
scanf("%d", &m);
for (int i = 0; i < m; i++) scanf("%d", fs + i);
sort(fs, fs + m);
bool ua = false, fa = false;
for (int i = 0; i < m;) {
int j = i;
while (i < m && fs[j] == fs[i]) i++;
if (fs[j] == x) { ua = true; break; }
if (i - j > 1) fa = true;
}
if (ua) sum += 2;
else if (fa) sum++;
}
printf("%.1lf\n", 0.5 * sum);
return 0;
}
tnakao0123