why TLE plz help,,,
time limit exceeded
#include<stdio.h>
#include<math.h>
int _fact(long int a,long int b)
{
long int i,j;
for(i=2;i<=a || i<=b;i++)
{
if(a%i==0 && b%i==0)
return 1;
}
return 0;
}
int main(void)
{
long int N,count=0,total=0,i,j;
long int arr[50];
while(1)
{
scanf ...
Search found 23 matches
- Mon Jan 09, 2006 11:01 am
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30246
- Sat Jan 07, 2006 10:45 am
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37324
- Sat Jan 07, 2006 10:41 am
- Forum: Volume 1 (100-199)
- Topic: 190 - Circle Through Three Points
- Replies: 126
- Views: 37324
presentaion error 190
here is my code
plz check why PE
#include<stdio.h>
#include<math.h>
int main(void)
{
float x[3],y[3];
float mid1X,mid2X,mid1Y,mid2Y,m1,m2,c1,c2,temp;
float h,k,r,c,d,e;
while(scanf("%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2])==6)
{
/* while(!feof(in))
{ for(l=0;l<3;l++)
fscanf(in ...
plz check why PE
#include<stdio.h>
#include<math.h>
int main(void)
{
float x[3],y[3];
float mid1X,mid2X,mid1Y,mid2Y,m1,m2,c1,c2,temp;
float h,k,r,c,d,e;
while(scanf("%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2])==6)
{
/* while(!feof(in))
{ for(l=0;l<3;l++)
fscanf(in ...
- Fri Jan 06, 2006 4:33 pm
- Forum: Volume 4 (400-499)
- Topic: 499 - What's The Frequency, Kenneth?
- Replies: 93
- Views: 20689
- Fri Jan 06, 2006 1:50 pm
- Forum: Volume 4 (400-499)
- Topic: 499 - What's The Frequency, Kenneth?
- Replies: 93
- Views: 20689
- Thu Jan 05, 2006 2:01 pm
- Forum: Volume 4 (400-499)
- Topic: 499 - What's The Frequency, Kenneth?
- Replies: 93
- Views: 20689
- Thu Jan 05, 2006 12:16 pm
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54952
107 WA (getting output for the sample input with the prob)
im getting the correct output for the inputs provided with the problem
but WA when submiting plz help me..
#include <stdio.h>
int main(void)
{
unsigned long workerCats, maxHeight;
unsigned long N, tempCount, stackHeight, uselessCats, catsInLevel, heightOfCatsInLevel;
int level, i;
scanf ...
but WA when submiting plz help me..
#include <stdio.h>
int main(void)
{
unsigned long workerCats, maxHeight;
unsigned long N, tempCount, stackHeight, uselessCats, catsInLevel, heightOfCatsInLevel;
int level, i;
scanf ...
- Thu Jan 05, 2006 12:13 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116636
- Thu Jan 05, 2006 12:10 pm
- Forum: Volume 4 (400-499)
- Topic: 499 - What's The Frequency, Kenneth?
- Replies: 93
- Views: 20689
499 freq.. WA (getting output on my system though..)
help me plz...
for the inputs supplied with the problem it works dunno why im getting WA
#include<stdio.h>
int count[51];
void _initialize()
{
int i;
for(i=0;i<52;i++)
count[i]=0;
}
int main(void)
{
char ch,line[100];
int i,j,max=0;
while(1)
{
ch=getchar();
if(ch>=65 && ch<=90 ...
for the inputs supplied with the problem it works dunno why im getting WA
#include<stdio.h>
int count[51];
void _initialize()
{
int i;
for(i=0;i<52;i++)
count[i]=0;
}
int main(void)
{
char ch,line[100];
int i,j,max=0;
while(1)
{
ch=getchar();
if(ch>=65 && ch<=90 ...
- Thu Jan 05, 2006 12:05 pm
- Forum: Volume 4 (400-499)
- Topic: 499 - What's The Frequency, Kenneth?
- Replies: 93
- Views: 20689
- Thu Jan 05, 2006 12:01 pm
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116636
- Thu Jan 05, 2006 7:49 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116636
- Thu Jan 05, 2006 6:35 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116636
102 compile error (compiled on my system)usin DEV C++
here is the code getting CE
#include<stdio.h>
void _cpy(char *des, char *src)
{
int i=0;
while(src[i]!='\0')
{
des[i]=src[i];
i++;
}
des[i]='\0';
}
int main(void)
{
long int arr[9],min=0;
int i;
char str[5];
while(scanf("%ld%ld%ld%ld%ld%ld%ld%ld%ld",&arr[0],&arr[1 ...
#include<stdio.h>
void _cpy(char *des, char *src)
{
int i=0;
while(src[i]!='\0')
{
des[i]=src[i];
i++;
}
des[i]='\0';
}
int main(void)
{
long int arr[9],min=0;
int i;
char str[5];
while(scanf("%ld%ld%ld%ld%ld%ld%ld%ld%ld",&arr[0],&arr[1 ...
- Thu Jan 05, 2006 6:34 am
- Forum: Volume 1 (100-199)
- Topic: 100 - The 3n + 1 problem
- Replies: 1394
- Views: 317936
modified my code and got AC thanx for helping......
Code: Select all
oopss sorry my mistake... :oops:
- Thu Jan 05, 2006 6:30 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116636