Problem 2221 RunningMan Accept: 17    Submit: 52Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100. There are two teams, each of many people. There are 3…
Problem Description 题目描述 ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100. There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to fight. In each round, whi…
 Problem 2221 RunningMan Accept: 130    Submit: 404Time Limit: 1000 mSec    Memory Limit : 32768 KB  Problem Description ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100. There are two teams, each of many people. There are…
一开始就跑偏了,耽误了很长时间,我和队友都想到博弈上去了...我严重怀疑自己被前几个博弈题给洗脑了...贪心的做法其实就是我们分两种情况,因为A先出,所以B在第一组可以选择是赢或输,如果要输,那直接不上人,而A已经赢了一场,所以A只要再赢一场就可以了,A的最优策略是把自己剩下的全上去,即为(a,n-a,0)的形式,B的最优为(0,m-1,1)的形式,若A要赢就是(n-a) >= (m-1).如果B选择在第一场赢的话,那B应该在第一场放上a+1个人,A的最优为(a,(n-a)/2,(n-a)/2)…
ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100. There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to fight. In each round, whichever team sends more pe…
Problem 2221 RunningMan Accept: 4    Submit: 10 Time Limit: 1000 mSec    Memory Limit : 32768 KB Problem Description ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100. There are two teams, each of many people. There are 3 r…
题目连接:http://acm.fzu.edu.cn/problem.php?pid=2137 题解: 枚举x位置,向左右延伸计算答案 如何计算答案:对字符串建立SA,那么对于想双延伸的长度L,假如有lcp(i-L,i+1)>=L那么就可以更新答案 复杂度  建立SA,LCP等nlogn,枚举X及向两边延伸26*n #include<iostream> #include<algorithm> #include<cstdio> #include<cstring…
题目链接:http://acm.fzu.edu.cn/problem.php?pid=1914 题意: 给出一个数列,如果它的前i(1<=i<=n)项和都是正的,那么这个数列是正的,问这个数列的这n种变换里, A(0): a1,a2,-,an-1,an A(1): a2,a3,-,an,a1 - A(n-2): an-1,an,-,an-3,an-2 A(n-1): an,a1,-,an-2,an-1 问有多少个变换里,所以前缀和都是正整数. 思路:因为变换是a[n]后面接着a[1]所以我们把…
 FZU 2105  Digits Count Time Limit:10000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Practice Description Given N integers A={A[0],A[1],...,A[N-1]}. Here we have some operations: Operation 1: AND opn L R Here opn, L and R are intege…
原题:http://acm.fzu.edu.cn/problem.php?pid=2112 首先是,票上没有提到的点是不需要去的. 然后我们先考虑这个图有几个连通分量,我们可以用一个并查集来维护,假设有n个连通分量,我们就需要n-1条边把他们连起来. 最后对于每个联通分量来说,我们要使它能一次走完,就是要求他是否满足欧拉通路,也就是这个联通分量中至多有2个度为奇数的点,每多出2个度为奇数的点,就多需要一条边(因为单个连通分量的所有点的度数之和为偶数,所以不可能存在奇数个奇数度数的点). #inc…