Oracle MDC Coding challenge
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

When exactly is it valid to concatenate?

3 participantes

Ir abajo

When exactly is it valid to concatenate? Empty When exactly is it valid to concatenate?

Mensaje por mraggi Miér Dic 16, 2015 4:07 pm

I'm not very clear on some special cases.

For example, can I concatenate:

  • down to you
  • you're a big boy now

into "down to you're a big boy now"?

Or even

  • everybody's all-american
  • american beauty

into everybody's all-american beauty?

And if not, can I concatenate:

  • passport to paris
  • paris, when it sizzles


to "passport to paris, when it sizzles"?

If at least one word is concatenated, then can I split letters like this:

  • Juanito the good
  • he good, me bad

since the ends with "he", and so I could maybe put them like this: "Juanito the good, me bad"

Now, I'm pretty sure this is not valid, but what if a word is part of another?

  • the air i breathe
  • the alamo

into the air i breathe alamo?

Thanks.

mraggi

Mensajes : 18
Fecha de inscripción : 16/12/2015

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por Admin Dom Dic 20, 2015 4:51 pm

Hi,

The cases you are describing are not valid since the overlapping words must be over complete words, so the following cases are INVALID:


down to you
you're a big boy now

into "down to you're a big boy now"

"you're" is considered a complete word.


everybody's all-american
american beauty

into "everybody's all-american beauty"

all-american counts as a complete word.


passport to paris
paris, when it sizzles

into "passport to paris, when it sizzles"

This specific case may work, but it's not fully tested.
If you try uploading the string "passport to paris, when it sizzles", it will be accepted.


Juanito the good
he good, me bad

This is invalid since, you must overlap complete words.


the air i breathe
the alamo

into "the air i breathe alamo"

You can't split movie name that way, so this case is invalid.

Regards!

Admin
Admin

Mensajes : 26
Fecha de inscripción : 09/11/2015

https://oraclemdc.foroactivo.mx

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por mraggi Dom Dic 20, 2015 5:25 pm

Thanks for the reply.

So then how did someone get to 16700 characters?!? I don't seem to be able to get to more than 9000 even if I leave my computer searching for hours!! (and I get to 7800 in one second)

Are you sure the 16700 one is valid according to these rules?

Because if I allow the things I mentioned above, I can get to ~20,000...

mraggi

Mensajes : 18
Fecha de inscripción : 16/12/2015

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por Admin Dom Dic 20, 2015 8:07 pm

The leaderboard is not definitive, there's one more step to validate the solution. If there's something wrong there, we will realize it.

Admin
Admin

Mensajes : 26
Fecha de inscripción : 09/11/2015

https://oraclemdc.foroactivo.mx

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por mraggi Miér Dic 30, 2015 1:46 pm

Just to make sure before submitting my dumb solution: The symbols - and ' cannot be used to separate words, but , and . can. Right?

For example, this is not a valid concatenation:
a town like alice
alice's restaurant

into: a town like alice's restaurant

But what if there is punctuation between the words?
So for example, can I concatenate:
last dance'
dance with the dead

into last dance with the dead?

the file actually has these kinds of names.

Or
i remember you now...
now is good

into: i remember you now is good

I even found this, which I'm not sure how to detect if its not valid:
atlas shrugged part i
i am an american soldier

the i in the first movie refers to "one", and the i in the second one refers to the first singular pronoun, so maybe it shouldn't be valid, but that would be pretty complicated to code.

Sorry for so many questions, but I've spent a ridiculous amount of time in this, and I can't figure out how to get past 10k, to say nothing of doing it in less than 30 seconds. I can get to 9.1k in 17 seconds (or 8k in 1 second), but that's it. No more real improvement (it caps at about ~9.4k), even if I leave it running for hours.

mraggi

Mensajes : 18
Fecha de inscripción : 16/12/2015

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por luferogo Miér Dic 30, 2015 1:59 pm

Mate, Remember the last response they gave you: "the leader board is not definitive...". Do your best

luferogo

Mensajes : 3
Fecha de inscripción : 19/12/2015

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por mraggi Miér Dic 30, 2015 2:22 pm

Of course, but "my best" depends very sharply on the allowed concatenations Smile

mraggi

Mensajes : 18
Fecha de inscripción : 16/12/2015

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por Admin Miér Dic 30, 2015 3:17 pm


Admin
Admin

Mensajes : 26
Fecha de inscripción : 09/11/2015

https://oraclemdc.foroactivo.mx

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por Admin Jue Dic 31, 2015 12:39 pm

As mentioned in the above correction, it is possible to concatenate in more cases than we previously thought.
it is no longer limited to whole words.

Now the big question is what will finally win in efficiency. A whole word approach or a partial word approach.
Remember final solution is validated by

(length_solution)^2 / execution_time

Please see new post regarding the new online coding judge time validator (https://oraclemdc.foroactivo.mx/t12-online-coding-judge-time-validator)

Admin
Admin

Mensajes : 26
Fecha de inscripción : 09/11/2015

https://oraclemdc.foroactivo.mx

Volver arriba Ir abajo

When exactly is it valid to concatenate? Empty Re: When exactly is it valid to concatenate?

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.