Search found 162 matches

Thu Aug 09, 2007 7:43 am
Forum: Volume 4 (400-499)
Topic: 478 - Points in Figures: Rectangles, Circles, Triangles
Replies: 44
Views: 10644
i tried but cant find the bug. please help me where is my faults. why this code does not give me write output??? #include <stdio.h> #include <string.h> #define LD long double struct rect{ char c; LD upp_left_x; LD upp_left_y; LD low_right_x; LD low_right_y; }; struct circle{ LD x0; LD y0; LD redius;...
Wed Aug 08, 2007 7:57 am
Forum: Volume 4 (400-499)
Topic: 478 - Points in Figures: Rectangles, Circles, Triangles
Replies: 44
Views: 10644
i have solved 476 and 477 easily but here is a problem with triangle. do you think this functions works well. inline int is_in_left(LD x1,LD y1, LD x2, LD y2, LD x3, LD y3) { LD area; area = 0.5 * (x1*(y2-1)*(y3-1) - y1*(x2-1)*(x3-1) + (x2-y3)*(x3-y2)); if(area <= 0) return 0; else return 1; } inlin...
Tue Aug 07, 2007 6:21 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 7778
i cant find out any bugs. If you can please check it. WA WA WA... #include <stdio.h> #include <string.h> struct rect{ long double upp_left_x; long double upp_left_y; long double low_right_x; long double low_right_y; }; struct fig{ long double x; long double y; }; char c; int main() { rect array[100]...
Sun Jul 29, 2007 3:05 pm
Forum: Volume 103 (10300-10399)
Topic: 10347 - Medians
Replies: 32
Views: 14118
just change the condition

Code: Select all

``````if(a<0||b<0||c<0)
``````
to:

Code: Select all

``````if(area <= 0)
``````
and also use Long double
check spelling b4 submit....

hope that help
Wed Jul 25, 2007 7:39 am
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31753
mr ishtiaqq,

you needn't count upto i<SIZE for the outer loop.
if you replaced:

Code: Select all

``````the condition i<SIZE
into:
i<= sqrt(SIZE)

``````
it will work good as you want.
Mon Jul 23, 2007 3:26 pm
Forum: Off topic (General chit-chat)
Topic: if u need specific type problem...
Replies: 1
Views: 26552

if u need specific type problem...

i would like to solve permutation related problems.
may you give me some link....???

thanx
Mon Jul 23, 2007 2:44 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36846

Code: Select all

``````
ACCEPTED

``````
abdullah how it can be?? may u explaine in brief???

Sun Jul 22, 2007 3:59 pm
Forum: Volume 4 (400-499)
Topic: 482 - Permutation Arrays
Replies: 159
Views: 31675
why wrong answer. need inputs and outputs. /* Author : Newton Problem name : Permutation array [482] Algorithm : Simple string, strtok */ #include <stdio.h> #include <string.h> #include <stdlib.h> char strings[20000][50],str[100000]; int num[20000]; int main() { int test,i,j; char *p; //freopen("inp...
Sun Jul 22, 2007 1:53 pm
Forum: Volume 1 (100-199)
Topic: 146 - ID Codes
Replies: 35
Views: 5763
i am extremely sorry. it was a chilly mistake [spelling mistake]. but it should be WA!
why PE??
Sun Jul 22, 2007 12:55 pm
Forum: Volume 102 (10200-10299)
Topic: 10229 - Modular Fibonacci
Replies: 53
Views: 17103
i cant find the point like jojo.
may you help explaining it elaborately....

thanx
Sun Jul 22, 2007 12:43 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36846
thanx to all.

Code: Select all

``````  Accepted
``````
Sun Jul 22, 2007 12:35 pm
Forum: Volume 103 (10300-10399)
Topic: 10327 - Flip Sort
Replies: 81
Views: 22698
thank you jainal.
you are really a genish!!!
Sat Jul 21, 2007 2:24 pm
Forum: Volume 9 (900-999)
Topic: 900 - Brick Wall Patterns
Replies: 16
Views: 9166
i got ACCEPTED both of the problem. now my question??

1. if fibo[m][n];
what should be the value of m and n for minimum memory
in the both problem??

Sat Jul 21, 2007 1:00 pm
Forum: Volume 9 (900-999)
Topic: 900 - Brick Wall Patterns
Replies: 16
Views: 9166

Code: Select all

``````
ACCEPTED

``````
Thu Jul 19, 2007 12:51 pm
Forum: Volume 4 (400-499)
Topic: 438 - The Circumference of the Circle
Replies: 29
Views: 9399
shihabrc

first try to check the sample input output in the problem carefully. if okey but WA then use forum.
try this
input:

Code: Select all

``````0.0 0.0 -1.0 7.0 7.0 7.0
``````
output:

Code: Select all

``````31.42
``````

and also try to print.....

Code: Select all

`` "%.2Lf\n"``
.

mind that %Lf is for long double, %lf is for double.

hope that helps