摘要:
#include<iostream> using namespace std; const int N=1e5+10; int a[N],st[N]; int num=0; int main(){ int n,q; cin>>n>>q; for(int i=1;i<=n;i++){ cin>>a[i 阅读全文
摘要:
//给出一个长度为 n 的序列 a,选出其中连续且非空的一段使得这段和最大。 #include<iostream> using namespace std; const int N=2e5+10;//注意全局常量必须在前面添加const int a[N];//序列a定义成全局变量 int sum[N 阅读全文