杭电acm1003

[复制链接]
查看11 | 回复1 | 2011-4-15 06:40:03 | 显示全部楼层 |阅读模式
#include
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=1;im;
int max,temp;
int *p=new int[m+2];
int x=1,y=1,max_x=1;
cin>>p[1];
max=p[1];
if(p[1]>=0) temp=p[1];
for(int j=2;j>p[j];
temp+=p[j];
if(temp>max) max=temp,y=j,max_x=x;
else if(temp=0)
sum+=a[e=i]; else
sum=a[s=e=i]; if(sum>ans) {
ss=s;
ee=e;
ans=
回复

使用道具 举报

千问 | 2011-4-15 06:40:03 | 显示全部楼层
你的程序运行一次就结束了.ACM的检测是通过一次运行检测几十万个输入你需要把整个程序放入一个循环中cin>>n;作为判断的条件
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行