自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 康拓展开

康托展开是什么? 定义: X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! ai为整数,并且0 简单点说就是,判断这个数在其各个数字全排列中从小到大排第几位。 比如 132,在1、2、3的全排列中排第2位。 康托展开有啥用呢? 维基:n位(0~n-1)全排列后,其康托展开唯一且最

2017-12-21 20:49:32 340

原创 UVA - 10341 Solve It (高精度 二分法解方程)

题目链接:点击打开链接题意 找一个0 到 1之间的数使得方程满足,若没有输出 No solution;题解:首先方程根据给出的 数 的范围可知:方程为单调递减,这样就可以运用二分解方程了代码:#include<stdio.h> #include<string.h> #include<algorithm> using namespace std; #include...

2017-12-17 09:44:38 244

原创 POJ - 1679 The Unique MST(次小生成树)

Given a connected undirected graph, tell if its minimum spanning tree is unique.  Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph

2017-12-12 20:45:26 181

原创 Least Common Multiple HDU 1019(一列数的最小公倍数)

The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105.  Inp

2017-12-09 10:21:00 160

原创 51Nod - 1019 (求逆序数)

在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。 如2 4 3 1中,2 1,4 3,4 1,3 1是逆序,逆序数是4。给出一个整数序列,求该序列的逆序数。 Input第1行:N,N为序列的长度(n 第2 - N + 1行:序列中的元素(0 ii <= 10^9) Output输出逆

2017-12-05 19:37:35 323

原创 CodeForces - 892B Wrath(每一个人有一把长度为a[i]的武器,这个人能把左边距离为他为a[i]的能人全杀完,看看最终会留下多少人)

Hands that shed innocent blood! There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings and every person kills some of people in front of him. All people k

2017-12-01 19:13:01 331

原创 CodeForces - 894B Ralph And His Magic Field(给出n*m的格子 和 k为1或-1,往里填1 或 -1,使得每一行和每一列都和k相等)

Ralph has a magic field which is divided into n × m blocks. That is to say, there are n rows and m columns on the field. Ralph can put an integer in each block. However, the magic field doesn't alwa

2017-12-01 17:05:14 424

空空如也

空空如也

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

TA关注的人

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