Problem 2613 --Basic Operations - Count

2613: Basic Operations - Count

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $179$ 正确数量 $153$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL
Count For a given sequence of integers A={a0,a1,...,an−1}, perform the following operations. count(b,e,k): print the number of the specific values k in ab,ab+1,...,ae−1.
The input is given in the following format. n a0 a1,...,an−1 q b1 e1 k1 b2 e2 k2 : bq eq kq The number of elements n and each element ai are given in the first line and the second line respectively. In the third line, the number of queries q is given and the following q lines, q integers bi be ki are given as queries.
For each query, print the number of specified values.
9
1 4 1 4 2 1 3 5 6
3
0 9 1
1 6 1
3 7 5
3
2
0
1≤n≤1,000 −1,000,000,000≤ai,ki≤1,000,000,000 1≤q≤1,000 0≤b

推荐代码 查看2613 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] AOJ大管家 436641 2019-06-05 23:49:36
内存最少[$2016 $KB] 刘 涛 338816 2018-12-06 08:52:37
第一AC 计爱玲 281535 2018-10-07 11:12:01
第一挑战 计爱玲 281535 2018-10-07 11:12:01

赛题来源/所属竞赛 会津大学《C++ Programming II》 C++程序设计(高级)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1680 2021-2022-2学期<算法分析与设计> 第1周练习:STL容器1:vetor/list/queue/deque/sort 2022-02-21 08:00:00 请登录