Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[問題案] Static Range Mode Query #959

Closed
NachiaVivias opened this issue Apr 18, 2023 · 5 comments · Fixed by #1077
Closed

[問題案] Static Range Mode Query #959

NachiaVivias opened this issue Apr 18, 2023 · 5 comments · Fixed by #1077
Labels
contributions-welcome 審査済み work in progress 担当者が決定した

Comments

@NachiaVivias
Copy link
Collaborator

NachiaVivias commented Apr 18, 2023

Problem name: Static Range Mode Query
Problem ID: static_range_mode_query

Problem

空でない数列 $X$ の最頻値とは、現れる回数が最大であるような要素のこととします。

長さ $N$ の整数列 $A _ 0 , A _ 1 , \ldots ,A _ {N-1}$ に対して、 $Q$ 個のクエリを処理してください。

クエリ: $l,r$ が与えられるので、 $(A _ l , A _ {l+1} , \ldots , A _ {r-1})$ の最頻値を求めてください。最頻値が複数存在する場合はどれでもよいです。また、その数列にその値が現れる回数を求めてください。

Constraint

  • $1 \leq N \leq 10^5$
  • $0 \leq l \lt r \leq N$
  • $0 \leq A_i \lt 10^9$

Solution / Reference

Input / Output

いつもの

Note

@NachiaVivias
Copy link
Collaborator Author

  • (1) 座圧を入れるかどうか
  • (2) 出力を一意にさせるかどうか

@maspypy
Copy link
Collaborator

maspypy commented Apr 28, 2023

$A_i \leq 10^9$ でもいいと思います。座圧せず Mo して TLE するのはわりと見かけるやらかしだと思います。
出力は一意にしないでよいと思っています。設定が自然なので。

誤植指摘: $r\leq N-1$$r\leq N$

@NachiaVivias
Copy link
Collaborator Author

誤植修正しました。 $A_i$ の範囲は Static Range Inversions Query に倣う意味も含めて $0 \leq A_i \leq 10^9$ にします。

@maspypy
Copy link
Collaborator

maspypy commented Jun 7, 2023

作業者募集。

@maspypy maspypy added the contributions-welcome 審査済み label Jun 7, 2023
@maspypy
Copy link
Collaborator

maspypy commented Jan 2, 2024

作ります。

@maspypy maspypy added the work in progress 担当者が決定した label Jan 2, 2024
@maspypy maspypy linked a pull request Jan 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions-welcome 審査済み work in progress 担当者が決定した
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants