• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
LyonLys
愿意在角落唱沙哑的歌 再大声也都是给你 请用心听 不要说话 Contact me via E-mail: lyon.lys@gmail.com
博客园    首页    新随笔    联系   管理    订阅  订阅
2013年7月4日
poj 1263 Reflections (Simple Geometry)
摘要: 1263 -- Reflections 简单计算几何。题目给出射线以及若干个不相交的圆,求出射线会在哪些圆上反弹,依次写出反弹球的编号。代码如下: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 const double EPS = 1e-10; 11 template T sqr(T x) { return x * x;} 12 inline int sgn(double x) { return (x > EPS)... 阅读全文
posted @ 2013-07-04 03:25 LyonLys 阅读(340) 评论(0) 推荐(0)
hdu 4476 Cut the rope (2-pointer && simulation)
摘要: Problem - 4476 题意是,给出若干绳子,对同一根绳子只能切割一次,求出最多能获得多少长度相同的绳子。 代码中,s是最大切割长度,而当前切割长度为t/2.代码如下: 1 #include 2 #include 3 #include 4 #include 5 6 using n... 阅读全文
posted @ 2013-07-04 02:18 LyonLys 阅读(239) 评论(0) 推荐(0)
hdu 1286 找新朋友 (容斥原理 || 欧拉函数)
摘要: Problem - 1286用容斥原理做的代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 const int N = 33333;10 11 int last[N];12 void pre() {13 last[1] = 1;14 for (int i = 2; i fac;25 void getFac(int n) {26 fac.clear();27 while (n > 1) {28 fac.pus... 阅读全文
posted @ 2013-07-04 01:40 LyonLys 阅读(310) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3