自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

CerberuX's Life

看门狗的自娱自乐

  • 博客(22)
  • 收藏
  • 关注

原创 GH60--来自geekhack的超强玩具

作为一名大二代码狗,每天接触最多的就是键盘。

2016-06-28 19:06:09 7498 3

转载 两圆相交面积万能版

struct point{ double x, y;};double dis(point a, point b){ return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));}double Area(point c1, double r1, point c2, double r2){ double tmpa = r1,

2016-10-22 14:35:08 759

原创 HDU 2509 Be the Winner(Anti-Nim)

Problem Description Let’s consider m apples divided into n groups. Each group contains no more than 100 apples, arranged in a line. You can take any number of consecutive apples at one time. For exam

2016-08-15 22:19:43 581

原创 HDU 1729 Stone Game(思维 & SG函数)

Problem Description This game is a two-player game and is played as follows:There are n boxes; each box has its size. The box can hold up to s stones if the size is s.At the beginning of the game, t

2016-08-15 21:46:08 577

原创 HDU 5828 Rikka with Sequence(线段树+小优化)

Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Yuta has an array A with n numbers. Th

2016-08-11 19:48:18 794 2

原创 HDU 5831 Rikka with Parenthesis II (栈&思维)

Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Correct parentheses sequences can be d

2016-08-11 18:14:31 706

原创 HDU 5810 Balls ans Boxes(二项分布)

Problem Description Mr. Chopsticks is interested in random phenomena, and he conducts an experiment to study randomness. In the experiment, he throws n balls into m boxes in such a manner that each ba

2016-08-09 18:29:33 982 3

原创 HDU 5795 A Simple Nim(SG打表找规律)

Problem Description Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from the same he

2016-08-04 17:03:14 1106

原创 HDU 5775 Bubble Sort(逆序对)

逆序对

2016-07-28 20:19:05 413

原创 HDU 5773 The All-purpose Zero(LIS特殊处理)

Problem Description ?? gets an sequence S with n intergers(0 < n <= 100000,0<= S[i] <= 1000000).?? has a magic so that he can change 0 to any interger(He does not need to change all 0 to the same inte

2016-07-28 19:38:16 411

原创 HDU 5762 Teacher Bo(暴力+思维)

hdu5762

2016-07-26 21:39:53 380

原创 HDU 5754 Life Winner Bo(博弈)

Problem Description Bo is a “Life Winner”.He likes playing chessboard games with his girlfriend G.The size of the chessboard is N×M.The top left corner is numbered(1,1) and the lower right corner is n

2016-07-26 20:35:49 537

原创 HDU 5745 La Vie en rose(暴力碾压过去。。。)

Problem DescriptionProfessor Zhang would like to solve the multiple pattern matching problem, but he only has only one pattern string p=p1p2...pm. So, he wants to generate as many as possible pattern s

2016-07-21 20:48:54 577

原创 HDU 5742 It's All In The Mind(贪心?)

观察给出的分式可知#include <bits/stdc++.h>using namespace std;int a[101];int main(){ int t, n, m, xi, yi; cin >> t; while(t--){ memset(a,-1,sizeof(a)); cin >> n >> m; whil

2016-07-21 19:59:03 585

原创 HDU 5744 Keep On Movin(胡搞)

Problem Description Professor Zhang has kinds of characters and the quantity of the i-th character is ai. Professor Zhang wants to use all the characters build several palindromic strings. He also wan

2016-07-21 19:52:22 457

原创 HDU 5726 GCD(RMQ+二分)(线段树也可)

hdu 5726 GCD

2016-07-20 16:27:32 748

原创 HDU 5724 Chess(博弈&状压)

hdu 5724 chess

2016-07-20 13:12:43 510

原创 “个人总结”最基础博弈套路,实力山寨

总结自kuangbin大神博客和其他查到的资料理论基础1、定义P-position和N-position:其中P代表Previous,N代表Next。直观的说,上一次move的人有必胜策略的局面是P-position,也就是“先手必败”,现在轮到move的人有必胜策略的局面是N-position,也就是“先手可保证必胜”。(1).无法进行任何移动的局面(也就是terminal position)是P

2016-06-28 18:30:00 630

原创 HDU 5038 Grade

HDU 5038 GradeProblem Description

2016-06-28 12:38:19 652

原创 C++ STL set容器常用用法

set是STL中一种标准关联容器。它底层使用平衡的搜索树——红黑树实现,插入删除操作时仅仅需要指针操作节点即可完成,不涉及到内存移动和拷贝,所以效率比较高。set,顾名思义是“集合”的意思,在set中元素都是唯一的,而且默认情况下会对元素自动进行升序排列,支持集合的交(set_intersection),差(set_difference) 并(set_union),对称差(set_symmetric

2016-06-28 10:39:09 33308 7

原创 C++ STL优先队列常用用法

STL优先队列

2016-06-26 13:08:24 13242

原创 HDU 1848 Fibonacci again and again(学习sg函数后写出来的第一个题)

HDU1848 Fibonacci again and againDescription

2016-06-26 12:39:27 589 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除