SHARE
TWEET

Untitled

a guest Sep 17th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4. const int D=m*n;
  5. void Tim(int i)
  6. {
  7.     for (int i=0;i<n;i++)
  8.         for (int j=0;j<m;j++)
  9.         {
  10.             if(kt[i][j]==true)
  11.             {
  12.                 kt[i][j]=false;
  13.                 X[i]=a[i][j];
  14.                 S+=C[X[i-1]][j];
  15.                 if (i==n && j==m)
  16.                 {
  17.                     if (S<Mincost)
  18.                     {
  19.                         Mincost=S;
  20.                         for (int i=0;i<X.size();i++)
  21.                             Bestway[i]=X[i];
  22.                     }
  23.                 }
  24.                 else
  25.                
  26.             }
  27.         }
  28.        
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top