Find a longest slice of a binary array that can be split into two parts: in the left part, 0 should be the leader; in the right part, 1 should be the leader.
  
  
  Stats:
  
    
      2588 started
    
    
      151 silver awards
    
    
      172 golden awards
    
  
  Hall of fame:
  
    
      
        
          
            
            
              
              
                1
              
             
           
          Mateusz Puczel
          
        
 
        
          Time: 15 minutes
        
       
    
      
        
          
            
            
              
              
                2
              
             
           
          Dmytro Ihnatenko
          
        
 
        
          Time: 22 minutes
        
       
    
      
        
          
            
            
              
              
                3
              
             
           
          Peng Cao
          
        
 
        
          Time: 24 minutes