Search found 6 matches

by 3sam
Sat Jun 30, 2012 4:15 am
Forum: Volume 103 (10300-10399)
Topic: 10302 - Summation of Polynomials
Replies: 29
Views: 15992

Re: 10302 - Summation of Polynomials

please can anyone tell me why this code is WA ??? #include<iostream> using namespace std; int main() { long long n; while(cin>>n) { long long N; long long result=0; long long sum =0; for(int i=1;i<=n;i++) { while(sum<(i*i*i)) { N=1; sum+=(N*N*N); N++; } result+=sum; } cout<< result<<endl; } return 0...
by 3sam
Sat Jun 30, 2012 3:59 am
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 39698

Re: 11059 - Maximum Product

are you mean that if i use #include<stdlib.h> i can get AC ??????????????? :D :D :D
by 3sam
Fri Jun 29, 2012 8:05 pm
Forum: Volume 110 (11000-11099)
Topic: 11059 - Maximum Product
Replies: 96
Views: 39698

Re: 11059 - Maximum Product

tgis is my code and i got every subm compile error not wrong answer :: plz help #include<iostream> using namespace std; int main() { long long int x,y; int arr[100]; int z=1; int j=1; while(cin>>x) { int max=-10000000; if(x==1) { cin>>y; if(y>0) { cout<<"Case #"<<j<<": The maximum pro...
by 3sam
Sat Apr 28, 2012 10:53 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 96328

Re: 10038 - Jolly Jumpers

brianfry713 wrote:3sam 3 100 0 1 is Not jolly.
i can`t understand you .......what must i do to get accepted ????? plz help :)
by 3sam
Sat Apr 28, 2012 5:14 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 96328

Re: 10038 - Jolly Jumpers

that`s my code and i do`t know why it`s WA always ...plz help me :) :) :) #include<iostream> #include<math.h> using namespace std; int main() { int x[3000],y,dif,flag,i; int diff[3000]; while(cin>>y) { for(int i=0;i<y;i++) { cin>>x ; } for(int i=0;i<y-1;i++) { dif=x -x[i+1]; if(dif<0) { dif=dif*-1; ...
by 3sam
Mon Apr 09, 2012 8:38 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 96328

Re: 10038 - Jolly Jumpers

i can`t get AC .....and don`t know why ???? this my code :: #include<iostream> #include<algorithm> using namespace std; int main() { int arr[3000]; int n,result; while(cin>>n) { for(int i=0;i<n;i++) { cin>>arr ; } sort(arr,arr+n); for(int i=2;i<=n;i++) { result=arr[n-1]-arr[n-i]; } if(arr[n-1]-arr[0...

Go to advanced search