elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 [14] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ... 33
131  Programación / Java / uva 437 exercise en: 16 Julio 2016, 02:06 am
Citar
The Tower of Babylon

Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in line with the educational nature of this contest, we will tell you the whole story:

The babylonians had n types of blocks, and an unlimited supply of blocks of each type. Each type-i block was a rectangular solid with linear dimensions  tex2html_wrap_inline32 . A block could be reoriented so that any two of its three dimensions determined the dimensions of the base and the other dimension was the height. They wanted to construct the tallest tower possible by stacking blocks. The problem was that, in building a tower, one block could only be placed on top of another block as long as the two base dimensions of the upper block were both strictly smaller than the corresponding base dimensions of the lower block. This meant, for example, that blocks oriented to have equal-sized bases couldn't be stacked.

Your job is to write a program that determines the height of the tallest tower the babylonians can build with a given set of blocks.

Input and Output

The input file will contain one or more test cases. The first line of each test case contains an integer n, representing the number of different blocks in the following data set. The maximum value for n is 30. Each of the next n lines contains three integers representing the values  tex2html_wrap_inline40 ,  tex2html_wrap_inline42 and  tex2html_wrap_inline44 .

Input is terminated by a value of zero (0) for n.

For each test case, print one line containing the case number (they are numbered sequentially starting from 1) and the height of the tallest possible tower in the format "Case case: maximum height = height"

Sample Input

1
10 20 30
2
6 8 10
5 5 5
7
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
5
31 41 59
26 53 58
97 93 23
84 62 64
33 83 27
0
Sample Output

Case 1: maximum height = 40
Case 2: maximum height = 21
Case 3: maximum height = 28
Case 4: maximum height = 342



no entiendo este ejercicio, talves ustedes si, ayudenme porfavor

la salida 4 creo que esta mal, deberia ser 341

o me equivoco?
132  Foros Generales / Foro Libre / ganas de triunfar(Jaime escalante) en: 16 Julio 2016, 00:25 am
La mañana de este miércoles se dio a conocer oficialmente el sello postal en conmemoración al profesor boliviano Jaime Escalante en la 87ª Conferencia de la Liga de Ciudadanos Latinoamericanos Unidos (LULAD) en Washington, DC.
Escalante se hizo conocer en Estados Unidos por sus innovadores métodos de enseñanza en escuelas públicas de Los Ángeles. Su historia inspiró la película “Con ganas de triunfar” en 1988.
El profesor boliviano de matemáticas falleció el 30 de marzo de 2010 a los 79 años víctima de un cáncer de vejiga.
El hijo de Escalante lo representó durante la ceremonia de presentación de la estampilla realizada en Washington.

El profesor de matemáticas Jaime Escalante, inmortalizado en la película Con ganas de triunfar/Lecciones inolvidables o Stand and Deliver (1988) por el actor Edward James Olmos,

https://es.wikipedia.org/wiki/Jaime_Escalante
133  Programación / Desarrollo Web / Re: Red Social en: 15 Julio 2016, 22:24 pm
ser nob no es nada humillante, nadie nacio sabiendo.

ahora sobre el asunto deberias iniciar el proyecto y asi podran animarse algunos programadores a colaborar, y talves nisiquiera por dinero solo por las ganas de ayudar


saludos...
134  Programación / Java / Re: all in all uva exercise en: 15 Julio 2016, 19:40 pm
si funciona gracias, lo adapte a mi codigo!!!
135  Programación / Java / Re: all in all uva exercise en: 15 Julio 2016, 17:18 pm
hice la prueba de tu codigo y sale de respuesta lo siguiente
Citar
Yes
Yes
Yes
No

pero la respuesta deberia ser :

Citar
Yes
No
Yes
No

saludos... y gracias por colaborar
136  Programación / Java / all in all uva exercise en: 15 Julio 2016, 03:37 am
Citar
You have devised a new encryption technique which encodes a message by inserting between its characters
randomly generated strings in a clever way. Because of pending patent issues we will not discuss in
detail how the strings are generated and inserted into the original message. To validate your method,
however, it is necessary to write a program that checks if the message is really encoded in the final
string.
Given two strings s and t, you have to decide whether s is a subsequence of t, i.e. if you can remove
characters from t such that the concatenation of the remaining characters is s.
Input
The input contains several testcases. Each is specified by two strings s, t of alphanumeric ASCII
characters separated by whitespace. Input is terminated by EOF.
Output
For each test case output, if s is a subsequence of t.
Sample Input
sequence subsequence
person compression
VERDI vivaVittorioEmanueleReDiItalia
caseDoesMatter CaseDoesMatter
Sample Output
Yes
No
Yes
No


y este es mi codigo, no se como solucionarlo, no funciona para todos los casos


Código
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4. import java.util.StringTokenizer;
  5.  
  6. /**
  7.  * a->97 z->122 A->65 A->90
  8.  *
  9.  * @author qwery.azc
  10.  */
  11. public class Main {
  12.  
  13.    public String pertenecer(String cadenita, String cadenota) {
  14.        int piv = 0;
  15.        int cajaIndex=0;
  16.        String res="No";
  17.        for (int i = 0; i < cadenita.length(); i++) {
  18.            char caracter=cadenita.charAt(i);
  19.            for (int j = 0; j < cadenota.length() ; j++) {
  20.                if (caracter == cadenota.charAt(j)) {
  21.                    piv++;
  22.                    i++;
  23.  
  24.                }
  25.  
  26.            }
  27.        }
  28.        if(piv==cadenita.length()){
  29.            res="Yes";
  30.        }
  31.        System.out.println(res);
  32.        return res;
  33.    }
  34.  
  35.    public static void main(String argumentos[]) throws IOException {
  36.        Main m = new Main();
  37.         StringTokenizer stk;
  38.         String line;
  39.         String cad1,cad2;
  40.        BufferedReader  scanner = new BufferedReader(new InputStreamReader(System.in));
  41.        while ((line=scanner.readLine())!=null) {
  42.            stk=new StringTokenizer(line," ");
  43.           cad1=stk.nextToken();
  44.           cad2=stk.nextToken();
  45.           m.pertenecer(cad1, cad2);
  46.        }
  47.  
  48.        scanner.close();
  49.    }
  50.    }

aqui va la solucion, pero lo adapto y no da nada

http://solvingproblemsbd.blogspot.com/2014/09/uva-solution-10340-all-in-all.html
137  Programación / Desarrollo Web / Re: Proyectos web en: 15 Julio 2016, 00:18 am
https://www.youtube.com/watch?v=IFIvJCDRONo

lo subo aqui en el foro cuando tenga tiempo, paciencia porfavor

saludos...
138  Programación / Java / Re: Implementación de red neuronal en Java en: 15 Julio 2016, 00:13 am
que cosas hace, puedes hacer un breve resumen, sobre lo que hace?

saludos...
139  Programación / Java / Re: Implementación de red neuronal en Java en: 14 Julio 2016, 23:59 pm
https://en.wikipedia.org/wiki/Perceptron
140  Programación / Java / Re: Implementación de red neuronal en Java en: 14 Julio 2016, 23:20 pm
hice algo en python, es bastante interesante, informaticos...
saludos
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 [14] 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ... 33
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines