• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
泳裤王子
不要挂科..
博客园 首页 新随笔 联系 订阅 订阅 管理

2012年4月9日

UvaOJ 537 - Artificial Intelligence?
摘要: 题目字符串处理有个地方不知道为什么那样会wa,详见注释。另外我采用的是一行读入,然后进行字符串parse,比较麻烦。可以采用istringstream或sscanf等,从字符串再进行格式化读入,比较好。参考:http://www.cnblogs.com/shixuehunk/archive/2011/07/22/2113728.html 、http://www.cppblog.com/rakerichard/archive/2011/04/07/143608.html代码:#include<iostream> #include<cstdio> #include<c 阅读全文
posted @ 2012-04-09 21:50 泳裤王子 阅读(182) 评论(0) 推荐(0)
 
UvaOJ 10361 - Automatic Poetry
摘要: 题目简单字符串处理代码:#include<iostream> #include<string> using namespace std; #define MAXN 102 string a1, a2; void solve() { int p1 = a1.find('<', 0); int p2 = a1.find('>', 0); int p3 = a1.find('<', p2+1); int p4 = a1.find('>', p2+1); string s1 = a1.sub 阅读全文
posted @ 2012-04-09 18:31 泳裤王子 阅读(154) 评论(0) 推荐(0)
 
UvaOJ 10010 - Where's Waldorf?
摘要: 题目简单的八方向搜索,暴力即可代码:#include<cstdio> #include<cstring> #include<ctype.h> #include<iostream> using namespace std; #define bug(s) cout<<#s<<"="<<s #define stop {getchar();getchar();} #define MAXN 52 #define MAXK 22 char a[MAXN][MAXN]; char words[MAXK][ 阅读全文
posted @ 2012-04-09 17:18 泳裤王子 阅读(148) 评论(0) 推荐(0)
 
UvaOj 401 - Palindromes
摘要: 刷点水题先恢复下手感....题目代码:#include<cstdio> #include<cstring> #define MAXM 1000 char fc[MAXM]; void init() { memset(fc, 0, sizeof(fc)); fc['A'] = 'A'; fc['E'] = '3'; fc['H'] = 'H'; fc['I'] = 'I'; fc['J'] = 'L'; fc[&# 阅读全文
posted @ 2012-04-09 12:54 泳裤王子 阅读(191) 评论(0) 推荐(0)
 
Getting Started
摘要: 以后有关ACM的就写在CSDN这里。 有关项目、技术的,就写在那里 or 。 阅读全文
posted @ 2012-04-09 11:57 泳裤王子 阅读(120) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3