Search found 9 matches

by ahmed
Thu Sep 17, 2009 7:28 am
Forum: Volume 114 (11400-11499)
Topic: 11462 - Age Sort
Replies: 49
Views: 17799

Re: 11462 - Ages Sort

I am getting wrong answer for the code below.Can anyone please help me to identify the problem with my code? #include<stdio.h> int age[2000000]; void counting(int num) { int j; int c[101]={0}; for(j=0;j<num;j++) c[age[j]]++; for(j=1;j<100;j++) { while(c[j]) { printf("%d ",j); c[j]--; } } printf("\b\...
by ahmed
Wed Apr 08, 2009 8:56 am
Forum: Volume 106 (10600-10699)
Topic: 10678 - The Grazing Cow
Replies: 17
Views: 10106

Re: 10678 - The Grazing Cow

Still WA :( .Can you please tell me what should be the output when D>L? Like:- 100 99 or 110 100.
by ahmed
Tue Apr 07, 2009 3:01 pm
Forum: Volume 106 (10600-10699)
Topic: 10678 - The Grazing Cow
Replies: 17
Views: 10106

Re: 10678 - The Grazing Cow

I have changed according to your suggestion,but I am still getting WA :( .Is there any special cases which I haven't considered.Can you give me some inputs to check?
Thanks for helping me out :)
by ahmed
Mon Apr 06, 2009 4:51 pm
Forum: Volume 106 (10600-10699)
Topic: 10678 - The Grazing Cow
Replies: 17
Views: 10106

Re: 10678 - The Grazing Cow

Can anyone please give me any suggestion about why I am getting WA?My code is given below:- #include<stdio.h> #include<math.h> int main(void) { double a,b,l,d,pi=2*acos(0); int n; scanf("%d",&n); for(;n;n--) { scanf("%lf%lf",&d,&l); a=l/2; b=(double)sqrtl((l/2*l/2)-(d/2*d/2)); printf("%.3lf\n",pi*a*...
by ahmed
Sat Apr 04, 2009 8:19 pm
Forum: Volume 106 (10600-10699)
Topic: 10696 - f91
Replies: 21
Views: 9651

Re: 10696 - f91

I am getting TLE in this problem.But I don't know why.Can anyone please help me? #include<iostream> using namespace std; int f91(int n) { if(n<=100) { return f91(f91(n+11)); } else if(n>=101) return n-10; } int main(void) { int n; while(cin>>n) { if(n==0) return 0; cout<<"f91("<<n<<") = "<<f91(n)<<e...
by ahmed
Thu Apr 02, 2009 5:42 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 23862

Re: Can't find error in Problem 160

I am srry.I didn't understand.I just posted in all the thread that I found.I promise it won't happen again and I have deleted all of my posts.
by ahmed
Thu Apr 02, 2009 5:06 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 23862

Re: Can't find error in Problem 160

plzzzzz help to find my error!!!!!

Code: Select all


AC


Thanks mf for your kind consideration :D
by ahmed
Sat Mar 28, 2009 7:18 pm
Forum: Volume 115 (11500-11599)
Topic: 11577 - Letter Frequency
Replies: 19
Views: 7024

11577 - Letter Frequency

I am getting WA in this problem.As far as I have checked my outputs are ok.Can anyone give me any suggestion.My code is given below:-

Code: Select all

Accepted.



Thanks a lot :D
by ahmed
Sun Mar 22, 2009 7:16 pm
Forum: Volume 111 (11100-11199)
Topic: 11185 - Ternary
Replies: 34
Views: 13667

Re: 11185 - Ternary

I don't know why I am getting WA.As far as I know my logic is right.Please give me any suggestion about why I am getting WA.My code is given below:- #include<iostream> #include<cmath> using namespace std; int main(void) { double num,ter,b; while(cin >> num) { if(num<0.00) break; else { ter=0.0; for(...

Go to advanced search