#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <ctime>
#include <windows.h>
const int n = 1024*1024*500;
using namespace std;
class timer
{
long long t;
public:
timer()
{
t = clock();
}
~timer()
{
cout << clock() - t << endl;
}
};
size_t strlen1(const char *str)
{
register int length = 0;
while (*str++)
++length;
return (length …