title: What is the meaning of the line - " vector<long long> distance(n, std::numeric_limits<long long>::max()); "?
body: <p>Actually I have to find shortest paths from the source vertex to all the other vertices. For this I have been provided with the code template given below. I want to implement " <code>Bellman–Ford algorithm</code> ".</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;limits&gt;
  #include &lt;vector&gt;
  #include &lt;queue&gt;
  
  using std::vector;
  using std::queue;
  using std::pair;
  using std::priority_queue;
  
  void shortest_paths(vector&lt;vector&lt;int&gt; &gt; &amp;adj, vector&lt;vector&lt;int&gt; &gt; &amp;cost, int s, vector&lt;long long&gt; &amp;distance, vector&lt;int&gt; &amp;reachable, vector&lt;int&gt; &amp;shortest) {
      //write your code here
  }
  
  int main() {
      int n, m, s;
      std::cin &gt;&gt; n &gt;&gt; m;
      vector&lt;vector&lt;int&gt; &gt; adj(n, vector&lt;int&gt;());
      vector&lt;vector&lt;int&gt; &gt; cost(n, vector&lt;int&gt;());
      for (int i = 0; i &lt; m; i++) {
          int x, y, w;
          std::cin &gt;&gt; x &gt;&gt; y &gt;&gt; w;
          adj[x - 1].push_back(y - 1);
          cost[x - 1].push_back(w);
      }
      std::cin &gt;&gt; s;
      s--;
      vector&lt;long long&gt; distance(n, std::numeric_limits&lt;long long&gt;::max());
      vector&lt;int&gt; reachable(n, 0);
      vector&lt;int&gt; shortest(n, 1);
      shortest_paths(adj, cost, s, distance, reachable, shortest);
      for (int i = 0; i &lt; n; i++) {
          if (!reachable[i]) {
              std::cout &lt;&lt; "*\n";
          } else if (!shortest[i]) {
              std::cout &lt;&lt; "-\n";
          } else {
              std::cout &lt;&lt; distance[i] &lt;&lt; "\n";
          }
      }
  }
  
  </code></pre>
  
  <p>I am unable to understand the meaning of line " <code>vector&lt;long long&gt; distance(n, std::numeric_limits&lt;long long&gt;::max());</code> ". Also what is - " <code>std::numeric_limits&lt;long long&gt;::max()</code> " for ?. Can anyone explain it please.</p>