This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = set() | |
max_memory_usage = 0 | |
def dp(foregroundTasksIndex, backgroundTasksIndex, foregroundTasks, backgroundTasks, k): | |
global max_memory_usage | |
global result | |
if foregroundTasksIndex == len(foregroundTasks) or backgroundTasksIndex == len(backgroundTasks): | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>Maestros</title> | |
<meta charset="utf-8" /> | |
<link rel="shortcut icon" href="css/favico.ico" /> | |
<link rel="stylesheet" href="css/estilomaestros.css" type="text/css" /> | |
<script type="text/javascript" src="js/PaginasMaestros.js"></script> | |
<script type="text/javascript" src="js/jquery-3.2.1.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
La idea es encontrar el angulo punto que nos dan, usan atan(y/x), comparandolo con nuestros angulos inicial y final | |
y finalmente que la distancia del punto al centro sea menor o igual al radio | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
La idea es basicamente greedy, tomar el mayor disponible y los n menores necesarios | |
para completar el peso minimo requerido de 50 | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
La idea de solución es ad-hoc. | |
Tener cuidado con que la fuente C5 solo deben imprimir los * y la C1 solo los caracteres, no los espacios( . ) | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
La idea de solución es usar union-find disjont sets | |
combinado con un map | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> | |
#include <stack> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Problema ad-hoc, la idea de solución es simular el proceso de como va "despertando el cerebro" | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> | |
#include <stack> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
La idea en este problema es llevar un acumulado pero de los numeros que hay (del 0 al 9) hasta x posición | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> | |
#include <stack> | |
#include <sstream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Problema adhoc | |
La idea es usar un map,y un arreglo de numeros como string para evitar la conversion de int a string | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> | |
#include <stack> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Idea de solucion adhoc, la parte principal del es convertir int a string, | |
en c++11 se puede hacer de forma facil usando to_string(int x) | |
PResentation error: cuidar siempre imprimir un salto de linea entre casos y tambien al final de la salida | |
**/ | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> |
NewerOlder