上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 const long long N=2000005; 11 long long n,m,x1,y11,x2,y2,t; 12 struct tree{ ... 阅读全文
posted @ 2019-08-14 12:30 喵呜,颜儿ღ 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define N 100007 #define Q 100000000007 using namespace std; int n, m, k, s, t, spe[15], tot, ls[N], cnt; long long ans, dis[N], d[15][15]; bool b[N], v[40]; q... 阅读全文
posted @ 2019-08-14 12:29 喵呜,颜儿ღ 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define ll long long 7 using namespace std; 8 const int oo=0x3f3f3f3f; 9 10 ll n,nn,ans1=1,ans2,sum; 11 bool ok,ook; 12 13 ll get()... 阅读全文
posted @ 2019-08-14 12:27 喵呜,颜儿ღ 阅读(168) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #define Ll long long using namespace std; Ll CC[1001][1001]; Ll C(Ll n,Ll m){ if(CC[n][m])return CC[n][m]; if(m==1)return n; if(m==0|... 阅读全文
posted @ 2019-07-26 12:28 喵呜,颜儿ღ 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int dp[15][15],num[15];//len last 7 int a,b; 8 9 int dfs(int len,int last,bool shangxian,bool qdling) 10 { 11 if(len==0)... 阅读全文
posted @ 2019-07-26 12:28 喵呜,颜儿ღ 阅读(112) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int t, n, m, dp[1005][605]; //dp[i][j]表示到第i个走廊,在这里(及其子树)要用j秒时间偷的最多画数 struct node { int tim, pic; //tim表示走廊时间,pic表示图片个数 }tr[5005]; inline int read() { int red = ... 阅读全文
posted @ 2019-07-26 12:24 喵呜,颜儿ღ 阅读(74) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h>#define MAXN 1000005usingnamespacestd; struct Edge{int next,to,dis;} edge[MAXN]; int n,s,a,b,t,maxn[MAXN],cnt,head[MAXN]; //ma 阅读全文
posted @ 2019-07-26 12:24 喵呜,颜儿ღ 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 int n,m; 5 struct node{ 6 int lson,rson; 7 }a[305]; 8 bool gotson[305]; 9 int dp[305][305],s[305]; 10 void DP(int rc,int rm) 11 {//if一定要打,要... 阅读全文
posted @ 2019-07-26 12:24 喵呜,颜儿ღ 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 这题倒是在树形dp的基础上添加了一些操作,但是做好预处理之后跟模板就差不多了 阅读全文
posted @ 2019-07-25 12:31 喵呜,颜儿ღ 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 辣鸡题面 这题目确实是比较经典的树形dp,里面确实还是有很多需要理解的地方 阅读全文
posted @ 2019-07-25 12:28 喵呜,颜儿ღ 阅读(110) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页