Advertisement
Guest User

anti-hash-test-gen.cpp

a guest
Jul 7th, 2018
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string>
  3.  
  4. int main() {
  5.     auto file = fopen("anti-hash-test.txt", "wt");
  6.     std::string s = "a", t = "b";
  7.     while (2 * (int)s.size() < (int)2e5) {
  8.         int n = s.size();
  9.         for (int i = 0; i < n; ++i) {
  10.             s.push_back('b' - s[i] + 'a');
  11.             t.push_back('b' - t[i] + 'a');
  12.         }
  13.     }
  14.     fprintf(file, "%d\n", (int)s.size());
  15.     fprintf(file, "%s\n", s.c_str());
  16.     fprintf(file, "%s\n", t.c_str());
  17.     fclose(file);
  18.     printf("Generated!\n");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement