- 博客(22)
- 收藏
- 关注
转载 两圆相交面积万能版
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
826
原创 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
616
原创 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
627
原创 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
829
原创 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
736
原创 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
1018
2
原创 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
1145
原创 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
441
原创 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
566
原创 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
614
原创 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
611
原创 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
482
原创 “个人总结”最基础博弈套路,实力山寨
总结自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
670
原创 C++ STL set容器常用用法
set是STL中一种标准关联容器。它底层使用平衡的搜索树——红黑树实现,插入删除操作时仅仅需要指针操作节点即可完成,不涉及到内存移动和拷贝,所以效率比较高。set,顾名思义是“集合”的意思,在set中元素都是唯一的,而且默认情况下会对元素自动进行升序排列,支持集合的交(set_intersection),差(set_difference) 并(set_union),对称差(set_symmetric
2016-06-28 10:39:09
34719
7
原创 HDU 1848 Fibonacci again and again(学习sg函数后写出来的第一个题)
HDU1848 Fibonacci again and againDescription
2016-06-26 12:39:27
614
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人