@.         
                @@         
          :     :@         
          .@     @         
           :@    @+        
            +@   @@        
        `@@@;'@` +@        
       '@@'+@@@@; @        
               @@@@'       
                +@@@.      
                 `@@@+     
       :@@:@.     :@@@     
        .@@@@:     @       
          @#@@@    @:      
          .@ '@@@  @@      
           ;@  #@@@`.      
            @+  @@@@@      
             @   +@@@@:    
        @@@@@@.    +@@@+   
        @@.@@@        .    
         @,                
         `@                
          +@               
        #@@;               
       :@:@@@              
       .@ #+#@             
       `@  @ @+            
        @'  @ @            
        :@  :@@            
         @@  #;            
          @:               
           @:              
                .          
                @+         
        ;:      `@         
       +@@@      ::        
        #@@@'     @        
         :@@@@    :;       
          `@@@@:   @       
           .@@@@#  @`      
             @;@@@`+@      
              @ @@@@@      
               @ '@@#      
                @  ;       
                 @         
         @@@:    :@        
        @@@@@@:   ##       
        +  :@@@@.  @`      
         @   :@@@@ ;@      
         +@    ;@@@@@      
          @#     #@@@      
           @       +.      
        @@@@@              
       @@@@@@+             
       @   ;@@             
       #,   ;@+            
        @`   @@            
        :@# @+@            
         .@@@:`            
                           
           :               
         . #;              
        @@@@@              
       @.`#@@@             
       @    @@.            
       :#    @@            
        @#   @@            
         @@@@##            
          @@@              
                           
                           
                           
       .@@@@@#`            
       @+:;;@@@@:          
       ;@ @ @@ @@@`        
        @@@@ @@` @@#       
         ;@@  :@; :@@`     
          @+    @@  @@+    
          #@     `@+ .@#   
           @:      .@#:@;  
            @         :@   
                     
 
 

Popular Posts

Taking inputs, yes you must be knowing them already but here is a little hack that i really liked. Usually in competitive coding the input format is predefined and then there are time when you have to take input of multiple value in the same line for example.

1 2 3 4 5 6 6 7 9

if this is to be stored in an array of type int but the user enters all the values in single line then this can be done.
if we want to enter 10 number in the array, then :

int x[10];
for(int i=0;i<10;i++)
     cin>>x[i];

Now when prompted for input enter all the values in one line, thats it. 
a second solution is using the istringstream, if you already have a string like "1 2 3" then this can be done.

int n;
string s="1 2 3 4 5 6 7 8 9";
int a[9];
int i=0;
istringstream st(s);
while(st>>n){
a[i]=n;
i++;
}
// and a will have iall the element in specified position.

0 comments