def tc_rmq_segment_tree(): n = 10*(10**6) seq = [n/10*i for i in range(1, 11)] cmd = "./rmq --rmq segmenttree --size 1000000 --q-num $x" test_utils.run_seq_time("Testing run time:", seq, cmd, "out_time_segmenttree", 1)
def tc01_nlogn(): n = 10**8 seq = [n / 10 * i for i in range(1, 11)] cmd = "./lis --lis nlogn --size $x" test_utils.run_seq_time("Testing run time:", seq, cmd, "out_time_nlogn", 5) test_utils.run_seq_memo("Testing memory usage:", seq, cmd, "out_memo_nlogn", 1, "mb")
def tc02_dp(): n = 10**5 seq = [n / 10 * i for i in range(1, 11)] cmd = "./lis --lis dp --size $x" test_utils.run_seq_time("Testing run time:", seq, cmd, "out_time_dp", 1) test_utils.run_seq_memo("Testing memory usage:", seq, cmd, "out_memo_dp", 1, "kb")
def tc01_nlogn(): n = 10**8 seq = [n/10*i for i in range(1, 11)] cmd = "./lis --lis nlogn --size $x" test_utils.run_seq_time("Testing run time:", seq, cmd, "out_time_nlogn", 5) test_utils.run_seq_memo("Testing memory usage:", seq, cmd, "out_memo_nlogn", 1, "mb")
def tc02_dp(): n = 10**5 seq = [n/10*i for i in range(1, 11)] cmd = "./lis --lis dp --size $x" test_utils.run_seq_time("Testing run time:", seq, cmd, "out_time_dp", 1) test_utils.run_seq_memo("Testing memory usage:", seq, cmd, "out_memo_dp", 1, "kb")
def tc_pre_sparse_table(): n = 30*(10**6) seq = [n/10*i for i in range(1, 11)] cmd = "./rmq --rmq sparsetable --size $x --q-num 0 " test_utils.run_seq_time("Testing run time:", seq, cmd, "out_time_sparsetable_pre", 1) test_utils.run_seq_memo("Testing memory usage:", seq, cmd, "out_memo_sparsetable_pre", 1, "mb")