10815 - Andy's First Dictionary
Moderator: Board moderators
Internal compiler error
I am trying to submit my Java program.
I have solved many problems using Java ( not that many but
enough to be aware of how should I form my Java file ).
Well, now I have a problem I have never seen before.
I get a Compile Error and I receive an email
which says only this:
Here are the compiler error messages:
gcj: Internal compiler error: program jc1 got fatal signal 11
Well, I have a main class, it is not public and
I have a main function in it.
Anybody has an idea what the reason could be ?!
I have solved many problems using Java ( not that many but
enough to be aware of how should I form my Java file ).
Well, now I have a problem I have never seen before.
I get a Compile Error and I receive an email
which says only this:
Here are the compiler error messages:
gcj: Internal compiler error: program jc1 got fatal signal 11
Well, I have a main class, it is not public and
I have a main function in it.
Anybody has an idea what the reason could be ?!
10815 - Andy's First Dictionary
Hi,
What is correct answer to the input:
"Andy's" ?
Is it:
andy
s
or
andy's
or andys ?
Wojciech
What is correct answer to the input:
"Andy's" ?
Is it:
andy
s
or
andy's
or andys ?
Wojciech
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
Hi,
I prepared the judge input, and I can tell you that there are NO apostrophes in the file.![:wink:](./images/smilies/icon_wink.gif)
I prepared the judge input, and I can tell you that there are NO apostrophes in the file.
![:wink:](./images/smilies/icon_wink.gif)
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
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.~
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:](./images/smilies/icon_wink.gif)
Code: Select all
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
#define MAXLEN 5000
#define MAXWORD 5000
void removeNonAlpha(char t[],int len);
int compare(const void *a, const void *b);
char store[MAXWORD][MAXLEN];
char t[MAXLEN];
long globali=0;
int main(){
code removed.
}
Last edited by birdegg on Tue Mar 01, 2005 4:01 am, edited 1 time in total.
thank you,misofmisof wrote:In the process when splitting the current "token" into alphabetic parts your current number of words may exceed 5000.
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 only 64KB of memeories.
-
- Guru
- Posts: 647
- Joined: Wed Jun 26, 2002 10:12 pm
- Location: Hong Kong and New York City
- Contact:
The memory usage for very short programs are known to be inaccurate - ignore them.
Check out http://www.algorithmist.com !
10815 - Andy's First Dictionary
Can anyone tell me what will be the array size that will get AC.
I am getting either MLE or RTE.
please help!!!!!!!!!!!!
![:cry:](./images/smilies/icon_cry.gif)
I am getting either MLE or RTE.
please help!!!!!!!!!!!!
/* Sorry For Nothing */
10815 - Andy's dictionary
i keep receiving wrong answer...any critical input i can't remembr??...
Few things:
1) please use an already existing thread for a given problem, if there's one that is.
2) check your method that extracts words, some bug there possibly
3) the array or whatever data structure you are using to store the words,
is probably small
4) maybe some problem with lexicographic ordering of words,
...
I can go on, throwing stones, until and unless you come up with your algo.
Regards,
Suman.
1) please use an already existing thread for a given problem, if there's one that is.
2) check your method that extracts words, some bug there possibly
3) the array or whatever data structure you are using to store the words,
is probably small
4) maybe some problem with lexicographic ordering of words,
...
I can go on, throwing stones, until and unless you come up with your algo.
Regards,
Suman.
-
- New poster
- Posts: 43
- Joined: Mon Oct 13, 2003 4:54 pm
- Location: Mexico
- Contact:
My idea
string a[MAX+1];
string b[MAX*MAX];
for x = 1 to n begin read(a[x]);
nc = 0;
for x = 1 to n begin
for y = 0 to n-1 begin if(!leter(a[x][y])) a[x][y] = ' ';
buf = strtok(a[x], " \n");
while(buf != NULL){
b[nc++] = buf;
buf = strtok(NULL , " \n");
}
endfor
sort(b[x]);
print(b[0])
for x = 1 to nc-1 begin if(b[x] != b[x-1]) print(b[x]);
string a[MAX+1];
string b[MAX*MAX];
for x = 1 to n begin read(a[x]);
nc = 0;
for x = 1 to n begin
for y = 0 to n-1 begin if(!leter(a[x][y])) a[x][y] = ' ';
buf = strtok(a[x], " \n");
while(buf != NULL){
b[nc++] = buf;
buf = strtok(NULL , " \n");
}
endfor
sort(b[x]);
print(b[0])
for x = 1 to nc-1 begin if(b[x] != b[x-1]) print(b[x]);