Created
August 15, 2017 16:58
-
-
Save whileD/73b3b62df3ef9634f5cfcb1ec3bda59a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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