跳到正文

个人记录

随机跳题

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

文章信息

发布
2023年5月8日
收录
2025年12月12日
更新
2026年10月21日
篇幅
约 3 分钟
获赞
4

版本

  1. v1当前

由于B题库题目过于**(评级过分,至少本人认为),所以一下只供给除B题库外的所有题库的题。

C++
#include <bits/stdc++.h>
using namespace std;
string s = "start https://www.luogu.com.cn/problem/";
int x;
void solve(){
	int res = rand() % 5;
	if(res == 0){
		string p = s + "P" + to_string(rand() % 9000 + 1000);
		system(p.c_str());
	}
	if(res == 1){
		string p = s + "CF" + to_string(rand() % 2000) + (char)(rand() % 5 + 'A');
		system(p.c_str());
	}
	if(res == 2){
		string p = s + "AT_abc" + to_string(rand() % 300) + "_" + (char)(rand() % 5 + 'A');
		system(p.c_str());
	}
	if(res == 3){
		string p = s + "SP" + to_string(rand() % 30000);
		system(p.c_str());
	}
	if(res == 4){
		string p = s + "UVA" + to_string(rand() % 10000);
		system(p.c_str());
	}
}
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0) , cout.tie(0);
	srand(time(0));
	cout << "请输入随机跳转的数量";
	for(cin >> x; x--; solve());
	return 0;
}

不含SP和UVA。

C++
#include <bits/stdc++.h>
using namespace std;
string s = "start https://www.luogu.com.cn/problem/";
int x;
void solve(){
	int res = rand() % 3;
	if(res == 0){
		string p = s + "P" + to_string(rand() % 9000 + 1000);
		system(p.c_str());
	}
	if(res == 1){
		string p = s + "CF" + to_string(rand() % 2000) + (char)(rand() % 5 + 'A');
		system(p.c_str());
	}
	if(res == 2){
		string p = s + "AT_abc" + to_string(rand() % 300) + "_" + (char)(rand() % 5 + 'A');
		system(p.c_str());
	}
}
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0) , cout.tie(0);
	srand(time(0));
	cout << "请输入随机跳转的数量";
	for(cin >> x; x--; solve());
	return 0;
}
原文