POJ 3096 Surprising Strings(map 水)
来源:互联网 发布:qq代理服务器ip和端口 编辑:程序博客网 时间:2024/06/06 01:17
半夜无聊、水一道STL、没用编译器、直接记事本敲、一次通过编译、不过PE了一次、、忘记换行了
格式有点丑、毕竟记事本调格式太麻烦了
#include<stdio.h>#include<map>#include<string>#include<string.h>#include<algorithm>using namespace std;char str[105];int main(){ while(scanf("%s",str)!=EOF) { if(str[0]=='*')break; int flag=0; int len=strlen(str); if(len<=2){printf("%s is surprising.\n",str);continue;} for(int i=1;i<=len-2;i++) {if(flag==1)break; map<string,int>m;char temp[5]; for(int j=0;j<len-1;j++){if(j+i>=len)break;temp[0]=str[j];temp[1]=str[j+i];temp[2]='\0';if(m[temp]==0)m[temp]=1;else { flag=1;break; } } }if(flag==0)printf("%s is surprising.\n",str);else printf("%s is NOT surprising.\n",str); memset(str,'\0',sizeof(str)); } return 0;}
0 0
- POJ 3096 Surprising Strings(map 水)
- [POJ 3096]Surprising Strings[map]
- Surprising Strings poj 3096 map
- POJ 题目3096 Surprising Strings(map 水)
- Surprising Strings POJ 3096 (暴力+map)
- POJ 3096 Surprising Strings(STL map)
- Surprising Strings poj 3096 map的运用
- POJ 3096: Surprising Strings (水)
- poj 3096 Surprising Strings
- poj 3096 Surprising Strings
- poj 3096 Surprising Strings
- poj 3096 Surprising Strings
- POJ 3096 Surprising Strings
- POJ 3096 Surprising Strings
- POJ 3096 Surprising Strings
- poj 3096 Surprising Strings
- poj 3096 Surprising Strings
- poj 3096 Surprising Strings
- 寄存器及七种寻址方式
- linux进程、调度、线程、进程上下文等几点理解
- HashMap与HashCode()、equals()的关系---在HashMap中实现以对象为键(key)
- Vmware kernel headers 3.12-kali-686-pae找不到问题
- jquery 序列化表单进行提交笔记
- POJ 3096 Surprising Strings(map 水)
- uva10160(dfs+状态压缩)
- 单例模式之新的想法
- cocos2d-x 游戏优化方案
- Python3.2官方文档翻译--继承
- 复主键使用NEW构造函数的双参数设置
- JavaScript之cookie和客户端持久性以及脚本化HTTP
- hud 2594 Simpsons’ Hidden Talents
- MySQL5.0安装教程