Water_Fox
Water_Fox
全部文章
分类
学习记录(4)
工作(1)
模板(5)
考研(4)
训练(5)
读书笔记(2)
随想录(2)
题解(38)
归档
标签
去牛客网
登录
/
注册
这里是我的牛客blog
全部文章
(共61篇)
概率dp初见---HDU4576 Robot
一道入门概率dp: http://acm.hdu.edu.cn/showproblem.php?pid=4576 分析:为了方便取模,把环的范围设置为0到n-1。使用滚动数组节省空间,因为可能多次操作的w相同所以第一维不可省略。第一维大小设置为2即可。这题学了一个用异或简化...
动态规划
HDU
ACM
2019-07-28
0
841
容斥原理(二进制实现)
链接: hdu 1796 How many integers can you find 代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 112;...
ACM
HDU
数学
2019-03-06
0
643
hdu 1176 免费馅饼
hdu1176免费馅饼题目链接 #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 2; int dp[12][maxn]; int main() { int n; while(~scan...
ACM
HDU
动态规划
2019-02-24
0
668
洛谷P1020 导弹拦截(偏序问题,求最长不上升子列和最长上升子列的nlogn算法)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1541 此前有一道更简单的二维偏序问题:hdu1541(Stars) 分析:同样是偏序问题,使用树状数组可以降低复杂度到nlogn 代码1:n^2的dp #include <...
ACM
数据结构
2019-02-01
0
592
hdu1541——Stars(偏序问题)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1541 hdu1541——Stars 二维偏序问题。之前没想过树状数组能解决这样的问题,留个纪念,之后再写一篇洛谷的题洛谷P1020 导弹拦截 注意题目中input:y升序输入 这点非...
ACM
数据结构
2019-02-01
0
734
LCIS O(n^3)和O(n^2)算法
分ai==bj和ai!=bj分别转移状态 #include <bits/stdc++.h> using namespace std; const int maxn = 3005; const int INF = (1<<31); int dp[maxn][maxn]; in...
算法竞赛进阶指南
ACM
动态规划
2018-11-09
0
722
UVa 437 DAG 动态规划
#include <bits/stdc++.h> using namespace std; const int maxn = 35; int d[maxn][5],c[maxn][5]; int n; void get_dimensions(int v[],int b,int dim)...
ACM
动态规划
数学
2018-11-08
0
672
UVa 1025A Spy in the Metro;DAG动态规划
题目链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=245&page=show_problem&problem=3466 典型的DAG应用...
ACM
数学
动态规划
2018-11-07
0
640
牛客了练习赛29
第一次做牛客发现比我想象的更难 第一题:https://www.nowcoder.com/acm/contest/211/A 分析:贪心。使负数项的脚码尽量大,整数项的脚码尽量小。开longlong #include <bits/stdc++.h> using n...
ACM
2018-10-22
0
532
codeforces #Round490div3 A,B,C
A. Mishka and Contest time limit per test 1 second memory limit per test 256 megabytes input standard input output standard ou...
ACM
CodeForces
2018-07-30
0
1083
首页
上一页
1
2
3
4
5
6
7
下一页
末页