Loading web-font TeX/Main/Regular
祝同学们学习进步,编程快乐!
Problem 2660 --4_B : Binary Search

2660: 4_B : Binary Search

"
Time Limit 1 秒/Second(s) Memory Limit 512 兆字节/Megabyte(s)
提交总数 49 正确数量 26
裁判形式 标准裁判/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.

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

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

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

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[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

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

竞赛编号 竞赛名称 竞赛时间 访问比赛
1866 安科ACM集训队-2025(2)二分算法 2025-04-24 12:00:00 请登录
1817 安科ACM集训队-2024(2)二分算法 2024-05-02 10:00:00 请登录
1646 安科ACM集训队-2021(2)二分算法 2021-05-02 10:00:00 请登录
AOJ
祝同学们学习进步,编程快乐!