• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Hug_Sea
博客园    首页    新随笔    联系   管理    订阅  订阅

文章分类 -  Hash

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 阅读(109) 评论(0) 推荐(0)

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