Search II
You are given a sequence of n integers S and a sequence of different q integers T. Write a program which outputs C, the number of integers in T which are also in the set S.
Time Limit | $1$ 秒/Second(s) | Memory Limit | $512$ 兆字节/Megabyte(s) |
提交总数 | $49$ | 正确数量 | $22$ | "
裁判形式 | 标准裁判/Standard Judge | 我的状态 | 尚未尝试 |
难度 | 分类标签 | 二分 STL |
Search II
You are given a sequence of n integers S and a sequence of different q integers T. Write a program which outputs C, the number of integers in T which are also in the set S.
5
1 2 3 4 5
3
3 4 1
3
Elements in S is sorted in ascending order
n ≤ 100000 q ≤ 50000
0 ≤ an element in S ≤ 10^9
0 ≤ an element in T ≤ 10^9
本题记录 | 用 户(点击查看用户) | 运行号(点击购买题解) | 时 间 |
---|---|---|---|
算法最快[$17 $ms] | AOJ大管家 | 437176 | 2019-06-08 08:52:17 |
内存最少[$2296 $KB] | Robin | 673289 | 2020-12-01 16:10:41 |
第一AC | 刘成健 | 333462 | 2018-11-29 12:40:34 |
第一挑战 | 刘成健 | 333462 | 2018-11-29 12:40:34 |
竞赛编号 | 竞赛名称 | 竞赛时间 | 访问比赛 |
---|---|---|---|
1817 | 安科ACM集训队-2024(2)二分算法 | 2024-05-02 10:00:00 | 请登录 |
1646 | 安科ACM集训队-2021(2)二分算法 | 2021-05-02 10:00:00 | 请登录 |