The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
来源:互联网 发布:js给select标签负值 编辑:程序博客网 时间:2024/05/01 01:00
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[30][20],bb[30][20]; int n,k,m,t; cin>>n; for(int i=0; i<n; i++) cin>>aa[i]; cin>>k; for(int i=0; i<k; i++) { cin>>m; t=0; for(int i=0; i<m; i++) { cin>>bb[i]; for(int j=0; j<n; j++) { if(strcmp(aa[j],bb[i])==0) t++; } } cout<<t<<endl; } return 0;}
0 0
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemF:Faster, Higher, Stronger
- The 6th Zhejiang Provincial Collegiate Programming Contest
- The 6th Zhejiang Provincial Collegiate Programming Contest
- The 7th Zhejiang Provincial Collegiate Programming Contest
- The 8th Zhejiang Provincial Collegiate Programming Contest / L - Javabeans
- The 8th Zhejiang Provincial Collegiate Programming Contest / M - Median
- The 8th Zhejiang Provincial Collegiate Programming Contest
- The 9th Zhejiang Provincial Collegiate Programming Contest
- The 5th Zhejiang Provincial Collegiate Programming Contest 部分题解
- The 10th Zhejiang Provincial Collegiate Programming Contest Solution
- The 11th Zhejiang Provincial Collegiate Programming Contest---Talented Chef
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 12th Zhejiang Provincial Collegiate Programming Contest
- spring【7】(spring事务详解)
- Spring MVC 无XML配置入门示例
- TYVJ2018小猫下山
- 区间dp基础(石子归并,括号匹配,整数划分。。。)
- Codeforces Round #343 (Div. 2) D. Babaei and Birthday Cake(dp、BIT)
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- C++模板简单学习
- 线上使用阿里Druid连接池首次连接MySQL异常问题
- 大数相加
- Git分支管理策略
- HTTP Live Streaming for iPhone/iPad(HLS流媒体服务器)
- The 6th Zhejiang Provincial Collegiate Programming Contest->Problem I:A Stack or A Queue?
- [1005]: Number Sequence
- Android中不能使用HttpClient了