The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3207
题意:给出N个关键字符串,然后给出k行,每行Ni个字符串,找出每行有多少个关键字符串。
用strcmp函数比较一下就行了。
#include<bits/stdc++.h>
using namespace std;
int main() {
char aa[][],bb[][];
int n,k,m,t;
cin>>n;
for(int i=; i<n; i++)
cin>>aa[i];
cin>>k;
for(int i=; i<k; i++) {
cin>>m;
t=;
for(int i=; i<m; i++) {
cin>>bb[i];
for(int j=; j<n; j++) {
if(strcmp(aa[j],bb[i])==)
t++;
}
}
cout<<t<<endl;
} return ;
}
The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory的更多相关文章
- The 6th Zhejiang Provincial Collegiate Programming Contest->Problem I:A Stack or A Queue?
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3210 题意:给出stack和queue的定义,一个是先进后出(FILO), ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Capture the Flag
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5503 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Team Formation
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5494 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Beauty of Array
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5496 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Lunch Time
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5499 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Convert QWERTY to Dvorak
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5502 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest May Day Holiday
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5500 The 12th Zhejiang Provincial ...
- zoj The 12th Zhejiang Provincial Collegiate Programming Contest Demacia of the Ancients
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5504 The 12th Zhejiang Provincial ...
- zjuoj The 12th Zhejiang Provincial Collegiate Programming Contest Ace of Aces
http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5493 The 12th Zhejiang Provincial ...
- 140 - The 12th Zhejiang Provincial Collegiate Programming Contest(第二部分)
Floor Function Time Limit: 10 Seconds Memory Limit: 65536 KB a, b, c and d are all positive int ...
随机推荐
- HDOJ2019数列有序!
数列有序! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submi ...
- CSS之照片翻转
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="C ...
- kettle 表输入+流查询 与 数据库查询
他们的主要区别: •流查询步骤只能进行等值查询,数据库查询步骤可以进行非等值查询 •流查询在查询之前把数据都加载到内存里,数据库查询可以选择是否把数据加载到内存. •进行等值查询时,数据库查询步骤如果 ...
- DOS批处理命令-goto命令
goto是一个流程控制语句 rem goto语句是一个大家都不怎么喜欢的语句,因为他的随意性太强,导致可维护性大大的降低. 语法: goto [lable] [lable]是bat程序中任意定义的 ...
- 基于asp.net的ajax分页
直接贴代码: <html> <head> <meta http-equiv="Content-Type" content="text/htm ...
- C#程序员整理的Unity 3D笔记(十三):Unity 3D基于组件的思想
如果你接触过<设计模式>.软件架构的编程思想,就会知道优秀的设计准则:“组合优于继承的”. 这句话很简短,但开始学习OOP的时候,真切的是—-不太好理解(以我个人当初学习为例). OOP的 ...
- [求助]谁能给我讲解一下,iOS编程要如何实时显示采集到的图像???
rt,最近搞一个高清图传,本着自(bu)主(mai)创(da)新(jiang)的原则,打算利用手中的iPad当作辅助飞行屏幕,USB传输数据.再说某疆图传7999(还只支持自家云台录像拍照),哪是我这 ...
- IOS中的内存不足警告处理(译)
由于在IOS中虚拟内存系统不会采用页置换的方式来获取请求内存,取而代之的是它通过移除应用程序中的强引用来释放一些内存资源,我们知道强引用在IOS中表示拥有关系,只要有至少一个变量拥有这个对象,那么对象 ...
- 当里个当,免费的HTML5连载来了《HTML5网页开发实例详解》连载(一)
读懂<HTML5网页开发实例详解>这本书 你还在用Flash嘛?帮主早不用了 乔布斯生前在公开信“Flash之我见”中预言:像HTML 5这样在移动时代中创立的新标准,将会在移动设备上获得 ...
- 洛古 P1373 小a和uim之大逃离
P1373 小a和uim之大逃离 题目提供者lzn 标签 动态规划 洛谷原创 难度 提高+/省选- 题目背景 小a和uim来到雨林中探险.突然一阵北风吹来,一片乌云从北部天边急涌过来,还伴着一道道闪电 ...