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

test.cpp~ (442B)


      1 //avant
      2 bool compare_vect(vector<int> x, vector<int> y){
      3     if(x.size()==y.size()){ 
      4         return size[x[0]]<size[y[0]]; 
      5     } else 
      6     return x.size()<y.size();}
      7 
      8 
      9 
     10 
     11 
     12 //pendant
     13 sort(G.begin(),G.end(),compare_vect);
     14 
     15 vector<bool> taken(G.size(),false);
     16 vector<int> truc;
     17 
     18 vector<bool> choix;
     19 for(int i=0;i<G.size();i++){
     20   if(taken[G[i][0]])continue;
     21   truc.push_back(G[i][0]);
     22   for(j in G[i]){
     23     taken[j]=true;
     24   }
     25 }
     26 
     27 
     28 
     29 
     30 return 0;
     31 }