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

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Temas
Páginas: 1 [2] 3 4 5 6
11  Programación / Java / geometria computaciona/analitica en: 8 Agosto 2016, 22:26 pm

 quiero resolver ejercicios como ser

1.- el area que comparten dos circulos
2.- el area del circulo dentro de un triangulo
3.- area del triangulo dentro de un circulo


esa clase de ejercicios en JAVA

saludos...



por ejemplo uno de los enunciados es

y una solucion que encontre en inter es la siguiente
Código
  1. import java.util.*;
  2. import java.io.*;
  3.  
  4. public class UVa10991_Region {
  5. public static void main(String[] args) throws IOException {
  6.  
  7. int T = Integer.parseInt(in.readLine());
  8. while (T-- > 0) {
  9. StringTokenizer stk = new StringTokenizer(in.readLine());
  10. double R1 = Double.parseDouble(stk.nextToken());
  11. double R2 = Double.parseDouble(stk.nextToken());
  12. double R3 = Double.parseDouble(stk.nextToken());
  13.  
  14. double a = R2 + R3;
  15. double b = R1 + R3;
  16. double c = R1 + R2;
  17.  
  18. double alpha = Math.acos((b * b + c * c - a * a) / (2.0 * b * c));
  19. double beta = Math.acos((a * a + c * c - b * b) / (2.0 * a * c));
  20. double gamma = Math.acos((a * a + b * b - c * c) / (2.0 * a * b));
  21.  
  22. double s = (a + b + c) / 2.0;
  23. double A = Math.sqrt(s * (s - a) * (s - b) * (s - c));
  24.  
  25. double slice1 = alpha * R1 * R1 / 2.0;
  26. double slice2 = beta * R2 * R2 / 2.0;
  27. double slice3 = gamma * R3 * R3 / 2.0;
  28.  
  29. double res = A - slice1 - slice2 - slice3;
  30. System.out.printf(Locale.ENGLISH, "%.6f%n", res);
  31. }
  32.  
  33. in.close();
  34. System.exit(0);
  35. }
  36. }

me ayudan a comentarlo, no entiendo mucho

MOD EDIT: No hacer doble post.
12  Foros Generales / Dudas Generales / the pirate bay para descargar es necesario ocultar la ip? en: 8 Agosto 2016, 15:03 pm
volvi a descargar de pirate bay, antes no sugerian ocultar la ip, es necesario hacerlo, pero para hacerlo se paga 12 $?

13  Programación / Programación General / team para implementar extension para chrome en: 5 Agosto 2016, 01:32 am
hola comunidad, se anima a realizar una extension para chrnome??? aun no se que tipo de extension, podemos pensar en algo, se animan?
14  Programación / Scripting / redes neuronales en: 1 Agosto 2016, 19:32 pm
alguien tiene el libro un buen libro de rna??? se lo agradeceria mucho si me pasa el link
15  Programación / Desarrollo Web / desarrollo web con python sin framework en: 31 Julio 2016, 21:28 pm
soy nuevo con python, se puede web sin framework, supongo que si pero como, vengo de java, php?
16  Programación / Scripting / Error en importar modulo en: 30 Julio 2016, 16:22 pm
me sale este error




que tengo que instalar, como lo soluciono?


17  Programación / Java / colgar un paper en: 29 Julio 2016, 01:21 am
hola esta ves recurro a ustedes para algo diferente

quisiera colgar un paper que hice sobre algoritmos en algun lugar, por decir la acm

alguien sabe como hacerlo?
18  Programación / Java / operador ^ en java en: 19 Julio 2016, 18:52 pm
que hace este operador?
19  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?
20  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
Páginas: 1 [2] 3 4 5 6
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines