题目链接:51nod 1050 循环数组最大子段和 #include<stdio.h> #include<algorithm> using namespace std; ; long long a[N]; int main(){ int n, i; ; scanf("%d", &n); ; i <= n; ++i){ scanf("%I64d", &a[i]); sum += a[i]; } ma_ed = a[]; a…
http://www.51nod.com/onlineJudge/questionCode.html#problemId=1050¬iceId=13385 参考:http://blog.csdn.net/acdreamers/article/details/38760805 #include<cstdio> #include<algorithm> using namespace std; typedef long long ll; int n; ll a[]; ll…
http://acm.uestc.edu.cn/#/problem/show/594 [AC] #include<bits/stdc++.h> using namespace std; typedef long long ll; ; const int inf=0x3f3f3f3f; int n,c; int cur; ][maxn]; int q[maxn]; int main() { while(scanf("%d%d",&n,&c)!=EOF) { i…