Re: [algogeeks] SPoj maximum sum subseuence

2011-03-15 Thread Nikhil Jindal
Hey Ankur, Why dont u just modify the findx function itself to return the frequency of occurence of maxsum as well. On Sun, Mar 13, 2011 at 12:26 PM, Ankur Khurana wrote: > https://www.spoj.pl/problems/MAXSUMSQ/ > > Hi in above problem , i am getting TLE but according to given contraints , > i

Re: [algogeeks] SPoj maximum sum subseuence

2011-03-14 Thread keyan karthi
i used the following code.. getting wa #include #include #include #include #include using namespace std; typedef unsigned long long int ull; int main() { int t; cin>>t; while(t--) { int n,sm=0; scanf("%d",&n); vector v(n); map mp; for(int i=0;isum) { sum=cur; } if(cur<0) cur=0; } //cout

Re: [algogeeks] SPoj maximum sum subseuence

2011-03-14 Thread tech rascal
@ankur: can u plz xplain ur approach?? On Sun, Mar 13, 2011 at 12:26 PM, Ankur Khurana wrote: > https://www.spoj.pl/problems/MAXSUMSQ/ > > Hi in above problem , i am getting TLE but according to given contraints , > i think my code is good enough to run. Can any body help me here > > > > #includ

[algogeeks] SPoj maximum sum subseuence

2011-03-12 Thread Ankur Khurana
https://www.spoj.pl/problems/MAXSUMSQ/ Hi in above problem , i am getting TLE but according to given contraints , i think my code is good enough to run. Can any body help me here #include #include #include #include #include #include #include #include #include #define VI vector typede