Search found 22 matches

by lendlice
Fri Aug 08, 2003 9:33 am
Forum: Volume 103 (10300-10399)
Topic: 10377 - Maze Traversal
Replies: 26
Views: 9725

10377 W.A

//10377 #include<stdio.h> #include<string.h> main() { int many=0,a,b,i=0,j=0,now1,now2,n,s=0,tr=0; char in[100][100],line[1000],state[6]="NESW"; scanf("%d\n",&many); while(many>0) { scanf("%d%d%*c",&a,&b); for(i=0;i<a;i++) gets(in[i]); scanf("%d%d",&now1,&now2); s=0; now1--; now2--; if(now1<a&&now2...
by lendlice
Fri Aug 01, 2003 8:39 am
Forum: Volume 5 (500-599)
Topic: 516 - Prime Land
Replies: 23
Views: 6548

516re(SIGFPE)

I found where is wrong with my code.
by lendlice
Wed Jul 23, 2003 5:27 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67226

10189 W.A

[cpp]//10189 #include<stdio.h> main() { char in[100][100],out[100][100]; int n,m,i=0,j=0,now=1; while(scanf("%d%d%*c",&n,&m)==2) { if(n==0&&m==0) break; for(i=0;i<n;i++) { for(j=0;j<m;j++) { scanf("%c",&in [j]); out [j]='0'; } scanf("%*c"); } for(i=0;i<n;i++) for(j=0;j<m;j++) { if(in [j]=='*') { out...
by lendlice
Mon Jul 21, 2003 6:06 am
Forum: Volume 4 (400-499)
Topic: 477 - Points in Figures: Rectangles and Circles
Replies: 11
Views: 1762

477 W.A

//477 #include<stdio.h> #include<stdlib.h> #include<math.h> main() { double x[11],y[11],x1[11],y1[11],in1,in2; int i=0,i1=0,j=0,tr=0,a=0,b=0,t; char r[11],n; while(scanf("%c",&r[i])==1) { if(r[i]=='*') break; if(r[i]=='r') scanf("%lf%lf%lf%lf%*c",&x[i],&y[i],&x1[i],&y1[i]); else if(r[i]=='c') scanf...
by lendlice
Fri Jun 13, 2003 3:05 am
Forum: Volume 6 (600-699)
Topic: 686 - Goldbach's Conjecture (II)
Replies: 41
Views: 18771

686 W.A

I got W.A Anyone can help me [cpp]//686 #include<stdio.h> #include<math.h> long primestack[50000]; int num=0; long prime() { int i,j,tr=0; for(i=2;i<=32768;i++) { for(j=2,tr=0;j<=sqrt(i);j++) { if(i%j==0) { tr=1; break; } if(j>=3) j++; } if(tr==0&&i!=0&&i!=1) { primestack[num]=i; num++; } } } main()...
by lendlice
Thu Jun 12, 2003 4:24 am
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36855

thanks
I got AC.
but i still use store prime.
and i got AC in 2 sec
by lendlice
Mon Jun 09, 2003 3:23 pm
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36855

I used to this way to write this program. but i got time limit. My friend told if you use this way to write this program you will spent a lot of time to do some useless thing. for example: if a number n mod 3 is not zero,so the number mod 6 is not zero,too. so,my friend told me use a array to save p...
by lendlice
Sun Jun 08, 2003 6:57 am
Forum: Volume 5 (500-599)
Topic: 583 - Prime Factors
Replies: 171
Views: 36855

583 - Prime Factors

anyone can help me [cpp]//583 #include<stdio.h> #include<math.h> long primestack[5000]; int num=0; long prime(long n) { int i,j,tr=0; num=0; for(i=2;i<=n;i++) { for(j=2,tr=0;j<=sqrt(i);j++) { if(i%j==0) { tr=1; break; } if(j>=3) j++; } if(tr==0&&i!=0&&i!=1) { primestack[num]=i; num++; } } return(num...
by lendlice
Fri May 30, 2003 4:46 am
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31358

thanks
i got ac
:D
by lendlice
Sun May 25, 2003 3:04 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79248

10038 W.A

i got W.A anyone can help me thanks [cpp]//10038 #include<stdio.h> #include<math.h> main() { int in[5000],many=0,i=0,count=0,ans; while(scanf("%d",&many)==1) { for(i=0;i<many;i++) scanf("%d",&in ); for(i=0;i<many-1;i++) { ans=fabs(in -in[i+1]); if(ans>=1&&ans<many) count++; else break; } if(count==m...
by lendlice
Sat May 24, 2003 9:58 am
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 33372

thanks
i know where is wrong with my code.
and i got ac thanks.
by lendlice
Fri May 23, 2003 4:48 pm
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 33372

530 tle

[cpp]//530
#include<stdio.h>
main()
{
double n=0,m=0,i=0,c=0;
while(scanf("%lf%lf",&n,&m)==2)
{
if(n==0&&m==0)
break;
c=n;
m=n-m;
if(n!=m)
{
for(i=1;i<m;i++)
c=c*(n-i)/(i+1);
}
printf("%.lf\n",c);
}
}[/cpp]
i got tle
anyone can help me
by lendlice
Thu May 15, 2003 5:42 am
Forum: Volume 3 (300-399)
Topic: 305 - Joseph
Replies: 41
Views: 3824

305

i got ac.
by lendlice
Sun May 11, 2003 1:23 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31358

10235 Time Limit Exceeded

anyone can help me [cpp]//10235 #include<stdio.h> #include<string.h> main() { unsigned long n=0,tr1=0,tr2=0,in1=0,in2=0,i=0,j=0,num=2; char in[100000]; while(scanf("%s",in)==1) { n=strlen(in); j=n-1; while(i<n) { in1=(in -'0')+in1*10; in2=(in[j]-'0')+in2*10; i++; j--; } while(tr1==0&&num<in1) { if(i...
by lendlice
Fri Apr 11, 2003 3:55 am
Forum: Volume 103 (10300-10399)
Topic: 10346 - Peter's Smokes
Replies: 46
Views: 16080

thanks
I get AC.
:P

Go to advanced search