Search found 4 matches

by peterwen1990
Fri May 01, 2009 1:16 pm
Forum: Volume 6 (600-699)
Topic: 623 - 500!
Replies: 187
Views: 45941

Re: 623 - 500!

Can anyone tell me why i got runtime error? I run in my computer is ok #include <stdio.h> #include <stdlib.h> int main() { int i=2,n,ans[100000]={0},rans[1000][2600]={0,0},x=1,time,num,j,len[100000]={0}; len[0]=1; ans[0]=1; while (i<=1000) { x=product(ans,i,x); for(j=0;j<=x;j++) { rans[i][j]=ans[j];...
by peterwen1990
Sat Nov 22, 2008 7:03 am
Forum: Volume 4 (400-499)
Topic: 476 - Points in Figures: Rectangles
Replies: 87
Views: 8443

476 WA Can anyone tell me why?

#include <stdio.h> int main() { float x[10][2],y[10][2]; int i=0; char r; while(i<10) { scanf("%c",&r); if(r=='*') break; else if(r=='r') { scanf("%f %f %f %f",&x[i][0],&y[i][0],&x[i][1],&y[i][1]); i++; } } double x1,y1; int cout=1,judge=0; int j=0; while(scanf("%lf %lf",&x1,&y1)==2) { if(x1 >= 999...
by peterwen1990
Mon Nov 17, 2008 9:49 am
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 25241

Re: 406 - Prime Cuts

lnr wrote:To peterwen1990


Thank you.That is my program problem.
by peterwen1990
Fri Nov 14, 2008 12:46 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 25241

Re: 406 - Prime Cuts

Can anyone tell me why I awalays get Time limit exceeded Thanks #include <stdio.h> int main() { int prime[200]={1},n,c,i,j,num=1,x; while(scanf("%d %d",&n,&c)!=EOF) { for(i=2;i<=n;i++) { for(j=2;j<=i;j++) if(i%j==0 && j!=i) { break; } else if(i%j==0 && j==i) { prime[num]=i; num++; } } printf("%d %d:...

Go to advanced search