ACM
WaiR7
这个作者很懒,什么都没留下…
展开
-
求组合数
1.杨辉三角(队友懂的真多) cc数组,cc[10][1]代表组合数c(10,1) #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> using namespace std; const int mod...原创 2018-12-01 09:02:59 · 255 阅读 · 0 评论 -
C - Contest Setting Gym - 101982C
比较简单的一个dp,但是自己没做出来,看过大佬博客之后秒懂了https://blog.csdn.net/aqa2037299560/article/details/84643172 (做个好事) 他的思路先统计相同难度题目的个数(和离散化差不多),状态转移方程是这样的 dp[i][j] = dp[i - 1][j - 1] * val[i] + dp[i - 1][j]; 也就是前i - 1...原创 2018-12-01 08:50:45 · 506 阅读 · 0 评论 -
B - Assignment HDU - 5289-RMQ
RMQ + 二分 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<algorithm> using namespace std; const int MAXN = 100000;...原创 2018-12-01 11:32:57 · 135 阅读 · 0 评论 -
D - Ancient Go HDU - 5546(深搜)
#include <iostream> #include <cstring> #include <cstdio> #include <string> #include <algorithm> #include <cstdio> using namespace std; char Map[20][20]; int dis[10...原创 2018-12-25 16:11:32 · 220 阅读 · 0 评论 -
E - Sudoku HDU - 5547(搜索)
#include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> using namespace std; char Map[10][10]; int judge(int row, int col) { ...原创 2018-12-25 16:12:35 · 234 阅读 · 0 评论 -
D. The Fair Nut and the Best Path(树形DP)
#include <iostream> #include <cstring> #include <string> #include <algorithm> #include <vector> #include <cmath> using namespace std; const int maxn = 300000 + 10...原创 2018-12-26 20:21:43 · 443 阅读 · 0 评论