void arr_alloc_input(int** arr_addres, int r,int c){
	 	//allocation
	    arr_alloc(arr_addres,r,c);
	    //input
	    arr_input(*arr_addres,r,c);

}
Exemplo n.º 2
0
int main(void) {
  int relation[NUM][NUM] = {{0}};
  int table[NUM][NUM];
  int n;
  int i, j, k;
  int time;
  clock_t start, end;

  scanf("%d", &n);
  arr_input(relation, n);

  relation_own(relation, n);


  for ( i = 0; i < n; i++ ) {
    /* for ( k = 0; k < NUM; k++ ) { */
    /*   for ( j = 0; j < NUM; j++ ) { */
    /*     table[k][j] = 0; */
    /*   } */
    /* } */

    time = 100000;
    start = clock();
    while (time--) {
      warshall(relation, table, i+1);
    }
    end = clock();
    printf("%d : %f\n", i+1, (0.0+end-start)/CLOCKS_PER_SEC);
  }

  arr_output(table, n);

  return 0;
}