#include <iostream>
#include <vector>
#include <cstdlib>
#include <string>
#include <Windows.h>
#include "CHEUCLE - HUYNH - ODIER - WAKIM.h"

using namespace std;



int main()
{
    int a=3;
    double temp;
    string nom = "3x3 - 2.txt";
    vector < vector <unsigned> > sudoku = lecture_sudoku(nom, a);
    vector < vector <unsigned> > sudoku_solution;

    temp = GetTickCount();
    sudoku_solution = Super_resolution_propagation_contraintes4(sudoku, a);
    temp = GetTickCount()-temp,
    cout << "Exécution en : " << temp << endl;
    affichage_sudoku(sudoku_solution);

    ecrire_fichier(sudoku, sudoku_solution, GetChangement(), GetRetour(), temp);
    ResetGlobal();
    /*
    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "3x3 - 2.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "3x3 - 3.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "sudoku1.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "sudoku2.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "sudoku3.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "sudoku4.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "sudoku5.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    nom = "sudoku6.txt";

    cout << "Fichier : " << nom << endl;
    sudoku = lecture_sudoku(nom, a);
    temp = GetTickCount();
    Super_resolution_propagation_contraintes10(sudoku, a);
    cout << "Exécution en : " << GetTickCount()-temp << endl;
    ResetGlobal();

    //system("pause");

    for(a = 2 ; a<7 ; a++)
    {
        cout << "a : " << a << endl;
        sudoku = creation_sudoku_vide(a);
        temp = GetTickCount();
        Super_resolution_propagation_contraintes10(sudoku, a);
        cout << "Exécution en : " << GetTickCount()-temp << endl;
        ResetGlobal();
    }*/

    //system("pause");

    return 0;
}
