Skip to content

Instantly share code, notes, and snippets.

@whileD
Created August 15, 2017 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whileD/73b3b62df3ef9634f5cfcb1ec3bda59a to your computer and use it in GitHub Desktop.
Save whileD/73b3b62df3ef9634f5cfcb1ec3bda59a to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
#include <random>
using namespace std;
int main(){
random_device rnd;
mt19937 mt(rnd());
uniform_int_distribution<> rand(0,3);
vector<string> oppai = {"お", "っ", "ぱ","い"};
vector<string> tmp;
while(true){
tmp.clear();
for(int i=0; i<oppai.size(); i++)
tmp.push_back(oppai[rand(mt)]);
for(auto s : tmp)
cout << s;
cout << endl;
for(int i=0; i<oppai.size(); i++){
if(oppai[i] != tmp[i]) break;
else if(i == 3) return 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment