Guest User

Untitled

a guest
Dec 10th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. #define TEST 200
  3. using namespace std;
  4.  
  5. const string folder_name = "TROPHIES";
  6.  
  7. ///program's variable
  8. string input_path = folder_name + "/input";
  9. string file_path;
  10. int t;
  11. string s;
  12. unordered_map<int, char> cnv;
  13. ///end
  14.  
  15. long long Rand(long long l, long long h){
  16. return l + rand() % (h - l + 1);
  17. }
  18.  
  19. int main(){
  20. srand(time(NULL));
  21. system(string("rm -r -f " + folder_name).c_str());
  22. system(string("mkdir -p " + folder_name).c_str());
  23. system(string("mkdir -p " + input_path).c_str());
  24. cnv[0] = 'G', cnv[1] = 'S';
  25. ///input starts here
  26. for(int test = 0; test <= TEST; ++test){
  27. ofstream inp(string(input_path + "/" + "input" + to_string(test) + ".txt").c_str());
  28. s.clear();
  29. t = Rand(1, 1e5);
  30. while(--t >= 0) s += cnv[Rand(1, 100) % 2];
  31. }
  32. ///end
  33. return 0;
  34. }
Add Comment
Please, Sign In to add comment