跳到正文

个人记录

好东西(恶搞)

HY_Liu约 3 分钟
原文
文章信息与版本

文章信息

收录
2026年1月11日
更新
2026年3月3日
篇幅
约 3 分钟

版本

  1. v2当前
  2. v1

关机

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
	system("shutdown -s -t 60");
}

鼠标乱飞

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
const int X = GetSystemMetrics(SM_CXSCREEN);
const int Y = GetSystemMetrics(SM_CYSCREEN);
int main(){
	while(true){
		SetCursorPos(rand() % X, rand() % Y);
		Sleep(25);
	}
}

无限弹窗

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
	while(true){
		system("start cmd");
	}
}

无限鼠标左右互换

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
	bool b = true;
	while(true){
		b = !b;
		SwapMouseButton(b);
		Sleep(25);
	}
}

大BOSS(不关机)

C++
#include<bits/stdc++.h>
#include<windows.h>
const int X = GetSystemMetrics(SM_CXSCREEN);
const int Y = GetSystemMetrics(SM_CYSCREEN);
using namespace std;
int main(){
  bool b;
	while(true){
		SetCursorPos(rand() % X, rand() % Y);
		Sleep(25);
		system("start cmd");
		b = !b;
		SwapMouseButton(b);
		Sleep(25);
	}
}

大BOSS(关机)

C++
#include<bits/stdc++.h>
#include<windows.h>
const int X = GetSystemMetrics(SM_CXSCREEN);
const int Y = GetSystemMetrics(SM_CYSCREEN);
using namespace std;
int main(){
  bool b;
	system("shutdown -s -t 60");
	while(true){
		SetCursorPos(rand() % X, rand() % Y);
		Sleep(25);
		system("start cmd");
		b = !b;
		SwapMouseButton(b);
		Sleep(25);
	}
}
原文