|
|
back to boardThe source (C++) Posted by nasko 3 Nov 2008 00:34 #include <iostream> #include <algorithm> using namespace std; void main() { int v[15000],s,z=0,i,j,n,st,t; cin>>n; for (i = 0; i <=n-1; i++) cin>>v[i]; cin>>st; for (i = 0; i <=st-1; i++) { cin>>s; if(binary_search(v,v+n,s)==true)z++; } cout<<z; } |
|
|