def brute_force_flops(D, N):
    """
    Given the data dimension and the number of results to rank, compute
    the number of flops for brute force exact distance computation.
    """
    return N * (3 * D)