Search found 6 matches

by challenger
Tue Feb 28, 2006 2:54 pm
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 27048

Ok! I fixed the double thing and the base and height formulads :)

[removed]

Double in ANSII is %f but I had to change it to %lf ... that was my error.
by challenger
Tue Feb 28, 2006 2:12 am
Forum: Volume 104 (10400-10499)
Topic: 10432 - Polygon Inside A Circle
Replies: 62
Views: 27048

10432 - WA grrr

I am always getting Wrong Answer (WA) ! Why is that? Can anyone find the bug in my code? I would really appreciate that. #include <stdio.h> #include <math.h> #define pi 2.*acos(0) main() { float r,n,b,h,ang,area; while( scanf("%f %f",&r,&n)==2 ) { ang=(2.*pi)/n; b=r*sin(ang); h=sqr...
by challenger
Sat Apr 16, 2005 11:43 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 19910

Still Accepted (P.E.)

I fixed the newline thing, placed a flag to check the first execution.. it looks right to me. Don't know why it keeps PE :/ C:\Valladolid\challenges\Debug>445_WA_PE.exe < 445.txt T TTTTT T T TT T T TT T T T TTT T T T T TTTTT*T XX X XXXX X C:\Valladolid\challenges\Debug> /* Marvelous Mazes */ #includ...
by challenger
Fri Jan 28, 2005 11:51 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 19910

Like you said I fixed the char buf[133]; However now I get Accepted (P.E.) Any idea why is that? Suggestions to solve it? #include <stdio.h> main() { char buf[133]; int n,i,j; while( gets(buf)!=NULL ) { if( buf[0]=='\n' ) printf("\n"); else { n=0; for(i=0;buf[i]!=0;i++) if( buf[i]=='!' ) p...
by challenger
Sun Jan 23, 2005 10:04 pm
Forum: Volume 4 (400-499)
Topic: 446 - Kibbles "n" Bits "n" Bits "n" Bits
Replies: 50
Views: 10439

446 - Returning a string...

So... I am having difficulty returning a string... I used a pointer... char *pt; to point to my input string.. I debugged the program under VC6.0 and pt handles the right string.. the problem is that its content is not properly returned... #include <stdio.h> char *bin(int num); main() { int i,n,hex1...
by challenger
Sun Jan 23, 2005 8:35 pm
Forum: Volume 4 (400-499)
Topic: 445 - Marvelous Mazes
Replies: 93
Views: 19910

445 - SIGSEGV

Everything works fine... the output is correct... C:\Valladolid\Debug>445 < aa.txt T TTTTT T T TT T T TT T T T TTT T T T T TTTTT*T XX X XXXX X C:\Valladolid\Debug> However I receive an error message: Your program has died with signal 11 (SIGSEGV). Meaning: Invalid memory reference Before crash, it r...

Go to advanced search