#include <iostream> 
#include <queue> 
 
struct fecha { 
   int dia, mes, año; 
}; 
 
bool operator<(fecha a, fecha b) { 
   if (a.año != b.año) { 
      return a.año < b.año; 
   } else if (a.mes != b.mes) { 
      return a.mes < b.mes; 
   } else { 
      return a.dia < b.dia; 
   } 
} 
 
int main( ) { 
   std::priority_queue<fecha> cp; 
   cp.push({ 10,  1, 2000 }); 
   cp.push({  2,  5, 2010 }); 
   cp.push({ 31, 12, 1999 }); 
   cp.push({  1, 10, 2000 }); 
 
   while (cp.size( ) != 0) { 
      fecha f = cp.top( ); 
      std::cout << f.dia << "/" << f.mes << "/" << f.año << "\n"; 
      cp.pop( ); 
   } 
} 
