随笔分类 -  数据结构--STL

摘要:题目 分析 又不会做。。。。。。。 显然很好想到前缀和处理一下。 然后考虑最大化结果,直接上st表。 问题来了,然后呢? 怎么做$ length \in [l,r] $ 呢? 正解是设一个五元组 (i,l,r,val,pos) 。 i是左端点,l,r是右端点范围,val是 i 到 pos的和, po 阅读全文
posted @ 2018-06-06 21:50 noble_(noblex) 阅读(160) 评论(0) 推荐(0)
摘要:题目 题目     分析 写了个平淡无奇的栈处理表达式,在WA了5发后发现,我没处理空串,,,,(或者说鲁棒性差?     代码 cpp include using namespace std; bool equal(char a,char b) { if(( 阅读全文
posted @ 2017-11-28 19:04 noble_(noblex) 阅读(218) 评论(0) 推荐(0)
摘要:题目 题目     分析 第一次用stringstream,真TMD的好用     代码 cpp include using namespace std; int main() { int n; cin n; getchar();//回车 while(n ) 阅读全文
posted @ 2017-11-27 19:06 noble_(noblex) 阅读(228) 评论(0) 推荐(0)
摘要:题目 题目     分析 练习STL     代码 cpp include using namespace std; int main() { int n; while(scanf("%d",&n) && n!=0) { queue q; printf("Di 阅读全文
posted @ 2017-11-26 00:35 noble_(noblex) 阅读(143) 评论(0) 推荐(0)
摘要:题目 题目     分析 自认已经很简洁了,虽说牺牲了一些效率     代码 cpp include using namespace std; set m; string s[120003]; int main() { int n; while(cin s[n 阅读全文
posted @ 2017-11-26 00:32 noble_(noblex) 阅读(169) 评论(0) 推荐(0)
摘要:题目 题目     分析 练习STL     代码 cpp include using namespace std; int main() { int t; scanf("%d",&t); while(t ) { int n,m,a[105],cnt=0; q 阅读全文
posted @ 2017-11-26 00:28 noble_(noblex) 阅读(123) 评论(0) 推荐(0)

/* */