首页 > 其他 > 详细

随机名字生成器

时间:2020-09-30 09:24:29      阅读:126      评论:0      收藏:0      [点我收藏+]

比直接随高明的随机方式

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fast_IO ios::sync_with_stdio(false);
#define DEBUG fprintf(stderr,"Running on Line %d in Function %s\n",__LINE__,__FUNCTION__)
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define fir first
#define sec second
#define mod 998244353
#define ll long long
#define inf 0x3f3f3f3f
#define INF 0x3f3f3f3f3f3f3f3f
inline int read()
{
	char ch=getchar(); int nega=1; while(!isdigit(ch)) {if(ch==‘-‘) nega=-1; ch=getchar();}
	int ans=0; while(isdigit(ch)) {ans=ans*10+ch-48;ch=getchar();}
	if(nega==-1) return -ans;
	return ans;
}
typedef pair<int,int> pii;
void print(vector<int> x){for(int i=0;i<(int)x.size();i++) printf("%d%c",x[i]," \n"[i==(int)x.size()-1]);}
char get1(){return "aeiou"[rnd()%5];}
char get2(){return rnd()%26+97;}
signed main()
{
	for(int _=1;_<=1000;_++)
	{
		for(int i=1;i<=7;i++)
		{
			char ch=rnd()%5<=1?get1():get2();
			printf("%c",ch-(i==1)*32);
		}
		cout<<"\n";
	}
	return 0;
}

随机名字生成器

原文:https://www.cnblogs.com/wasa855/p/13752774.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!