上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 50 下一页
摘要: problemsolutioncodes//f[i][j]:以(i,j)为终点的最长路是是多少//f[i][j] = f(它四周的比他高的方块的最长路)+1#include#includeusing namespace std;const int maxn = 110... 阅读全文
posted @ 2018-05-26 22:11 gwj1139177410 阅读(114) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include #include #include using namespace std; int l[20005]; int main() { int n; while(cin>>n){ ... 阅读全文
posted @ 2018-05-26 13:27 gwj1139177410 阅读(104) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#includeusing namespace std;int N, R, x[1000];int main(){ while(cin>>R>>N && R!=-1 && N!=-1){ fo... 阅读全文
posted @ 2018-05-26 13:25 gwj1139177410 阅读(71) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;int main(){ unsigned int n, x; while(cin>>n &&n){ x = n&-n; cout<<... 阅读全文
posted @ 2018-05-26 13:24 gwj1139177410 阅读(102) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//DFS 求通块#include#includeusing namespace std;int n, m, ans;string a[100];void dfs(int x, int y){ for(int i = -1... 阅读全文
posted @ 2018-05-26 13:23 gwj1139177410 阅读(105) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#include#includeusing namespace std;int n, m, o, a[40][40][40], vis[40][40][40];int sx, sy, sz, ex, ey, ez... 阅读全文
posted @ 2018-05-26 13:20 gwj1139177410 阅读(150) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;const int maxn = 11;int f[maxn][maxn];int main(){ for(int i = 0; i i?f[i][i]:f[i][j... 阅读全文
posted @ 2018-05-26 13:19 gwj1139177410 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 枚举形式按照状态空间的规模大小,有如下几种常见的枚举和遍历形式: 1、多项式->循环,递推 2、指数->递归,位运算//从1~n这n个数中随机取多个,输出可能的方案vectorchosen;void calc(int x){ if(x==n+1){//问题边界 ... 阅读全文
posted @ 2018-05-26 13:16 gwj1139177410 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 一、时间复杂度(1s10^7, 各种复杂度对应数据规模,对应算法。) 二、空间复杂度(数组大小)三、算法复杂度分析(常规,主定理) 阅读全文
posted @ 2018-05-26 13:10 gwj1139177410 阅读(193) 评论(0) 推荐(0) 编辑
摘要: problem给定一个正整数数列A,求一个平均数最大、长度不小于L的子段。solution二分判定:是否存在一个长度大于L,平均数不小于二分值的子段。codes#include#include#include#includeusing namespace std;do... 阅读全文
posted @ 2018-05-25 21:37 gwj1139177410 阅读(114) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 50 下一页
选择