• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Hug_Sea
博客园    首页    新随笔    联系   管理    订阅  订阅
2012年4月26日
POJ 1995 Raising Modulo Numbers
摘要: 题意:给定M和多组Ai、Bi,求公式(A1B1+A2B2+ ... +AHBH)mod M。思路:快速幂O(logn)模板~题目链接:http://poj.org/problem?id=1995View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <algorithm> 5 #include <string> 6 #include <iostream> 7 using namespace std; 8 9 long 阅读全文
posted @ 2012-04-26 14:41 Hug_Sea 阅读(168) 评论(0) 推荐(0)
HDU 1501 Zipper
摘要: 题意:给3个字符串,问第三个串能不能由前两个构成,在不改变相互顺序的情况下!思路:记忆化搜索,开个hash数组保存,否则超时~题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1501View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algorithm> 6 #include <iostream> 7 using namespa 阅读全文
posted @ 2012-04-26 14:26 Hug_Sea 阅读(106) 评论(0) 推荐(0)
2012-04-26
摘要: 想想,学习算法已经有一年多了,这么长时间以来,一直为了自己的梦想执着的坚持着,在参加比赛后才发现,自己是那么的菜,望着蓝天、有些迷茫。 想想自己学了这么长时间的算法,学的有些杂乱,导致了学习效果不甚理想,为此,决定开始停止HDU的训练,进军POJ,系统的学习下算法,一步一个脚印,踏实的学好每一个算法! 一个人坐在实验室中,开始刷题~ 阅读全文
posted @ 2012-04-26 14:01 Hug_Sea 阅读(122) 评论(0) 推荐(0)
HDU 1496 Equations
摘要: 题意:给你四个数a,b,c,d,让你求满足等式a*x1^2+b*x2^2+c*x3^2+d*x4^2=0;的x的个数。思路:经典Hash,开两个数组分别保存正数和负数,时间复杂度降到n^2。题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1496View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <algorithm> 5 #include <string> 6 #include 阅读全文
posted @ 2012-04-26 09:29 Hug_Sea 阅读(107) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3