Preview:
   for(int k=0;k<26;k++){
        for(int j=0;j<26;j++){
            for(int i=0;i<26;i++){
                if(W[i][k]!=3000 && W[k][j]!=3000)
                W[i][j]=min(W[i][j],W[i][k]+W[k][j]);
            }
        }
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter