Information Entropy
Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge
Information Theory is one of the most popular courses in Marjar University. In this course, there is an i...
分类:
其他好文 时间:
2014-10-12 19:25:08
阅读次数:
206
Known Notation
Time Limit: 2 Seconds Memory Limit: 131072 KB
Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also kn...
分类:
其他好文 时间:
2014-10-12 18:52:18
阅读次数:
319
Domination
Time Limit: 8 Seconds Memory Limit: 131072 KB Special Judge
Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his frie...
分类:
其他好文 时间:
2014-10-12 18:35:28
阅读次数:
297
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5373题目意思: 有两个class:A 和 B,Bob 在 Class A 里面。现在给出 Class A(n-1人) 和 Class B(m人) 所有人的分数,除了Bo...
分类:
其他好文 时间:
2014-10-12 18:24:58
阅读次数:
204
题目链接:ZOJ 3827 Information Entropy
根据题目的公式算吧,那个极限是0
AC代码:
#include
#include
#include
const double e=exp(1.0);
double find(char op[])
{
if(op[0]=='b')
return 2.0;
else if(o...
分类:
其他好文 时间:
2014-10-12 17:59:48
阅读次数:
156
dp :#include#include#includeusingnamespacestd;constintMAX=51;doubledp[MAX*MAX][MAX][MAX];intmain(){intcas;intn,m;scanf("%d",&cas);while(cas--){scanf("...
分类:
其他好文 时间:
2014-10-12 17:58:28
阅读次数:
177
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4882
现在在牡丹江,明天regional现场赛,不出一个月就要退役了,求保佑
今天热身赛做题很紧张,老是打错字,所以晚上写写代码练练手
脑子还是不好使,没想到可以并查集
思路:题目中的操作导致的一个结果是,一条边会成为一个集合的w,---- 如果能想到这里可能就能想到...
分类:
其他好文 时间:
2014-10-11 23:27:07
阅读次数:
355
题意:
给一个原串,再给n个串,每个串有属性,属性0代表可以重叠,1代表不可以重叠
问每个串出现了多少次
思路:
为了方便建立两个自动机(0的一个,1的一个)
然后可以重叠的很好做,以前都做过
不可重叠的话需要记录两个东西
len[i]代表每个串的长度,used[i]代表每个串在之前出现的位置,初始化-1
然后遍历到的时候对于当前位置 j, 必须j>=used[i]+len[i] ...
分类:
其他好文 时间:
2014-10-11 13:38:45
阅读次数:
237
Reactor Cooling
求解有上下界最大流问题。
1、流量平衡。
2、满足上下界
模板题。
#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 200000 + 10;
const int INF = 1 << 30;
struct Edge{...
分类:
其他好文 时间:
2014-10-11 13:18:25
阅读次数:
174
选择安装版本:[http://dev.mysql.com/doc/refman/5.6/en/choosing-version.html]Normally, if you are beginning to use MySQL for the first time or trying to port ...
分类:
数据库 时间:
2014-10-11 11:33:15
阅读次数:
363