## Search found 37 matches

Sat Jan 11, 2003 8:17 pm
Forum: Volume 101 (10100-10199)
Topic: 10188 - Automated Judge Script
Replies: 58
Views: 31125
After changing the way as yatsen does , I got AC.

But I still don't know why can't use

Code: Select all

``````while(scanf("%d",&n) && n)
scanf("\n");``````
Could anyone explain it clearly? Maybe some examples are helpful.

Thanks!
Sat Jan 11, 2003 5:07 am
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 18668
Try this case:
3
3 6 8

pairs:3
search:1

And take a look at your source code:

Code: Select all

``if(search>0) printf("%.6f\n",sqrt(pairs/(search/6)));``
search/6 => 0
and pairs/0=> Runtime Error

and be careful about sqrt => return "double".
[/code]
Sat Jan 11, 2003 4:39 am
Forum: Volume 4 (400-499)
Topic: 408 - Uniform Generator
Replies: 48
Views: 4434
Try this case:

input:
666 444

The output should be"Bad Choice".
Fri Jan 10, 2003 8:57 pm
Forum: Volume 4 (400-499)
Topic: 496 - Simply Subsets
Replies: 48
Views: 9514
Though this article is too old, maybe it will help somebody.

You should consider this case:

input:
1 1 2 3
1 2 3

output:
A equals B

I think the problem dosen't explain very clearly.
So,it may have some "set" knowledge.
Thu Jan 09, 2003 12:16 pm
Forum: Volume 5 (500-599)
Topic: 587 - There's treasure everywhere!
Replies: 37
Views: 2845
P587

I use double for x,y ,and I got WA.
Instead,I use long double.I got AC.
Wed Jan 08, 2003 12:49 pm
Forum: Volume 103 (10300-10399)
Topic: 10326 - The Polynomial Equation
Replies: 18
Views: 6219
hmm..I miss this.sorry.I got AC now.Thank you!!
Tue Jan 07, 2003 8:12 pm
Forum: Volume 103 (10300-10399)
Topic: 10326 - The Polynomial Equation
Replies: 18
Views: 6219
I test it many times,but I still got WA. Could anyone find my bugs? Thanks in advance. #include<stdio.h> int main(void) { int n,i,count; /* 1<=n<=50 */ long long num[50]; long long value[51]; while(scanf("%d",&n)==1) { for(i=0;i<n;i++) { scanf("%lld",&num[i]); num[i]*=-1; } value[0]=num[0]; value[1]...
Tue Jan 07, 2003 12:39 pm
Forum: Volume 4 (400-499)
Topic: 484 - The Department of Redundancy Department
Replies: 103
Views: 9231
to rakeb: I test and submit your source code, but judge send me "Runtime Error (SIGSEGV)". Therefore, I think you can check your code again. Maybe you could tell me whether it can run correctly. :) I got AC,and I offer some information about this problem: 1.the integer number(positive/negative/zero)...
Thu Jan 02, 2003 7:03 am
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 21140
Ex:
I enter "abc" and use EOF instead of ENTER.
It should print "cba",not print nothing.

my code above is wrong.dont's take it..

good luck!
Tue Dec 03, 2002 9:04 pm
Forum: Volume 103 (10300-10399)
Topic: 10302 - Summation of Polynomials
Replies: 29
Views: 15352

### Re: Formula using the question hints

I think this question can just use the long double.=>(%Lf)

it can solve it very quickly.
Tue Dec 03, 2002 11:51 am
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 21140

### Re: ACM-483

I got A.C now.

I got W.A. because I ignore the EOF case.
When entering EOF,it still should print out the last stack.

Anyway,thanks..
Tue Dec 03, 2002 10:46 am
Forum: Volume 4 (400-499)
Topic: 483 - Word Scramble
Replies: 122
Views: 21140

### ACM-483

This is my code. I got WA,but I can't find the bug. I tested many times. Could someone help me?? Thanks in advance. #include<stdio.h> int main(void) { char str[50000]; char c; int top=0; int i; while(scanf("%c",&c)==EOF){ if(c!=' '&&c!='\n') { str[top]=c; top++; } else { for(i=top-1;i>=0;i--) printf...
Tue Dec 03, 2002 6:54 am
Forum: Volume 103 (10300-10399)
Topic: 10377 - Maze Traversal
Replies: 26
Views: 9987

### Re: acm-10377=>about P.E.

Thank you!!
I got accepted.
Mon Dec 02, 2002 6:11 pm
Forum: Volume 103 (10300-10399)
Topic: 10377 - Maze Traversal
Replies: 26
Views: 9987

### 10377

I got P.E. Accepted,but I still can't find the wrong with the P.E. problem.. Could somebody excute my source code and find my wrong..thanks!! ps.I think this blank lines are troubles........... #include<stdio.h> #define MAX 61 #define E 1 #define W 2 #define S 3 #define N 4 int chan_dir(int ,char); ...
Mon Dec 02, 2002 12:46 pm
Forum: Volume 4 (400-499)
Topic: 402 - M*A*S*H
Replies: 56
Views: 13837
Your output is correct, but test your program with this input (I am not sure that it is used, but I considered the case in my program): 10 11 3 5 4 3 2 9 6 10 10 6 2 7 3 4 7 4 5 3 2 4 Output: Selection #1 1 2 3 4 5 6 7 8 9 10 I ignore this sample,but I still got Acceptd.. I thougth the judge dosen'...