80ers' Memory
来源:互联网 发布:cae软件 编辑:程序博客网 时间:2024/05/28 04:54
Description
I guess most of us are so called 80ers, which means that we were born in the 1980's. This group of people shared a lot of common memories. For example, the Saint Seiya, the YoYo ball, the Super Mario, and so on. Do you still remember these?
Input
There will be ONLY ONE test case.
The test case begins with a positive integer N, (N < 100).
Then there will be N lines each containing a single word describing a keyword of the typical 80ers' memories. Each word consists of letters, [a-zA-Z], numbers, [0-9], and the underline, '_'. The length of each word would be no more than 20.
Then one line follows with a positive integer K, (K < 100).
The last part of the test case will be K lines. The i-th line contains the keywords given by thei-th person and starts with a positive integer Ni. Then there will beNi words separated by white spaces. Each of these words has no more than 20 characters.
All the words are case sensitive.
Output
For each of these K people, you are asked to count the number of typical 80ers' keywords on his/her list and output it in a single line.
Sample Input
4Saint_SeiyaYoYo_ballSuper_MarioHuLuWa32 Saint_Seiya TiaoFangZi1 KTV3 HuLuWa YOYO_BALL YoYo_ball
Sample Output
102
#include <stdio.h>#include <string.h>int main(){ char youx[101][23]; int shu[101] = {0}; char game[23]; int n,k,i,j,x,y,z,m; scanf("%d",&n); for(i = 0; i<n; i++) { scanf("%s",&youx[i]); } scanf("%d",&k); for(i = 0; i<k; i++) { z = 0; scanf("%d",&m); for(j = 0; j<m; j++) { scanf("%s",&game); for(x = 0; x<n; x++) { if(!strcmp(game,youx[x])) { z++; } } } printf("%d\n",z); } return 0;}
- 80ers' Memory
- 80ers' Memory
- ZOJ3207 80ers' Memory
- ZOJ 80ers' Memory
- ZOJ3207-80ers' Memory
- F. 80ers' Memory
- zoj 3211 80ers' Memory
- ZOJ#3207:80ers' Memory
- zoj 3207 80ers' Memory(水~)
- 省赛热身赛之80ers' Memory
- ZOJ-3207-80ers' Memory【6th浙江省赛】【STL】
- ZOJ 320780ers' Memory(STL)
- 2014ACM集训13级PK赛4-80ers' Memory
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- ERS Precise Orbit Determination: Orbits
- 读取ERS 格式说明网址
- cheap 76ers 2014 jerseys
- android优化
- 关于“显示器驱动程序已停止响应并且已成功恢复”的解决方案
- 基于阿里云服务器搭建SVN服务器
- Android中的Touch事件处理流程
- Second-price Auction
- 80ers' Memory
- 关于ios中得路径详细讲解
- 黑马程序员——银行业务调度管理系统
- Harris角点检测
- CDZSC_2014上半年组队赛(1)
- java中equals方法和“==”的比较
- A Stack or A Queue?
- CSS中需要注意的地方
- eclipse failed to create the java virtual machine 问题图文解析