how long the array is!!!

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
smr
New poster
Posts: 3
Joined: Tue Aug 19, 2003 9:30 pm

how long the array is!!!

Post by smr »

if i want to search a word from a sentence of length 10^14 char then how could i do it? main problem i can't declare any variable of that langth. Please help me.

bugzpodder
Experienced poster
Posts: 147
Joined: Fri Jun 13, 2003 10:46 pm

Post by bugzpodder »

then where is the sentence at? file? stdin?

Joseph Kurniawan
Experienced poster
Posts: 136
Joined: Tue Apr 01, 2003 6:59 am
Location: Jakarta, Indonesia

Post by Joseph Kurniawan »

Usually if the prob requests for something like that, the judge will allow to use bigger memory (thus the array size can be increased). But if it doesn't, try using linked list.

turuthok
Experienced poster
Posts: 193
Joined: Thu Sep 19, 2002 6:39 am
Location: Indonesia
Contact:

Post by turuthok »

But gosh ... 10^14 ... that's fourteen zeroes ... huge huge input.

-turuthok-
The fear of the LORD is the beginning of knowledge (Proverbs 1:7).

smr
New poster
Posts: 3
Joined: Tue Aug 19, 2003 9:30 pm

Post by smr »

bugzpodder wrote:then where is the sentence at? file? stdin?
input is from stdin.

Ivor
Experienced poster
Posts: 150
Joined: Wed Dec 26, 2001 2:00 am
Location: Tallinn, Estonia

Post by Ivor »

are you sure its 10^14??? I mean it's like.... 100 TERABYTES!!

I don't believe you have any such a big storing space and I don't believe you might happen to have such input.

Maybe you meant 2^14? like 16384 characters? a suitable size for an overgrown sentence ;) see the description again

Ivor
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

bery olivier
Learning poster
Posts: 90
Joined: Sat Feb 15, 2003 1:39 am
Location: Paris, France
Contact:

Post by bery olivier »

lol 10^14 char !!! 100 000 Giga Bytes. I want such a hard disk. Actually, this is often use for big database for companies like phone, gaz, etc.. (50million curtomers + adresses + phone number + location + ... to store, it grows up quickly). But don't even try to put it on a RAM memory. :D
Not AC yet Image AC at last Image

junjieliang
Experienced poster
Posts: 169
Joined: Wed Oct 31, 2001 2:00 am
Location: Singapore

Post by junjieliang »

Actually if you're searching for a word... you just need an array size of length(word). Keep reading and discard one letter at a time...

However, I think you'll run into serious time problem... 10^14... lol...

Post Reply

Return to “Algorithms”