#include <stdio.h>
#include <pthread.h>

const int m_rows = 40000;
const int m_cols = m_rows;
int hv = 0;
int matrix[m_rows][m_cols];


int main(void){
  printf("Populate the matrix\n");
  for(int r = 0; r < m_rows; r++){  
    for(int c = 0; c < m_cols; c++){
      matrix[r][c] = r*m_cols+c; 
    }
  }

  printf("Search matrix \n");
  for(int rr = 0; rr < m_rows; rr++){
    for(int cc = 0; cc < m_cols; cc++){
      if(matrix[rr][cc] > hv){
        hv = matrix[rr][cc];
      }
    }
  }
 
  printf("Done\n The biggest value found is  %d", hv); 
  return 0;
}


