版本比较
lg/CF 跳题器
正文
增加 14 行删除 14 行
1234567891029 行未改动40414243444546474828 行未改动7778798081828384858687888990919293943 行未改动98991001011021031041051061071081091101111121131141151164 行未改动12112212312412512612712812956 行未改动18618718818919019119219319419519619719819920020120220320438 行未改动2432442452462472482492502512 行未改动2542552562572582592602612622635 行未改动```cpp#include<bits/stdc++.h>#include<windows.h>#include<conio.h>using namespace std;int last_move_time = clock();void TopWindow() {HWND hWnd = GetConsoleWindow();29 行未改动void rand_problem() {system("cls");while(1) {TopWindow();setpos(0, 0);if(pos != 1) {cout << "1.CF";}else {28 行未改动continue;}if(GetAsyncKeyState(VK_RETURN) & 0x8000) {last_move_time = clock() + 100;if(pos == 1) {string s = "start https://codeforces.com/problemset/problem/";s += char('0' + rand() % 3 + 1);s += char('0' + rand() % 10);s += char('0' + rand() % 10);s += char('0' + rand() % 10);s += "/";s += char('A' + rand() % 5);system(s.c_str());system("cls");}else if(pos == 2) {string s = "start https://www.luogu.com.cn/problem/";int kind = rand() % 3;3 行未改动s += char('0' + rand() % 10);s += char('0' + rand() % 10);if(kind == 2) {s += char('A' + rand() % 5);}system(s.c_str());system("cls");}else if(pos == 3) {return;}}if(GetAsyncKeyState(VK_DOWN) & 0x8000) {pos = min(pos + 1, 3);last_move_time = clock() + 100;}if(GetAsyncKeyState(VK_UP) & 0x8000) {pos = max(pos - 1, 1);last_move_time = clock() + 100;4 行未改动system("cls");pos = 1;while(1) {TopWindow();setpos(0, 0);if(pos != 1) {cout << "1.CF";}else {56 行未改动}}if(GetAsyncKeyState(VK_DOWN) & 0x8000) {pos = min(pos + 1, 3);last_move_time = clock() + 100;}if(GetAsyncKeyState(VK_UP) & 0x8000) {pos = max(pos - 1, 1);last_move_time = clock() + 100;}}}int main() {HideCursor();TopWindow();srand(time(0));a :cout << "press the key tab to hide the cursur, and then, it's will not still run when you don't want to run it, if you need it, you can press key tab again.\n";38 行未改动continue;}if(GetAsyncKeyState(VK_RETURN) & 0x8000) {last_move_time = clock() + 300;if(pos == 1) {rand_problem();}else if(pos == 2) {choose_problem();2 行未改动return 0;}}if(GetAsyncKeyState(VK_DOWN) & 0x8000) {pos = min(pos + 1, 3);last_move_time = clock() + 100;}if(GetAsyncKeyState(VK_UP) & 0x8000) {pos = max(pos - 1, 1);last_move_time = clock() + 100;5 行未改动1234567891029 行未改动40414243444546474828 行未改动7778798081828384858687888990919293943 行未改动98991001011021031041051061071081091101111121131141151164 行未改动12112212312412512612712812956 行未改动18618718818919019119219319419519619719819920020120220320438 行未改动2432442452462472482492502512 行未改动2542552562572582592602612622635 行未改动```cpp#include<bits/stdc++.h>#include<windows.h>#include<conio.h>using namespace std;int last_move_time = clock();void TopWindow() {HWND hWnd = GetConsoleWindow();29 行未改动void rand_problem() {system("cls");while(1) {TopWindow();setpos(0, 0);if(pos != 1) {cout << "1.CF";}else {28 行未改动continue;}if(GetAsyncKeyState(VK_RETURN) & 0x8000) {last_move_time = clock() + 100;if(pos == 1) {string s = "start https://codeforces.com/problemset/problem/";s += char('0' + rand() % 3 + 1);s += char('0' + rand() % 10);s += char('0' + rand() % 10);s += char('0' + rand() % 10);s += "/";s += char('A' + rand() % 5);system(s.c_str());system("cls");}else if(pos == 2) {string s = "start https://www.luogu.com.cn/problem/";int kind = rand() % 3;3 行未改动s += char('0' + rand() % 10);s += char('0' + rand() % 10);if(kind == 2) {s += char('A' + rand() % 5);}system(s.c_str());system("cls");}else if(pos == 3) {return;}}if(GetAsyncKeyState(VK_DOWN) & 0x8000) {pos = min(pos + 1, 3);last_move_time = clock() + 100;}if(GetAsyncKeyState(VK_UP) & 0x8000) {pos = max(pos - 1, 1);last_move_time = clock() + 100;4 行未改动system("cls");pos = 1;while(1) {TopWindow();setpos(0, 0);if(pos != 1) {cout << "1.CF";}else {56 行未改动}}if(GetAsyncKeyState(VK_DOWN) & 0x8000) {pos = min(pos + 1, 3);last_move_time = clock() + 100;}if(GetAsyncKeyState(VK_UP) & 0x8000) {pos = max(pos - 1, 1);last_move_time = clock() + 100;}}}int main() {HideCursor();TopWindow();srand(time(0));a :cout << "press the key tab to hide the cursur, and then, it's will not still run when you don't want to run it, if you need it, you can press key tab again.\n";38 行未改动continue;}if(GetAsyncKeyState(VK_RETURN) & 0x8000) {last_move_time = clock() + 300;if(pos == 1) {rand_problem();}else if(pos == 2) {choose_problem();2 行未改动return 0;}}if(GetAsyncKeyState(VK_DOWN) & 0x8000) {pos = min(pos + 1, 3);last_move_time = clock() + 100;}if(GetAsyncKeyState(VK_UP) & 0x8000) {pos = max(pos - 1, 1);last_move_time = clock() + 100;5 行未改动