计算程序运行时间

#include<stdlib.h>
#include<stdio.h>
#include<time.h>
using namespace std;
int main()
{
    clock_t start, finish;  
    start = clock();  
    //
    //中间程序
    //......
    finish = clock(); 
    cout<<(finish-start)/1000<<endl;
    
    return 0;
    
} 
原文地址:https://www.cnblogs.com/noip/p/3790150.html