![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
概率论/博弈论
等我学会后缀自动机
侠影之谜
展开
-
UVA 10417 Gift Exchanging (条件概率+坑点)(太智障了。。。。T_T)
#include<bits/stdc++.h>using namespace std;#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define lson l,mid,rt<<1#define rson...原创 2020-02-19 08:57:26 · 186 阅读 · 0 评论 -
uva 557 - Burger(概率+递推)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-02-18 15:41:09 · 208 阅读 · 0 评论 -
UVA 11762 Race to 1 (期望+概率+预处理)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-02-17 19:22:18 · 130 阅读 · 0 评论 -
UVA 10491 Cows and Cars (概率)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-02-17 16:27:32 · 90 阅读 · 0 评论 -
UVA 11346 Probability (积分)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-02-17 11:13:59 · 106 阅读 · 0 评论 -
UVA 542 France '98 (概率模拟)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-02-15 23:15:43 · 113 阅读 · 0 评论 -
UVA 10277 Boastin' Red Socks (概率)
#include<bits/stdc++.h>using namespace std;#define debug cout<<"YES\n";#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long long#define lrt int l,int r,int rt#define ...原创 2020-02-15 14:23:18 · 175 阅读 · 0 评论 -
Codeforces Round #548 (Div. 2) D. Steps to One(容斥定理+概率+推级数)
题目链接:http://codeforces.com/contest/1139/problem/D题目大意给定一个流程:初始为一个数m,每次等概率的添加一个1到m范围的数,直到其共同的gcd为1,流程结束,计算期望长度。题目分析我们不妨分析这个串最后结束前,其gcd是多少,假设p是他们共同的gcd,那么对于1到m这个整理,有多少个数是p的倍数?答案是,那么就有个数...原创 2019-03-24 18:34:22 · 201 阅读 · 0 评论 -
Newcoder 21669 牛牛VS牛妹 (博弈+思维)
链接:https://ac.nowcoder.com/acm/problem/21669来源:牛客网题目大意给你一个网格,有些点被#覆盖了不能再走,其他点是空地,现在牛牛和牛妹轮流开始将空地变成#如果当前轮到的人操作之后左上角到右下角不存在通路了,当前操作的人就输了通路只能是从左上角到右下角往右或者往下走的路径牛牛先开始操作,如果双方都是绝顶聪明,输出最后谁赢保证一开始给你的网格...原创 2019-02-26 00:16:49 · 697 阅读 · 0 评论 -
CodeForces 731E Funny Game (博弈+DP)*好题
题目链接:http://codeforces.com/problemset/problem/731/E题目描述:给定一个整数序列,按规则,每次玩家可以选择最左边的k个整数和作为自己的得分,并把左边k个整数替换成一个整数,这个整数就是上次k个整数的和。题目分析: 这道题我感觉极富有技巧性。首先我的想法比较朴素,前缀和性质这能看得出来,dp[i][0]表示从i位置开始一号...原创 2019-02-16 20:56:41 · 304 阅读 · 0 评论 -
Educational Codeforces Round 57 (Rated for Div. 2) F. Inversion Expectation(组合数学+期望)
题目链接: http://codeforces.com/contest/1096/problem/F#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll long...原创 2019-01-31 15:17:56 · 131 阅读 · 0 评论 -
HDU 5753 Permutation Bo (概率与期望)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5753#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-12-04 00:04:07 · 135 阅读 · 0 评论 -
CodeForces 482C Game with Strings (概率+状压DP 好题)* 第四百篇博文纪念
题目链接:http://codeforces.com/problemset/problem/482/C#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll uns...原创 2018-11-17 09:36:24 · 201 阅读 · 0 评论 -
CodeForces 87C Interesting Game (博弈论+数论)*
#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll unsigned long long#define lrt int l,int r,int rt#defi...原创 2018-11-20 23:43:54 · 252 阅读 · 0 评论 -
牛客网多校练习9 E Music Game (概率与计数)*
链接:https://www.nowcoder.com/acm/contest/147/E来源:牛客网 题目描述Niuniu likes to play OSU!We simplify the game OSU to the following problem. Given n and m, there are n clicks. Each click may succes...原创 2018-08-24 13:55:57 · 261 阅读 · 0 评论 -
HDU 5984 Pocky (概率+简单微分方程)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5984#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...原创 2018-10-14 20:40:13 · 413 阅读 · 0 评论 -
HDU 2147 kiki's game (博弈+暴力打表)。。。
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2147#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...原创 2018-10-15 16:13:42 · 200 阅读 · 0 评论 -
HDU 5600 N bulbs(找规律水题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5600#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...原创 2018-10-15 17:20:20 · 128 阅读 · 0 评论 -
HDU 5602 Black Jack (记忆化搜索+DP)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5602#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-19 06:44:42 · 182 阅读 · 0 评论 -
HDU 2509 Be the Winner (Nim博弈)水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2509#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-23 10:48:58 · 136 阅读 · 0 评论 -
HDU 4994 Revenge of Nim (规律博弈)水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4994#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-23 12:24:23 · 102 阅读 · 0 评论 -
HDU 5011 Game(博弈水题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5011#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-23 12:48:53 · 163 阅读 · 0 评论 -
HDU 4678 Mine (bfs+博弈SG)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4678#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-29 15:49:04 · 129 阅读 · 0 评论 -
HDU 4672 Present Day, Present Time (博弈+背包)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4672#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-26 15:07:39 · 226 阅读 · 0 评论 -
CodeForces 453A Little Pony and Expected Maximum (概率)
题目链接:http://codeforces.com/problemset/problem/453/A#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll uns...原创 2018-11-16 11:57:44 · 207 阅读 · 0 评论 -
HDU 4790 Just Random (概率 + 容斥思想+数学)
Just RandomTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3415 Accepted Submission(s): 1103 Problem Description Coach Pang and Uncl...原创 2018-08-27 23:26:53 · 152 阅读 · 0 评论