uva 10887
来源:互联网 发布:电线传输网络信号原理 编辑:程序博客网 时间:2024/05/01 07:25
题意:用set去重水过
#include <iostream>#include <cstring>#include <cstdio>#include <set>using namespace std;char str1[1500][20];char str2[1500][20];int main(){ int cas = 1; set<string>s1; int t; scanf("%d",&t); while (t--) { int n,m; scanf("%d%d",&n,&m); getchar(); for (int i = 0; i < n; i++) gets(str1[i]); for (int i = 0; i < m; i++) gets(str2[i]); for (int i = 0; i < n; i++) for (int j = 0; j < m; j++) { char temp[30]; strcpy(temp,str1[i]); strcat(temp,str2[j]); s1.insert(temp); } printf("Case %d: %d\n",cas++,s1.size()); s1.clear(); } return 0;}
- Uva 10887
- uva 10887
- uva 10887
- uva 10887
- uva 10887(哈希)
- uva--10887+hash
- uva
- UVA
- UVA
- UVA
- uva
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- UVA
- win7下日志分析工具awstats的搭建
- LVS配置
- 8.19
- Android旋转动画不停顿
- Opencv 图片的初步处理——平滑处理
- uva 10887
- sd文件的操作和获取SD卡剩于流量和总容量
- 基址重定位
- 数据库视频总结
- 工程中常用的宏
- Siebel Clib.rename(oldFileName,newFileName) 方法
- poj 1050 To the Max
- maven资源库
- 【Lucene3.6.2入门系列】第07节_高级搜索之普通Filter和自定义Filter