题目链接: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…
51nod 1134 最长递增子序列 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define rep(i,l,r) for (int i=l; i<=r; i++) typedef long long ll; using namespace std; ; int n, s[N]; int dp[N]; int main(){ freopen(&q…