Sunday, 25 December 2016

Interesting Segment Tree Problem

Link To Problem


Node Properties {

     no. of 4 in range (n_4)
     no. of 7 in range  (n_7)
     longest increasing subsequence length (n_i)
     longest decreasing subsequence length (n_d)

}


Node Updates {

   swap(n_4,n_7)
   swap(n_i,n_d)  
   // Due to the reason that i.e 44747  LIS = 4   LDS=2
       After Swap Operation      77474  LDS=2    LDS=4
}

Merge Node Updates{

     n4[parent]=n4[left]+n4[right]
     n7[parent]=n7[left]+n7[right]
     n_i=max(n_i+n7,n4+n_i,n_4+n_7)

}

Query{
   return n_i
}
    

Friday, 5 August 2016

GitHub : Setting Up and Connecting to Remote Directory

Github : Link To Dowload

1. Open the Git Shell (or Windows Powershell) 

2. Get into Directory you want to upload as your project
      ex.: C:/... or usr/...
3. CommandLine : git init
                  (intialize the git on directory)
                 git add . 
                  (add every item of your dir to server)
                 git commit -m "Your first message"
                  (commits the changes adopted) 
       
4. Create a new repository in github.com with all default settings.

5. At the top you'll see 'Quick Setup', make sure the 'HTTPS' button is selected and copy the address—this is the address of your repository on GitHub's servers.  

6. CommandLine : git remote add origin <URL FROM GITHUB>
                 
                 git push origin master


For Configuring Shell :
 git config --global user.name <YOUR USERNAME ON GITHUB>

For Proxy : 
 git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080




 

Tuesday, 12 January 2016

Theme Script for CodeBlocks Editor

Script fileLink

Step 1 :  Search For Application Data folder (for windows :                         C:\Users\gs\AppData\Roaming\CodeBlocks )
          AppData Folder may be hidden

Step 2 :  Open file "default.conf" and search for "<colour_sets>"

Step 3 :  Remove the part written in <colour_sets>...</colour_sets>
          and substitute the part written in it with part given in                 the link above.
          All These activities must be done with CodeBlocks IDE                     closed.

Step 4 :  Go to Editor Settings in IDE to set your custom theme.