Cod sursa(job #1145278)

Utilizator denis_tdrdenis tdr denis_tdr Data 18 martie 2014 08:20:51
Problema Ciclu Eulerian Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.5 kb
#include<iostream>
#include <fstream>
#include <list>
using namespace std;

list<int> V[100000];
bool grad[100000];
int n, m, x, y;

void read(){
    ifstream f("ciclueuler.in");
    f>>n>>m;
    for(int i=0; i<m; i++)
        f>>x>>y,
        V[y].push_back(x),
        V[x].push_back(y),
        grad[y]=!grad[y],
        grad[x]=!grad[x];
}
int main(){
    for(int i=0;1<n;i++)
        if(!grad[i])
        {
            ofstream g("ciclueuler.in"); g<<-1;
        }

    return 0;
}