Search found 5 matches

by aadelf
Thu May 24, 2007 2:41 pm
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 28268

These test cases were exactly what I need. I found my bug. Thanks a lot.
by aadelf
Tue May 22, 2007 9:43 pm
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 28268

I agree that the test case I mention shouldn't be correct. But I don't know what to think anymore.

Here is my code.

#include <stdio.h>

int main()
{
long n,c1,c2,n1,n2,swap,T;
long X,Y,preX,preY,a,b,d,temp,gcd,k,m,da,db;
double tc1,tc2;

scanf("%d",&n);
T=1;

while (n!=0) {
scanf("%d %d ...
by aadelf
Tue May 22, 2007 1:08 pm
Forum: Volume 100 (10000-10099)
Topic: 10090 - Marbles
Replies: 43
Views: 28268

I tested all sets in this forum and I get the correct answer.
However I get WA online.

I solve it using extended euclid algorithm.

I can not think of any more test cases. Can any provide more?

What happens in case:

28
1 1
2 2
by aadelf
Fri May 18, 2007 7:46 pm
Forum: Volume 2 (200-299)
Topic: 212 - Use of Hospital Facilities
Replies: 6
Views: 6561

The sample output is correct, but I keep getting an Wrong Answer result.
However I did not understand the part, where the next sample input is read.

while (scanf("%d %d %d %d %d %d %d",&nr,&nb,&sh,&mTrans,&mPreO, &mPreRe,&N)!=EOF){
......

}

Is this correct?

Every single character seems to be ...
by aadelf
Fri May 18, 2007 7:39 pm
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 70493

Help

could anyone help? I tested my code with all the testsets in this board, and all came out right. However I get a Wrong anwser result.

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(int argc,char *argv[])
{
float x,mo,result;
long i,N,money[1000],sum,sum1,sum2;


scanf("%d",&N ...

Go to advanced search