Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #include "bits/stdc++.h"
  2.  
  3. using namespace std;
  4.  
  5. // Definition for a binary tree node.
  6. struct TreeNode {
  7. int val;
  8. TreeNode *left;
  9. TreeNode *right;
  10. TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
  11. };
  12.  
  13. class Solution {
  14. private:
  15. int n = 10;
  16. int mod = 10000;
  17. vector<string> input;
  18. public:
  19. void generate() {
  20. random_device rd;
  21. mt19937 mt(rd());
  22. uniform_int_distribution<int> dist(0, mod);
  23. for (int terminal = 0; terminal < n; ++terminal) {
  24. vector<string> curr = {
  25. to_string(dist(mt) + 1),
  26. to_string(dist(mt) + 1),
  27. to_string(dist(mt) + 1),
  28. };
  29. for (auto &str : curr ) {
  30. while(str.length() < 4) {
  31. str = "0" + str;
  32. }
  33. }
  34. input.emplace_back(curr[0] + "d*" + curr[1] + "e*" + curr[2] + "l");
  35. }
  36. for (auto str : input) {
  37. cout << str << endl;
  38. }
  39. }
  40. };
  41.  
  42. int main() {
  43. ios::sync_with_stdio(false);
  44.  
  45. Solution solution;
  46. solution.generate();
  47.  
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement