⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 本程序实现了基数排序
💻 CPP
字号:
//main.cpp
#include <cstdlib>
#include <iostream>
#include "Radixsort.h"
#include "Timer.h"

using namespace std;
int const LEN = 999999;
int main(int argc, char *argv[])
{
  bool f = false;
  Node* list = 0;
  int i = 0;
  for(; i <LEN; ++i)
    list = push_front(list, rand());
  i = size(list);
  
  Timer timer;  
  timer.start();
  
  list = radix_sort10(list, 0);
  
  f = sorted(list);
  i = size(list);
  
  timer.stop();
  double clock=timer.seconds();
  timer.reset();
  
  cout<<"程序运行时间为:"<<clock<<'s'<<endl;
  
  system("PAUSE");
  return EXIT_SUCCESS;
}
//~main.cpp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -