ens-ulm-1-2015

google hashcode 2015 source for team ens-ulm-1
git clone https://a3nm.net/git/ens-ulm-1-2015/
Log | Files | Refs

commit fe6865bd9af679fe180d21152dac4887791b0778
parent 4de2d47fd950d994bc853c55284e2890610037af
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Fri, 27 Mar 2015 21:02:24 +0100

Merge branch 'master' of github.com:a3nm/ens-ulm-1

Diffstat:
testing/test.cpp | 27+++++++++++++++++++++++++++
testing/test.cpp~ | 31+++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/testing/test.cpp b/testing/test.cpp @@ -0,0 +1,27 @@ +//avant +bool compare_vect(vector<int> x, vector<int> y){ + if(x.size()==y.size()){ + return size[x[0]]<size[y[0]]; + } else + return x.size()<y.size();} + + + + + +//pendant +sort(G.begin(),G.end(),compare_vect); + +vector<bool> taken(G.size(),false); +vector<int> truc; + +vector<bool> choix; +for(int i=0;i<G.size();i++){ + if(taken[G[i][0]])continue; + truc.push_back(G[i][0]); + for(j in G[i]){ + taken[j]=true; + } +} + + diff --git a/testing/test.cpp~ b/testing/test.cpp~ @@ -0,0 +1,31 @@ +//avant +bool compare_vect(vector<int> x, vector<int> y){ + if(x.size()==y.size()){ + return size[x[0]]<size[y[0]]; + } else + return x.size()<y.size();} + + + + + +//pendant +sort(G.begin(),G.end(),compare_vect); + +vector<bool> taken(G.size(),false); +vector<int> truc; + +vector<bool> choix; +for(int i=0;i<G.size();i++){ + if(taken[G[i][0]])continue; + truc.push_back(G[i][0]); + for(j in G[i]){ + taken[j]=true; + } +} + + + + +return 0; +}