結果
問題 |
No.3280 Black-Tailed Gull vs Monster
|
ユーザー |
![]() |
提出日時 | 2025-09-26 21:28:15 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 115 ms / 2,000 ms |
コード長 | 832 bytes |
コンパイル時間 | 2,909 ms |
コンパイル使用メモリ | 282,928 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2025-09-26 21:28:24 |
合計ジャッジ時間 | 5,231 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 40 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define ll long long const long long mod=998244353; const long long hmod=46216567629137; int main(){ cin.tie(0)->sync_with_stdio(0); cout.tie(0); ll N,X; int Q; cin>>N>>X>>Q; long double ans=0; for(int z=1;z<=Q;z++){ int M; cin>>M; map<int,int>mp; bool umineco=0,other=0; for(int i=1;i<=M;i++){ int F; cin>>F; if(F==X){ umineco=1; } else{ if(mp.count(F)){ mp[F]++; other=1; } else mp[F]=1; } } if(umineco) ans+=1; else if(other) ans+=0.5; } cout<<ans<<endl; }