主页
题目
状态
排名
OI排名
统计
题解
请登录
常用链接
AOJ考试平台
老赵的Gitee代码
编译原理模拟考试平台
Java技术手册
FCC网站
菜鸟网
在线工具箱
字节豆包GPT
代码可视化
力扣网
牛客网
洛谷
杭电OJ
CodeForce
隐藏编译器
Problem F: 4_B : Binary Search
上一题
正确率: $48.15\%$
下一题
Time Limit
$1$ 秒/Second(s)
Memory Limit
$512$ 兆字节/Megabyte(s)
提交总数
$54$
正确数量
$26$
"
裁判形式
标准裁判/Standard Judge
我的状态
尚未尝试
难度
分类标签
二分
STL
×
为本题添加算法分类(请不要超过5个)
当前分类(单击移除):
二分
STL
单击选择分类:
Description
<p> Search II </p> <p> 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. </p>
Input
In the first line n is given. In the second line, n integers are given. In the third line q is given. Then, in the fourth line, q integers are given.
Output
Print C in a line.
Sample Input
5 1 2 3 4 5 3 3 4 1
Sample Output
3
提示
<p> Elements in S is sorted in ascending order </p> <p> n ≤ 100000 q ≤ 50000 </p> <p> 0 ≤ an element in S ≤ 10^9 </p> <p> 0 ≤ an element in T ≤ 10^9 </p>
AOJ
Please Login