
贪心
东边的大西瓜
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
洛谷P1803 凌乱的yyy / 线段覆盖
题目详情#include<iostream>#include<algorithm>using namespace std;struct time{ int x; int y;}tt[1000000];bool cmp(struct time a,struct time b){ return a.y<b.y;}int main(){ int n...原创 2020-01-28 23:49:17 · 136 阅读 · 0 评论 -
贪心
最大子串和贪心#include<iostream>using namespace std;int main(){ int sum,max,n; cin>>n>>max; sum=max;//防止都是负数的情况 while(--n) { int k=0; cin>>k; if(sum<0) sum=0; 如果当前和...原创 2020-01-26 23:35:55 · 145 阅读 · 0 评论