#include<stdio.h>
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
setbuf(stdout, NULL);
#include <time.h>
clock_t start = clock();
clock_t finish = clock();
printf("%fms\n", (double)(finish - start) / CLOCKS_PER_SEC * 1000);
void mstrcpy(char *dst,const char *src)
{
while ((*dst++=*src++)!='\0');
}
void mstrncpy(char *dest, const char *src, int len)
{
for (int i = 0; i<len; i++)
{
dest[i] = src[i];
}
dest[len] = '\0';
}
int mstrcmp(char *s1, char *s2){
while(*s1 == *s2 && *s1 != '\0') {
s1++;
s2++;
}
return *s1 - *s2;
}
int mstrncmp(const char *a, const char *b, int len)
{
for (int i = 0; i < len; i++)
{
if (a[i] != b[i])
return a[i] - b[i];
}
return 0;
}
int mstrlen(const char *a)
{
int len = 0;
while (a[len] != '\0')
len++;
return len;
}