This documentation is automatically generated by online-judge-tools/verification-helper
# verification-helper: PROBLEM https://atcoder.jp/contests/abc235/tasks/abc235_c
import sequtils, strutils
include cplib/collections/defaultdict
var n, q, x, k: int
(n, q) = stdin.readLine.split.map parseInt
var d = initDefaultDict[int, seq[int]](newSeq[int](0))
var a = stdin.readLine.split.map parseInt
for i in 0..<n:
d[a[i]].add(i+1)
var ans = newSeq[int](q)
for i in 0..<q:
(x, k) = stdin.readLine.split.map parseInt
if d[x].len < k: ans[i] = -1
else: ans[i] = d[x][k-1]
echo ans.join("\n")
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.12/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.local/lib/python3.12/site-packages/onlinejudge_verify/languages/nim.py", line 86, in bundle
raise NotImplementedError
NotImplementedError