Search found 10 matches

by jai166
Tue Sep 23, 2003 6:58 am
Forum: Volume 5 (500-599)
Topic: 558 - Wormholes
Replies: 30
Views: 14893

558

The following is the way I count the path...... [c]/*for(k=0;k<maxwarm-1;k++)*/ for(i=0;i<maxstar;i++)/* Step */ for(j=0;j<maxstar;j++)/* End */ if(len[0][j]>len[0] +len [j]) len[0][j]=len[0] +len [j];[/c] Actually, I Accepted ! :D But I am really confused about why the answer is correct! :o In my o...
by jai166
Fri Aug 15, 2003 10:30 am
Forum: Volume 102 (10200-10299)
Topic: 10268 - 498-bis
Replies: 51
Views: 17352

10268 - 498'

I've submited it many times, but it always says "Time Limit Exceeded"! [c]/* 10268 */ #include<stdio.h> #define MAX 1000000 #define MAX2 500000 unsigned int c2i(char c[],int in[]); long double count(int x,int c[],unsigned int allc); int pow(int x,unsigned int t); void main(void) { char input[MAX]; u...
by jai166
Thu Jul 31, 2003 11:32 am
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27341

Thank you, and I've solved it!

Thank you, and I've solved it! :D [c]#include<stdio.h> #include<math.h> void main(void) { int t; long double n; scanf("%d",&t); for(;t;t--){ scanf("%Lf",&n); printf("%.0Lf\n",sqrtl(n)); if(t>1)putchar('\n'); } }[/c]
by jai166
Thu Jul 31, 2003 11:26 am
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21705

Thanks, I've solved it!

Thanks, I've solved it! :D [c]#include<stdio.h> #include<string.h> void main(void) { char p[255]; register int sum,i; while(gets(p)){ for(sum=0,i=0;*(p+i)!=NULL;i++) if(((*(p+i)>96&&*(p+i)<123)||(*(p+i)>64&&*(p+i)<91))&&(*(p+i+1)<65||*(p+i+i)>122||(*(p+i+i)>90&&*(p+i+i)<97))) sum++; printf("%d\n",su...
by jai166
Thu Jul 31, 2003 11:23 am
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11115

It's been Accepted!!

Well, I just changed "unsigned int" to "int" ,
"scanf("%u",&maxtimes);"
into
"while(scanf("%d",&maxtimes)==1)"

Then, it accepted! :D
by jai166
Tue Jul 29, 2003 9:45 am
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11115

Sorry, Time Limit Exceeded...

I've changed %d to %u, but the result cganged to "Time Limit Exceeded" . I use "Bubble Sort" and save how much times it count! I know bubble sort isn't a powerful sort, but a friend of mine use this way to solve it in the past, and he solved then. But when I transfered his codes yesterday, the resul...
by jai166
Mon Jul 28, 2003 11:33 am
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 11115

Why 299 WA?

Why 299 WA? I can't figure it out!!! [c]/* 299 */ #include<stdio.h> #define MAX 95 void main(void) { unsigned int maxnum,i,j,pass,maxtimes,times,n[MAX],temp; scanf("%u",&maxtimes); for(;maxtimes;maxtimes--){ scanf("%d",&maxnum); for(i=0;i<maxnum;i++)scanf("%u",&n ); times=0,pass=1; for(j=maxnum-1;j&...
by jai166
Sat Jun 07, 2003 3:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27341

10023

Sorry, but why 10023 Accepted (P.E.)? Could you help me? Thank you! [c]#include<stdio.h> #include<math.h> void main(void) { int i=0,t; long double n[20]; while(scanf("%d",&t)==1){ printf("\n"); for(;i<t;i++){ scanf("%Lf",&n ); printf("\n"); } for(i=0;i<t;i++) printf("%.0Lf\n\n",sqrtl(n )); } }[/c]
by jai166
Mon May 19, 2003 11:14 am
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21705

I still don't understand!

Sorry, I still don't understand. Could you explain it more clearly?
by jai166
Sat May 17, 2003 10:54 am
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21705

Why 494 WA? Could you help me?

Sorry, but I don't understand why it is wrong!!! Could you help me? Thank you very much ! :cry: [c]#include<stdio.h> #include<string.h> int count(char str[]) { register int sum=0,i; register char *p; p=strtok(str," "); do{ for(i=0;*(p+i)!=NULL;i++) if((*(p+i)>96&&*(p+i)<123)||(*(p+i)>64&&*(p+i)<91))...

Go to advanced search