Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanRomo-dev authored Nov 11, 2022
1 parent 012b8ba commit 54b8a37
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions Source.cpp
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;
}

0 comments on commit 54b8a37

Please sign in to comment.