Programadores de Sistemas
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
¿Quién está en línea?
En total hay 3 usuarios en línea: 0 Registrados, 0 Ocultos y 3 Invitados

Ninguno

[ Ver toda la lista ]


El record de usuarios en línea fue de 35 durante el Jue Feb 15, 2024 8:05 pm
Conectarse

Recuperar mi contraseña


Google Code Jam

3 participantes

Ir abajo

Google Code Jam Empty Google Code Jam

Mensaje por kbudo Sáb Sep 05, 2009 1:15 am

Google Code Jam is a coding competition in which professional and student programmers are asked to solve complex algorithmic challenges in a limited amount of time. The contest is all-inclusive: Google Code Jam lets you program in the coding language and development environment of your choice.

http://code.google.com/intl/es-ES/codejam/

Los problemas

Alien Language
Problem

After years of study, scientists at Google Labs have discovered an alien language transmitted from a faraway planet. The alien language is very unique in that every word consists of exactly L lowercase letters. Also, there are exactly D words in this language.

Once the dictionary of all the words in the alien language was built, the next breakthrough was to discover that the aliens have been transmitting messages to Earth for the past decade. Unfortunately, these signals are weakened due to the distance between our two planets and some of the words may be misinterpreted. In order to help them decipher these messages, the scientists have asked you to devise an algorithm that will determine the number of possible interpretations for a given pattern.

A pattern consists of exactly L tokens. Each token is either a single lowercase letter (the scientists are very sure that this is the letter) or a group of unique lowercase letters surrounded by parenthesis ( and ). For example: (ab)d(dc) means the first letter is either a or b, the second letter is definitely d and the last letter is either d or c. Therefore, the pattern (ab)d(dc) can stand for either one of these 4 possibilities: add, adc, bdd, bdc.

Input

The first line of input contains 3 integers, L, D and N separated by a space. D lines follow, each containing one word of length L. These are the words that are known to exist in the alien language. N test cases then follow, each on its own line and each consisting of a pattern as described above. You may assume that all known words provided are unique.

Watersheds


Problem

Geologists sometimes divide an area of land into different regions based on where rainfall flows down to. These regions are called drainage basins.

Given an elevation map (a 2-dimensional array of altitudes), label the map such that locations in the same drainage basin have the same label, subject to the following rules.

* From each cell, water flows down to at most one of its 4 neighboring cells.
* For each cell, if none of its 4 neighboring cells has a lower altitude than the current cell's, then the water does not flow, and the current cell is called a sink.
* Otherwise, water flows from the current cell to the neighbor with the lowest altitude.
* In case of a tie, water will choose the first direction with the lowest altitude from this list: North, West, East, South.

Every cell that drains directly or indirectly to the same sink is part of the same drainage basin. Each basin is labeled by a unique lower-case letter, in such a way that, when the rows of the map are concatenated from top to bottom, the resulting string is lexicographically smallest. (In particular, the basin of the most North-Western cell is always labeled 'a'.)

Input

The first line of the input file will contain the number of maps, T. T maps will follow, each starting with two integers on a line -- H and W -- the height and width of the map, in cells. The next H lines will each contain a row of the map, from north to south, each containing W integers, from west to east, specifying the altitudes of the cells.

Welcome to Code Jam


Problem

So you've registered. We sent you a welcoming email, to welcome you to code jam. But it's possible that you still don't feel welcomed to code jam. That's why we decided to name a problem "welcome to code jam." After solving this problem, we hope that you'll feel very welcome. Very welcome, that is, to code jam.

If you read the previous paragraph, you're probably wondering why it's there. But if you read it very carefully, you might notice that we have written the words "welcome to code jam" several times: 400263727 times in total. After all, it's easy to look through the paragraph and find a 'w'; then find an 'e' later in the paragraph; then find an 'l' after that, and so on. Your task is to write a program that can take any text and print out how many times that text contains the phrase "welcome to code jam".

To be more precise, given a text string, you are to determine how many times the string "welcome to code jam" appears as a sub-sequence of that string. In other words, find a sequence s of increasing indices into the input string such that the concatenation of input[s[0]], input[s[1]], ..., input[s[18]] is the string "welcome to code jam".

The result of your calculation might be huge, so for convenience we would only like you to find the last 4 digits.

Input

The first line of input gives the number of test cases, N. The next N lines of input contain one test case each. Each test case is a single line of text, containing only lower-case letters and spaces. No line will start with a space, and no line will end with a space.

Output

For each test case, "Case #x: dddd", where x is the case number, and dddd is the last four digits of the answer. If the answer has fewer than 4 digits, please add zeroes at the front of your answer to make it exactly 4 digits long.


Estas son las estadisticas de los lenguajes que se utilizaron para resolver el Google Code Jam 2009

http://www.go-hero.net/jam/09/languages


Increiblemente, hay una "persona" que utilizo Assembler para resolver uno de los problemas y BrainFuck, que es un lenguaje tan pero tan feo, que un HelloWorld escrito en este se ve asi:

Código:

++++++++++
[              Bucle para iniciar las memorias (se repite 10 veces)
  >+++++++>++++++++++>+++++++++++>+++>+<<<<<-
      70        100      110      30  10
]
>++.              imprime 'H'  (72) 1
>>+.              imprime 'o'  (111) 3
---.                      'l'  (108) 3
<---.                    'a'  (97) 2
>>++.                  espacio (32) 4
<+.                      'm'  (109) 3
++++++++.                'u'  (117) 3
-------.                  'n'  (110) 3
<+++.                    'd'  (100) 2
>+.                      'o'  (111) 3
>+.                      '!'  (33) 4
>.                  nuevalínea (10) 5

kbudo
kbudo

Cantidad de envíos : 437
Puntos : 28216
Reputación : 2
Fecha de inscripción : 09/04/2009
Edad : 40
Localización : In your head

Volver arriba Ir abajo

Google Code Jam Empty Re: Google Code Jam

Mensaje por kbudo Sáb Sep 05, 2009 1:15 am

Si a alguien le da el cuero para hacerlo posta, lo invito a tomar un fernet.
kbudo
kbudo

Cantidad de envíos : 437
Puntos : 28216
Reputación : 2
Fecha de inscripción : 09/04/2009
Edad : 40
Localización : In your head

Volver arriba Ir abajo

Google Code Jam Empty Re: Google Code Jam

Mensaje por Rody Sáb Sep 05, 2009 9:58 am

mm como que me pica la competencia, pero esta lejos de mi nivel de ingles creo Razz
Rody
Rody

Cantidad de envíos : 155
Puntos : 27621
Reputación : 0
Fecha de inscripción : 16/04/2009
Localización : en mi casa por lo gral.

Volver arriba Ir abajo

Google Code Jam Empty Re: Google Code Jam

Mensaje por Ricardo II Sáb Sep 05, 2009 12:40 pm

ingles--- eso ya me limita....jajajaja
Ricardo II
Ricardo II
Admin

Cantidad de envíos : 424
Puntos : 28122
Reputación : 7
Fecha de inscripción : 09/04/2009
Edad : 42
Localización : Yerba Buena - Tucuman

https://proyecto-origenes.forosactivos.net

Volver arriba Ir abajo

Google Code Jam Empty Re: Google Code Jam

Mensaje por kbudo Dom Sep 06, 2009 10:19 pm

Claro, el nivel del ingles los limita, nada que ver con el nivel de los problemas
kbudo
kbudo

Cantidad de envíos : 437
Puntos : 28216
Reputación : 2
Fecha de inscripción : 09/04/2009
Edad : 40
Localización : In your head

Volver arriba Ir abajo

Google Code Jam Empty Re: Google Code Jam

Mensaje por Rody Vie Sep 11, 2009 11:25 am

mm como que dan ganas no??
el welcome to code jam parece facil, claro ese te lo dan por dartelo nomás, verdad?? solo buscar un string en un archivo que te dan, y buscarlo n veces ?? asi es?? lo lei rapidito
el alien y el otro se ven pesaditos de verdad, eso si esta fuera del nivel jaja aunque vi muchos de argentina pero mas de china Razz

otra cosa, el lenguaje mas usado es c++ y java, despues python, ese que tal es?? tambien anda por ahi c, osea, se pueden resolver los problemas sin utilizar clases o caracteristicas de OO??

despues no entendi el tema del tiempo, vos codificas la solucion, ahi te bajas el archivo input y en 4' tenes que mandar el resultado y el codigo?? si tu programa esta mal te jodiste jaja o como es?

luego ya estan en la 1era vuelta verdad??

me copo man, ademas ya podes ver las soluciones en el lenguaje que vos quieras Very Happy

buen post(?) mocho, si vos quedaste cuando te den los 5000 dolares podes pagarle la coca a todos Razz
Rody
Rody

Cantidad de envíos : 155
Puntos : 27621
Reputación : 0
Fecha de inscripción : 16/04/2009
Localización : en mi casa por lo gral.

Volver arriba Ir abajo

Google Code Jam Empty Re: Google Code Jam

Mensaje por Contenido patrocinado


Contenido patrocinado


Volver arriba Ir abajo

Volver arriba

- Temas similares

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