D - Cyclic Nacklace
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
CC always becomes very depressed at the end of this month, he has checked his c...
分类:
其他好文 时间:
2015-04-16 21:57:27
阅读次数:
215
题目链接:Codeforces 490F Treeland Tour
类似于nlogn的递增上升子序列算法。
#include
#include
#include
#include
using namespace std;
const int maxn = 6005;
const int inf = 0x3f3f3f3f;
int N, R[maxn], D[maxn], ans...
分类:
其他好文 时间:
2015-04-16 19:57:43
阅读次数:
129
Problem Description
You are given a sequence of n numbers a0,..., an-1. A cyclic shift by k positions (0k ak+1,..., an-1, a0, a1,...,
ak-1. How many of the n cyclic shifts satisfy the condition tha...
分类:
其他好文 时间:
2015-04-14 18:03:29
阅读次数:
149
这题真是被弄的欲仙欲死啊,开始写的代码死活的a不掉,也不知道哪里错了,先附上,求大牛指点啊.....
#include
#include
#include
using namespace std;
int n,m;
int point[100+5];
int re;
int ree[105];
int l;
struct stu
{
int a,b;
};
stu mapp[100000+5...
分类:
其他好文 时间:
2015-04-12 09:13:04
阅读次数:
116
CRC全称Cyclic Redundancy Check,中文称为循环冗余检查。它是一种数据传输检错的机制,能够对数据进行多项式计算,并将得到的结果与接收设备共享,保证数据传输的正确性和完整性。 算法流程如下:1. Load a 16-bit register with FFFF hex (all....
分类:
其他好文 时间:
2015-04-06 20:15:16
阅读次数:
149
网络流/最大流 愚人节快乐XD 这题是给一个混合图(既有有向边又有无向边),让你判断是否有欧拉回路…… 我们知道如果一个【连通】图中每个节点都满足【入度=出度】那么就一定有欧拉回路…… 那么每条边都可以贡献一个出度出来,对于一条边u->v: 连S->edge cap=1; 如果是...
分类:
其他好文 时间:
2015-04-02 01:01:43
阅读次数:
257
欧拉图详解
通过图(无向图或有向图)中所有边一次且仅一次行遍图中所有顶点的通路称为欧拉通路,通过图中所有边一次且仅一次行遍所有顶点的回路称为欧拉回路。具有欧拉回路的图称为欧拉图(Euler Graph),具有欧拉通路而无欧拉回路的图称为半欧拉图。
1
定义
欧拉通路(Euler tour)——通过图中每条边一次且仅一次,并且过每一顶点的通路。...
分类:
其他好文 时间:
2015-04-01 15:32:58
阅读次数:
193
http://zh.scala-tour.com/#/welcome? Five free books on Scala http://www.oschina.net/question/103999_46884?...
分类:
其他好文 时间:
2015-04-01 11:34:53
阅读次数:
130
最小权值环覆盖问题:用几个环把所有点覆盖,求所选取的边最小的权值之和。拆点思想+求最小转求最大+KM算法#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i...
分类:
其他好文 时间:
2015-03-31 22:10:56
阅读次数:
130