Search found 37 matches

by supermin
Sat Mar 12, 2005 8:56 am
Forum: Volume 108 (10800-10899)
Topic: 10823 - Of Circles and Squares
Replies: 50
Views: 10666

Re: precision error..

sohel wrote:watch out for precision error...

11 / 2 = 5.49999999999999 and not 5.50000000000000
So add necessary eps to handle this case.
I think this can be solved by:

Code: Select all

double ar = R / inCount + 0.5;
int iar = (int)ar;
When I participate the contest, this problem really confuses me....>"<
by supermin
Mon Nov 03, 2003 7:44 am
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31203

Cound anyone help with my code? ><" I try many cases, but still can't find the problem. #include<stdio.h> typedef struct { int digitprimestate; long key; }NUM; NUM array[1000002]; int primestate[1000002]; long getdigitnum(long n); int main() { long digitprimecount = 2; long cases; long left,right; l...
by supermin
Thu May 01, 2003 6:46 pm
Forum: Volume 3 (300-399)
Topic: 375 - Inscribed Circles and Isosceles Triangles
Replies: 19
Views: 2620

The following is my code.I got P.E. If you got W.A.,you may check it with my code. However,could anyone tell me about the standard I/O form. Why I got P.E. #include<stdio.h> #include<math.h> int main() { double r,total; double H,B; int cases; double pi=2.0*acos(0.0); int nl=0; scanf("%d",&cases); wh...
by supermin
Thu May 01, 2003 6:44 pm
Forum: Volume 3 (300-399)
Topic: 375 - Inscribed Circles and Isosceles Triangles
Replies: 19
Views: 2620

The following is my code.I got P.E. If you got W.A.,you may check it with my code. However,could anyone tell me about the standard I/O form. Why I got P.E. #include<stdio.h> #include<math.h> int main() { double r,total; double H,B; int cases; double pi=2.0*acos(0.0); int nl=0; scanf("%d",&cases); wh...
by supermin
Thu May 01, 2003 6:41 pm
Forum: Volume 3 (300-399)
Topic: 375 - Inscribed Circles and Isosceles Triangles
Replies: 19
Views: 2620

The following is my code.I got P.E. If you got W.A.,you may check it with my code. However,could anyone tell me about the standard I/O form. Why I got P.E. #include<stdio.h> #include<math.h> int main() { double r,total; double H,B; int cases; double pi=2.0*acos(0.0); int nl=0; scanf("%d",&cases); wh...
by supermin
Thu May 01, 2003 6:39 pm
Forum: Volume 3 (300-399)
Topic: 375 - Inscribed Circles and Isosceles Triangles
Replies: 19
Views: 2620

The following is my code.I got P.E. If you got W.A.,you may check it with my code. However,could anyone tell me about the standard I/O form. Why I got P.E. #include<stdio.h> #include<math.h> int main() { double r,total; double H,B; int cases; double pi=2.0*acos(0.0); int nl=0; scanf("%d",&cases); wh...
by supermin
Mon Mar 31, 2003 6:53 pm
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8691

Thank you very much!!!! :P

I miss this mistack........... :cry:

Thanks again.... :D
by supermin
Mon Mar 31, 2003 10:46 am
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8691

hmm..I test the input sample you modified.My ouput is following:

Code: Select all

abcd

There is no such word.

abcd

There is no such word.
Is it correct?
by supermin
Sat Mar 29, 2003 4:42 pm
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8691

blank line ??
I print a blank line between cases.

Code: Select all

if(nl) printf("\n"); 
else nl=1; 
Is there any wrong??
By the way,if there is only blank line's error and my answer is correct,the system should judge me P.E.

Anyway,thx.
by supermin
Sat Mar 29, 2003 6:19 am
Forum: Volume 101 (10100-10199)
Topic: 10126 - Zipf's Law
Replies: 36
Views: 8691

10126 Zipf's Law (WA)

I use binary tree to save the datas and "inorder" to print out the answers. But I got W.A. .Could anyone will help me with my code,or send me the sample I missed.Thx. [c] #include<stdio.h> #include<ctype.h> #include<string.h> #include<stdlib.h> struct TREE{ int count; char *alpha; struct TREE *left,...
by supermin
Sun Feb 16, 2003 1:37 pm
Forum: Volume 3 (300-399)
Topic: 332 - Rational Numbers from Repeating Fractions
Replies: 83
Views: 19514

about 332 P.E.

Could anyone tell me why I got P.E.

Is there any wrong about the presentation?

I see only 18 Accepted and many (P.E.)s
by supermin
Thu Feb 06, 2003 6:01 pm
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7183

This code is almost correct.
But try "99" :)

I think the answer is 252.
by supermin
Wed Jan 29, 2003 2:10 pm
Forum: Volume 3 (300-399)
Topic: 333 - Recognizing Good ISBNs
Replies: 166
Views: 21006

about P.E.

I got AC(P.E.) with this problem 333. But I can't find any wrong.I think the "(in)correct." is not the problem. This is my thougt: Ignore the spaces in front of the string,and output the followings. char temp[100],prob[100],*p; int i; gets(temp); i=0; p=temp; while(isspace(temp[i])) i++; strcpy(prob...
by supermin
Tue Jan 14, 2003 2:41 am
Forum: Volume 4 (400-499)
Topic: 496 - Simply Subsets
Replies: 48
Views: 9069

input: (1) 1 1 1 (2) 1 1 1 (3) 1 1 1 1 (4) (5) 1 (6) 1 (7) 1 3 2 1 2 3 (8) 1 3 2 1 1 2 3 output: (5) B is a proper subset of A (6) A is a proper subset of B (1),(2),(3),(4),(7),(8)=> equal ps. I am not sure if the judge will have the tests as the (4),(5),(6). If you want to check with my source code...
by supermin
Sun Jan 12, 2003 3:35 am
Forum: Volume 101 (10100-10199)
Topic: 10188 - Automated Judge Script
Replies: 58
Views: 30449

Oh , I see . Thank you very much! :D

Go to advanced search