Borderou de evaluare (job #1149037)
Utilizator | Data | 21 martie 2014 13:43:05 | |
---|---|---|---|
Problema | Subsecventa de suma maxima | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:1:20: warning: extra tokens at end of #include directive [enabled by default]
#include<limits.h> #include<stdio.h> using namespace std; // 6000005 #define dim 6000005 int main() { freopen("ssm.in", "r", stdin); freopen("ssm.out", "w", stdout); int n,i,x,s,smax,st,dr,stmax,drmax; scanf("%d", &n); smax=INT_MIN; s=INT_MIN; for(i=1;i<=n;++i) { scanf("%d", &x); if(s<0 && x>s) { s=x; st=i; dr=i; } else { if(s>smax) { smax=s; stmax=st; drmax=dr; } s+=x; ++dr; } } if(s>smax) { smax=s; stmax=st; drmax=dr; } printf("%d %d %d", smax, stmax, drmax); return 0; }
^
/usr/lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !