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
#include <cstdio> | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
using namespace std; | |
int n; | |
int S[300005],T[4]; | |
double M[300005]; |
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
#include <cstdio> | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
int t,a,b,r; | |
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
/** | |
Observar que dice: "output one line per car, in the same order as the input" Imprimir la respueta de cada auto en el mismo orden de entrada | |
Input: | |
1 | |
2 2 4 | |
0 left | |
1 left | |
2 right |
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
/** | |
Notar que cada que avanza la manecilla de los minutos también lo hace la de las horas, por eso el ángulo de horas (aH) se obtinene como: | |
aH=60 * h + .5 * m; | |
aM=6 *m; | |
O bien podemos simplificar a: | |
aH=60 *h; | |
aM=5.5*m; | |
**/ |
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
/** | |
Si tienes problemas entendiendole al problema checa este caso: | |
Entrada: | |
1 | |
3 2 2 | |
2 3 3 | |
0 | |
1 2 | |
Salida: |
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 fácil que se puede complicar por la lectura de la entrada | |
**/ | |
#include <cstdio> | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> |
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
/** | |
Notar que: "A combination of courses is considered | |
most popular | |
if no other combination has higher | |
popularity." | |
Con esto podemos preguntarnos ¿Si hay empate entre varias combinanciones? | |
Entrada: | |
10 |
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
/** | |
El punto clave del problema es verlo como un barrido | |
**/ | |
#include <cstdio> | |
#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
#include <cstdio> | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> | |
#include <stack> | |
#include <sstream> | |
#include <map> | |
#include <set> | |
using namespace std; |
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
#include <cstdio> | |
#include <iostream> | |
#include <cmath> | |
#include <algorithm> | |
#include <queue> | |
#include <stack> | |
#include <sstream> | |
#include <map> | |
#include <set> | |
using namespace std; |
OlderNewer