![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Training
shiyuankongbu
这个作者很懒,什么都没留下…
展开
-
Training 2013.12
1.Codechef Strange Matrix http://www.codechef.com/problems/RRMATRIX题意:求纵向分布,横向分布重合数字个数思路:设重合的坐标为i,j,那么(i-1)*m+j=(j-1)*n+i(i-1)*m+(j-1)=(j-1)*n+(i-1)(i-1)*(m-1)=(j-1)*(n-1)i=(j-1)*(n-1)原创 2013-12-23 10:25:10 · 1109 阅读 · 0 评论 -
week0
ccnuacm training first week原创 2014-04-27 20:48:08 · 1371 阅读 · 1 评论 -
Code in 2013
hdu1042.cpp water 高精度hdu1316.cpp water 高精度hdu1005.cpp waterhdu1719.cpp water mathhdu1098.cpp waterhdu1071.cpp waterhdu1299.cpp waterhdu3117.cpp water mathhdu3792.cpp wa原创 2014-02-12 20:41:17 · 1549 阅读 · 4 评论 -
1003.Xor Sum 1004.Labyrinth
problem:Xor Sum原创 2014-05-18 23:54:32 · 946 阅读 · 1 评论 -
tc srm623 div2
A.CatchTheBeatEasy题意:原创 2014-06-05 13:04:49 · 1083 阅读 · 0 评论 -
2014 Beijing Invitational
B.Beautiful Garden题意:n个点原创 2014-05-22 10:30:27 · 917 阅读 · 2 评论 -
递推式循环节
前天晚上去acdream群赛找虐,看到一道斐波那契数列的题,原创 2014-07-06 13:27:11 · 3093 阅读 · 0 评论 -
ACdream区域赛指导赛之专题赛系列(1)の数学专场
Contest : ACdream区域赛指导赛之专题赛系列(1)の数学专场A:EOF女神的相反数题意:n(思路:water/** this code is made by shiyuan* Problem: 1095* Verdict: Accepted* Submission Date: 2014-05-24 19:06:37* Time: 0 MS* Mem原创 2014-05-25 00:36:38 · 1888 阅读 · 0 评论 -
Probability DP
Problem: hdu3076题意:原创 2014-07-21 13:05:02 · 1124 阅读 · 1 评论 -
Inclusion–exclusion principle
Wiki:Inclusion–exclusion principleStatement:Example:一个正整数序列a[1],a[2],a[3]...,a[n],一定存在一个x,y使得a[x]+a[x+1]+..+a[y]是n的倍数。proof:构造前n'项和S[n'],则出现两种情况:1)S[k']是n的倍数 2)S[k']对n的余数必然属于{1,2,.原创 2014-03-27 00:51:40 · 3634 阅读 · 0 评论 -
Integer Partition
Problem 1 Suppose p(n,k) means the number of partition of an integer into parts the largest of which is k (this problem are always equivalent to the number of the partition of an integer into no mor原创 2014-03-27 00:51:10 · 1677 阅读 · 0 评论 -
Contest of hust 2013.12
题目:problems2013-12-8 hust 校赛Unsolved: D J A.Beautiful sky题意:模拟,旋转和对称都算一种思路:记录对某点的相对位置Code:hust1624.cppB.Chessboard题意:求四连通块中的最大值思路:并查集Code:hust1625.cppC.Cutting rope原创 2014-01-19 14:31:23 · 1093 阅读 · 2 评论 -
Stable Marriage Problem
Problem:给出n个男人心中n个女人的排名,和n个女人心中n个男人的排名,求一种匹配使之形成稳定匹配。(稳定指的是形成的集合中,任意两对之间,不存在某个人和某个人在一起 比集合中的分配更优)详见维基百科:Stable_marriage_problemmatrix67的分析非常有趣:matrix67 Solution:function stableMatching {原创 2014-02-23 19:00:34 · 1269 阅读 · 0 评论 -
Generating Function
Wiki:Generating_function Easy:TankyWoo matrix67Essay:《母函数的性质及应用》 Practice: Easy: Normal: Poj1322 Chocolate 题意:C(思路:无解的情况当然是m>n或m>c或(n-m)&1.对于C种巧克力出现的次数要么为奇数,要么为偶数.g原创 2014-02-24 23:30:29 · 1284 阅读 · 0 评论 -
数学模版
一.数论部分1.素数测试#include #include #include #include #include #include using namespace std; #define Times 10 typedef long long LL; mapmp; LL random(LL n) { return原创 2014-02-12 21:22:45 · 1073 阅读 · 0 评论 -
Contest of whu 2013.4
题目:woj 1471~14802013-4-23 whu 校赛Unsolved:A D ISolution:whu2013A.All Your Bases题意:求树上删边的最小费用思路:图论,不会Code:nullB.Beautiful Cities题意:n个城市修地铁,每个城市的出度不大于1,求方案数思路:原创 2014-02-13 14:08:58 · 1050 阅读 · 2 评论 -
Contest of cug 2013.6
题目: Contest - 2013校赛暨华中邀请赛2013-6-2 cug 校赛Unsolved: B F H KSolution: cug2013A.Segment题意:求一维坐标中n(思路:排序,起点相同的保留长度最长的然后按x从小到大往右扫,mx记录当前出现的最右端点l表示当前线段的左边,r表示右边,r=min(v[i].y,mx);Co原创 2014-02-08 16:06:07 · 937 阅读 · 1 评论 -
Linear Programming
Linear Programming, Simplex Algorithmwiki: Simplex_algorithmwenku: 《浅谈信息学竞赛中的线性规划》Template: CodeExercise:uva10498.cpp原创 2014-03-27 20:39:34 · 1077 阅读 · 0 评论 -
Contest of whu 2014.4 D G
Problem:D - Jewelry原创 2014-04-19 02:26:41 · 1102 阅读 · 0 评论 -
week1
poj2836tiy原创 2014-07-06 14:04:23 · 906 阅读 · 0 评论