import: #include <iostream> #include <stdlib.h> #include <time.h> #include <algorithm> 具体代码如下: #include <iostream>