#include <bits/stdc++.h>
using namespace std;
int main(){
	system("ulimit -s unlimited");
	system("g++ meow.cpp -o meow -std=c++14 -Wextra -Wall -pedantic -fsanitize=address,undefined");
	system("g++ chk.cpp -o chk -std=c++14 -O3");
	do{
		system("./gen>meow.in");
	}while(!system("time -p ./meow")&&!system("./chk"));
	return 0;
}