上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 46 下一页
摘要: 这题是poj2796的变形,用线段树来维护每个负数的对应的最小区间和#include#include#includeusing namespace std;#define ls rtl=l; thi... 阅读全文
posted @ 2019-04-23 22:43 eason99 阅读(74) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2796确定每个数边界,然后枚举#include#include#includeusing namespace std;#define ll long long... 阅读全文
posted @ 2019-04-23 22:41 eason99 阅读(95) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2796确定每个数边界,然后枚举#include#include#includeusing namespace std;#define ll long long... 阅读全文
posted @ 2019-04-23 22:41 eason99 阅读(65) 评论(0) 推荐(0) 编辑
摘要: Triangle题意:给你n个木棒,判断其能否组成三角形。这题就是斐波那契数数列的应用,把斐波那契数列打出来,可以知道第47项就大于2^31-1了,于是的话,最长的不能构成三角形的序列的长度就是46了,若序列长度... 阅读全文
posted @ 2019-04-23 20:47 eason99 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Triangle题意:给你n个木棒,判断其能否组成三角形。这题就是斐波那契数数列的应用,把斐波那契数列打出来,可以知道第47项就大于2^31-1了,于是的话,最长的不能构成三角形的序列的长度就是46了,若序列长度... 阅读全文
posted @ 2019-04-23 20:47 eason99 阅读(96) 评论(0) 推荐(0) 编辑
摘要: http://csustacm.com:4803/problem/1115一维hash是把一个字符串用一个整数表示,二维hash是把一个矩阵用一个整数表示。for(int i=1;iusing namespace... 阅读全文
posted @ 2019-04-16 18:43 eason99 阅读(217) 评论(0) 推荐(0) 编辑
摘要: http://csustacm.com:4803/problem/1115一维hash是把一个字符串用一个整数表示,二维hash是把一个矩阵用一个整数表示。for(int i=1;iusing namespace... 阅读全文
posted @ 2019-04-16 18:43 eason99 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 对结构体数组用lower_bound函数#includeusing namespace std;struct node{ int x,y; node(int x=0,int y=0) { ... 阅读全文
posted @ 2019-04-16 18:25 eason99 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 对结构体数组用lower_bound函数#includeusing namespace std;struct node{ int x,y; node(int x=0,int y=0) { ... 阅读全文
posted @ 2019-04-16 18:25 eason99 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 直接dfs会t,要用折半搜索,先从起点搜到对角线位置的格子,然后在对角线的格子建01字典树,完了之后再从重点往对角线搜,搜到就在对应格子的01字典树里查询一下,然后取最大就行#includeusing nam... 阅读全文
posted @ 2019-04-11 19:35 eason99 阅读(91) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 46 下一页