• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LyonLys
愿意在角落唱沙哑的歌 再大声也都是给你 请用心听 不要说话 Contact me via E-mail: lyon.lys@gmail.com
博客园    首页    新随笔    联系   管理    订阅  订阅
2012年9月21日
Minimum Expression of String 字符串最小表示
摘要: 十分详细的解释:http://hi.baidu.com/kfkkwlhvxcadotr/item/14a46a2b1f889e152a0f1c5f几道相关例题的代码: 1 #include <cstdio> 2 #include <cstring> 3 #include <cassert> 4 #include <algorithm> 5 6 using namespace std; 7 8 char buf[100001]; 9 10 int minExp(char *s) {11 int i = 0, j = 1, k = 0, t;12 i 阅读全文
posted @ 2012-09-21 18:33 LyonLys 阅读(292) 评论(0) 推荐(0)
hdu 4046 Panda
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4046 简单线段树【单点修改,查询区间】,合并两个目标区间,查找区间中目标子串的个数,子串可以有重叠的部分!AC代码:View Code 1 #include <cstring> 2 #include <cstdio> 3 #include <cassert> 4 #include <algorithm> 5 6 using namespace std; 7 8 const int maxn = 50001; 9 int cnt[maxn << 2] 阅读全文
posted @ 2012-09-21 12:34 LyonLys 阅读(158) 评论(0) 推荐(0)
poj 1442 Black Box
摘要: http://poj.org/problem?id=1442 简单BST求k大数,在线插入各个元素并查询。SBT版:View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cstdlib> 4 #include <algorithm> 5 #include <vector> 6 #include <queue> 7 8 using namespace std; 9 typedef vector<int> vi; 10 11 struct SB 阅读全文
posted @ 2012-09-21 09:15 LyonLys 阅读(164) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3