Problem 2659 --Search - Linear Search

2659: Search - Linear Search

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $11$ 正确数量 $12$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL

Search I 

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.

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.
Print C in a line.
5
1 2 3 4 5
3
3 4 1
3

n ≤ 10000

q ≤ 500 

0 ≤ an element in S ≤ 10^9 

0 ≤ an element in T ≤ 10^9

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

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] 心无眠 709687 2021-01-23 11:02:24
内存最少[$1392 $KB] 心无眠 709687 2021-01-23 11:02:24
第一AC 刘成健 333883 2018-11-29 22:21:19
第一挑战 刘成健 333883 2018-11-29 22:21:19

赛题来源/所属竞赛 会津大学《挑战数据结构与算法》 挑战数据结构与算法

竞赛编号 竞赛名称 竞赛时间 访问比赛