-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
012b8ba
commit 54b8a37
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Nombre del alumno Juan Romo Iribarren | ||
// Usuario del Juez F59 | ||
|
||
#include <iostream> | ||
#include <iomanip> | ||
#include <fstream> | ||
#include <vector> | ||
using namespace std; | ||
|
||
struct tSolucion{ | ||
int maximo; | ||
int minimo; | ||
bool | ||
}; | ||
|
||
// función que resuelve el problema | ||
TipoSolucion resolver(TipoDatos datos) { | ||
|
||
|
||
} | ||
|
||
// Resuelve un caso de prueba, leyendo de la entrada la | ||
// configuración, y escribiendo la respuesta | ||
bool resuelveCaso() { | ||
// leer los datos de la entrada | ||
vector<int> v; | ||
int aux; | ||
|
||
cin >> aux; | ||
if (aux == 0) | ||
return false; | ||
|
||
while (aux != 0) { | ||
v.push_back(aux); | ||
cin >> aux; | ||
} | ||
|
||
TipoSolucion sol = resolver(datos); | ||
|
||
// escribir sol | ||
|
||
return true; | ||
|
||
} | ||
|
||
int main() { | ||
// Para la entrada por fichero. | ||
// Comentar para acepta el reto | ||
#ifndef DOMJUDGE | ||
std::ifstream in("datos.txt"); | ||
auto cinbuf = std::cin.rdbuf(in.rdbuf()); //save old buf and redirect std::cin to casos.txt | ||
#endif | ||
|
||
|
||
while (resuelveCaso()) | ||
; | ||
|
||
|
||
// Para restablecer entrada. Comentar para acepta el reto | ||
#ifndef DOMJUDGE // para dejar todo como estaba al principio | ||
std::cin.rdbuf(cinbuf); | ||
system("PAUSE"); | ||
#endif | ||
|
||
return 0; | ||
} |