Int Int Int Int Int Int For: #Include #Include #Include
Int Int Int Int Int Int For: #Include #Include #Include
#include<limits>
#include <windows.h>
int main(){
int A[] = {3,9,7,8,2,6,5,10,1,7,6,4};
35 int M = 3;
int N = sizeof(A)/sizeof(A[0]);
int G[N];
LARGE_INTEGER nFreq;
LARGE_INTEGER nBeginTime;
40 LARGE_INTEGER nEndTime;
QueryPerformanceFrequency(&nFreq); // get the frequency of the counter
double t;
QueryPerformanceCounter(&nBeginTime);
Max_min_Grouping(A, N, M, G);
QueryPerformanceCounter(&nEndTime);
5 t = (double)(nEndTime.QuadPart-nBeginTime.QuadPart)/(double)nFreq.QuadPart;
for (int i=0; i<M; i++){
std::cout << G[i] << '\t';
}
std::cout << std::endl;
10 std::cout << "Running time: " << t << " s" << std::endl;
}