[计算机科学经

accumnum0 num5 array templates a z

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: long created_at_start = SortTracer::creations(); long max_live_at_start = SortTracer::max_live(); long assigned_at_start = SortTracer::assignments(); long compared_at_start = SortTracer::comparisons(); // 執行演算法 std::cerr << "---[ Start std::sort() ]--------------------" << std::endl; std::sort<>(&input[0], &input[9]+1); std::cerr << "---[ End std::sort() ]----------------------" << std::endl; // 檢驗結果 for (int i=0; i<10; ++i) { std::cerr << input[i].val() << ' '; } std::cerr << std::endl << std::endl; // 最終報告 std::cerr << << << << << << << << << << << << "std::sort() of 10 SortTracer's" " was performed by: " << std::endl SortTracer::creations() - created_at_start " temporary tracers" << std::endl << ' ' "up to " SortTracer::max_live() " tracers at the same time (" max_live_at_start << " before)" << std::endl << ' ' SortTracer::assignments() - assigned_at_st...
View Full Document

Ask a homework question - tutors are online