I used this algorithm. But still WA. I think the Knigths causing me the problem. Can anyone help me with some input.
Thanks for the reply
Search found 8 matches
- Thu Dec 04, 2003 8:06 pm
- Forum: Volume 2 (200-299)
- Topic: 278 - Chess
- Replies: 22
- Views: 6859
- Tue Dec 02, 2003 6:45 am
- Forum: Volume 2 (200-299)
- Topic: 278 - Chess
- Replies: 22
- Views: 6859
278 - Chess
Can anyone give me some critical input. I am trying this quite a some time. I am getting WA.
Thanks in advanced
Thanks in advanced
- Sat May 03, 2003 10:12 am
- Forum: Volume 5 (500-599)
- Topic: 557 - Burger
- Replies: 12
- Views: 7814
I use the pre calculate proecess and find the res using this.
But i got TLE. Help me
But i got TLE. Help me
Code: Select all
long double do_it(long n)
{
n-=2;
long double rs=1,r1;
long p=n/2;
for(;p>0;)
{
r1=p*4;
r1=n/r1;
rs*=r1;
n--;p--;
}
rs=1-rs;
return rs;
}
- Sat Dec 28, 2002 6:21 am
- Forum: Algorithms
- Topic: Prime Factors !!!!!!
- Replies: 12
- Views: 6916
- Sun Dec 15, 2002 8:26 am
- Forum: Volume 103 (10300-10399)
- Topic: 10354 - Avoiding Your Boss
- Replies: 47
- Views: 28421
- Tue Nov 26, 2002 7:43 am
- Forum: Volume 103 (10300-10399)
- Topic: 10397 - Connect the Campus
- Replies: 75
- Views: 38494
- Tue Oct 29, 2002 9:26 am
- Forum: Volume 3 (300-399)
- Topic: 332 - Rational Numbers from Repeating Fractions
- Replies: 83
- Views: 34232
- Sat Oct 26, 2002 9:20 am
- Forum: Volume 3 (300-399)
- Topic: 332 - Rational Numbers from Repeating Fractions
- Replies: 83
- Views: 34232
Fix my problem
Can anyone tell me where is my fault: :cry:
#include <stdio.h>
#include <math.h>
double gcd(double m,double n)
{
double r=fmod(m,n);
while(r)
{
m=n;
n=r;
r=fmod(m,n);
}
return n;
}
void main(void)
{
double cse=1,x,nn,dd,j,k,div,pp,d,f;
unsigned long long dummy;
double dum;
while(2 ...
#include <stdio.h>
#include <math.h>
double gcd(double m,double n)
{
double r=fmod(m,n);
while(r)
{
m=n;
n=r;
r=fmod(m,n);
}
return n;
}
void main(void)
{
double cse=1,x,nn,dd,j,k,div,pp,d,f;
unsigned long long dummy;
double dum;
while(2 ...