Search found 18 matches

by Fuad Hassan_IIUC(DC)
Thu Sep 22, 2005 3:24 pm
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 47619

10533TLE!!

PLZ help me out. I am getting TLE.Advance thanks 2 the helpers. :roll:

#include<stdio.h>
#include<iostream.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#define max 1000009
long seive[max];
void genseive()
{
int i,j;
int sq=sqrt(max);
seive[0]=seive[1]=1;
for(i=2;i<=sq;i ...
by Fuad Hassan_IIUC(DC)
Fri Sep 16, 2005 4:16 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 61155

583 Run time error??????????

plz help me out
#include<stdio.h>
#include<iostream.h>
#include<math.h>
#define max 48009 :oops:
long long seive[max];
long long prmcol[max];
void genseive()
{
long long m,n;
long long sq=sqrt(max);
seive[0]=seive[1]=1;
for(m=2;m<=sq;m++)
{
for(n=m+m;n<max;n+=m)
seive[n]=1;
}
n=-1;
for(m ...
by Fuad Hassan_IIUC(DC)
Wed Jul 13, 2005 12:09 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 124793

i have changed the code a bit but still getting WA. here is mu chaged code.

#include<stdio.h>
#include<iostream.h>
int main()
{
char str[105][105];
int i,j,count,a,b,field=1;
while(cin>>a>>b)
{
if(a==0&&b==0)
break;
for(i=0;i<a;i++)
{
for(j=0;j<b;j++)
{
cin>>str [j];

}
}
printf ...
by Fuad Hassan_IIUC(DC)
Sun Jul 10, 2005 5:30 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 124793

actually when i submitted this problem i made the size of str[105][105]
my fault is in another place
by Fuad Hassan_IIUC(DC)
Sun Jul 10, 2005 5:26 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 124793

10189 - Minesweeper

i just can't believe that i am getting WA!!!! i know i am making simple mistakes but can't find out where the mistake is :evil:
#include<stdio.h>
#include<iostream.h>
int main()
{
char str[50][50];
int i,j,count,a,b,field=1;
while(cin>>a>>b)
{
if(a==0&&b==0)
break;
for(i=0;i<a;i++)
{
for ...
by Fuad Hassan_IIUC(DC)
Fri Jul 01, 2005 5:36 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 61155

583~~TLE!!!~~

Why am i getting TLE???? :o
plz help me.
#include<stdio.h>
#include<iostream.h>
#include<math.h>
#define max 480000
long long seive[max];
long long prmcol[max];
void genseive()
{
long long m,n;
long long sq=sqrt(max);
seive[0]=seive[1]=1;
for(m=2;m<=sq;m++)
{
for(n=m+m;n<max;n+=m)
seive[n ...
by Fuad Hassan_IIUC(DC)
Tue Apr 19, 2005 9:44 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 48524

10394 WA????

plz help me :o

#include<iostream.h>
#include<stdio.h>
#include<math.h>
#define max 100000
long long seive[max];
long long pi;
long long a[max],b[max];
long long prime[max];
void genseive()
{
long i,j,sq;
sq=sqrt(max);
seive[0]=seive[1]=1;
for(i=2;i<=sq;++i)
{
for(j=i+i;j<=max;j+=i)
seive[j ...
by Fuad Hassan_IIUC(DC)
Tue Apr 05, 2005 9:01 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 60663

Now Run Time Error????

now run time error!!! plz help me :o

#include<stdio.h>
#include<string.h>
#include<iostream.h>
#define L 20000000
void reverse(char *orig,char *store)
{
long long len;
len=strlen(orig);
long long i;
for(i=len-1;i>=0;i--)
{
store[len-i-1]=orig ;
store[len]='\0';
}
}

void add(char s[], char t ...
by Fuad Hassan_IIUC(DC)
Sun Apr 03, 2005 5:02 pm
Forum: Volume 7 (700-799)
Topic: 713 - Adding Reversed Numbers
Replies: 142
Views: 60663

713 why WA plz help

why am i getteing WA :o plz help me

#include<iostream.h>
#include<stdio.h>
#include<string.h>
void strrev1(char *str1,char *str2)
{
long long len,i,j,k;
len=strlen(str1);
for(i=0;i<=len;i++)
str2 =str1[len-i-1];
}

int main()
{
char buffer[100000],bufferrev[100000],fuffer[100000],fufferrev ...
by Fuad Hassan_IIUC(DC)
Fri Feb 04, 2005 3:52 pm
Forum: Volume 103 (10300-10399)
Topic: 10327 - Flip Sort
Replies: 81
Views: 35373

10327 why WA????

plz help me :o
why WA?
#include<stdio.h>
#include<iostream.h>
int main()
{
long long n,data[10000],j,k,i,temp,swap;
while(cin>>n)
{
for(i=1;i<=n;i++)
cin>>data ;
swap=0;
for(k=1;k<=n-1;k++)
{
for(j=1;j<=n-k;j++)
{
if(data[j]>=data[j+1])
{
temp=data[j];
data[j]=data[j+1];
data[j+1 ...
by Fuad Hassan_IIUC(DC)
Thu Feb 03, 2005 6:01 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 64374

thank you. i got AC . actually it was my foolish mistake :D
by Fuad Hassan_IIUC(DC)
Wed Feb 02, 2005 7:53 pm
Forum: Volume 5 (500-599)
Topic: 576 - Haiku Review
Replies: 50
Views: 22438

I got AC thank you :D
by Fuad Hassan_IIUC(DC)
Tue Feb 01, 2005 2:54 pm
Forum: Volume 100 (10000-10099)
Topic: 10050 - Hartals
Replies: 59
Views: 29761

thank you veeeeeeeeeeeeeery much i got AC :D thank you again.
by Fuad Hassan_IIUC(DC)
Mon Jan 31, 2005 8:23 pm
Forum: Volume 5 (500-599)
Topic: 576 - Haiku Review
Replies: 50
Views: 22438

plz help me :o
by Fuad Hassan_IIUC(DC)
Mon Jan 31, 2005 8:20 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 64374

488 why WA???

plz help me out.

#include<stdio.h>
#include<iostream.h>
int main()
{
int a,f,i,j,k,l,m,flag;
cin>>a>>f;

flag=0;
for(i=1;i<=f;i++)
{
if(flag==1)
cout<<"\n";
for(j=1;j<=a;j++)
{
for(k=1;k<=j;k++)
cout<<j;
cout<<"\n";
}
for(l=a-1;l>=1;l--)
{
for(m=1;m<=l;m++)
cout<<l;
cout<<"\n ...

Go to advanced search