Skip to content

Recopilación de problemas resueltos de la web aceptaelreto.com

License

Notifications You must be signed in to change notification settings

javigom/AceptaElReto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Acepta el Reto

Recopilación de problemas resueltos de la web aceptaelreto.com

Realizado por Javier Gómez Moraleda.

MIT License.

PLANTILLAS PARA LOS EJERCICIOS

NÚMERO DE CASOS

#include <iostream>

using namespace std;

void casoDePrueba() {

}

int main() {

	unsigned int numCasos, i;
	cin >> numCasos;

	for (int i = 0; i < numCasos; i++) {
		casoDePrueba();
	}

	return 0;
}

MARCA FINAL

#include <iostream> 
using namespace std;

bool casoDePrueba() {
	
	//leercasodeprueba
	if(es el caso que marca el final)
		return false;
	
	else{
		//CÓDIGO PRINCIPAL AQUÍ 
		return true;
	}
} //caso De Prueba 

int main() { 
	
	while(casoDePrueba()){
	}
	return 0;
} 

FIN DE LA ENTRADA

#include <iostream>
using namespace std;

bool casoDePrueba() {

	//leer caso de prueba
	if(!cin)
		return false;

	else{
		//CÓDIGO PRINCIPAL AQUÍ
		return true;
	}
} //caso De Prueba 

int main() {

	while(casoDePrueba()) {

	}

	return 0;
}

E/S PARA FICHERO DE DATOS

#include <fstream>

int main() {
#ifndef DOMJUDGE
	std::ifstream in("datos.txt");
	auto cinbuf = std::cin.rdbuf(in.rdbuf());
#endif

	While(resuelveCaso()){
	}

#ifndef DOMJUDGE 
	std::cin.rdbuf(cinbuf);
#endif
	return 0;
}

About

Recopilación de problemas resueltos de la web aceptaelreto.com

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages