UTNianos

Versión completa: Hacemos alguna competencia interna de desarrollo?
Actualmente estas viendo una versión simplificada de nuestro contenido. Ver la versión completa con el formato correcto.
Páginas: 1 2 3
Yo propongo juntar armas para matar a imakuni por semejante sugerencia.
A mí me copa la idea, pero no creo que les agrade ni a mi señora ni a mis jefes =P

Off-topic:
(15-12-2010 22:09)LeandroDG escribió: [ -> ]A mí me copa la idea, pero no creo que les agrade ni a mi señora ni a mis jefes =P


: DominadoSeñal:



=D
bueno, me acabo de encontrar con un desafio interesante.
esta en ingles, hoy o mañana lo traduzco.
es para conseguir trabajo en dropbox.

Packing your Dropbox
When you're working with petabytes of data, you have to store files wherever they can fit. All of us here at Dropbox are always searching for more ways to efficiently pack data into smaller and more manageable chunks. The fun begins when you bend the rules a little bit and visualize it in two dimensions.

You'll be given a list of rectangular "files" that you'll need to pack into as small a "Dropbox" as possible. The dimensions of each file will be specified by a tuple (width, height), both of which will be integers. The output of your function should be the area of the smallest rectangular Dropbox that can enclose all of them without any overlap. Files can be rotated 90° if it helps. Bonus points if you can draw pictures of the winning configurations along the way. While drawing pictures, any files sharing dimensions should be considered identical/interchangeable.

Your program must read a small integer 1 <= N <= 100 representing the maximum number of files to consider, followed by the width and height of each file, one per line. Output should simply be the area of the smallest containing Dropbox. If you want to print pretty pictures, send that to stderr. Only the output on stdout will be judged.

Sample Input

3
8 8
4 3
3 4
Sample Output

88
Páginas: 1 2 3
URLs de referencia