///@author Sycamore, ZJNU ///@date 2017-02-09 #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { int N; cin >> N; vector<string>v(N); for (auto &e : v)cin >> e; int K, n; cin >> K; while (K--) { int c = 0; cin >> n; string t; while (n--) { cin >> t; if (find(v.begin(), v.end(), t) != v.end())c++; } cout << c << endl; } return 0; }
ZOJ 3207: 80ers' Memory
时间: 2024-12-31 02:10:18