Search found 6 matches

by birdegg
Tue Mar 01, 2005 3:59 am
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 48510

In the process when splitting the current "token" into alphabetic parts your current number of words may exceed 5000.

thank you,misof
finally I got AC.
I use getchar() rather than scanf()
but still need a large array to store and then sort.
I am wondering how those guys solve this problem with ...
by birdegg
Fri Feb 25, 2005 9:41 pm
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 48510

10815 -Andy's First Dictionary-Runtime Error

Hi~
I try this problem several time, but always got "runtime error" less
than 0.5sec. I use array of size 5000*5000 to store.
I think it's quite sufficient. Can somebody give me a hint.
thanks.~ :wink:


#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>

#define MAXLEN ...
by birdegg
Tue Feb 15, 2005 9:28 am
Forum: C
Topic: problem with sscanf()
Replies: 5
Views: 4595

problem with sscanf()

#include<stdio.h>

int main(){

char s[]="2.7183 3.1416 5.142";
float f;

while(sscanf(s,"%f",&f)==1){
printf("%f\n",f);
}
}

support s[] may contain arbitrary number of floatting points.
how can I pasrse all the floating points with sscanf().
since there are arbitrary number of floatting ...
by birdegg
Tue Feb 01, 2005 8:00 pm
Forum: Volume 5 (500-599)
Topic: 587 - There's treasure everywhere!
Replies: 37
Views: 6927

587 There's treasure everywhere! -got WA

can somebody give me some suggestions... any input sample is very helpful.
i debug this for many hours.
thanks first.


#include<stdio.h>
#include<string.h>
#include<math.h>
#define MAX 50000

int main(void){
int n,lens,map=0;
char str[MAX],s[10];
char *tokenPtr;
long double x,y;

while(gets ...
by birdegg
Thu Jan 06, 2005 8:56 am
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 50821

YA...! I got AC now.
thanks for your help :D
by birdegg
Wed Jan 05, 2005 10:48 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 50821

10340 -All in All -WA always.

I don't understand why i got WA
can somebody give me a set of inputs..?
thanks a lot

Code: Select all

#include <stdio.h>
#include <string.h>
#define MAX 50000

int main(){
	char s[MAX],t[MAX];
	unsigned long i,j,lens,lent;

	while(scanf("%s %s",s,t)==2){
                         .......
	}
		
}

Go to advanced search