Ilya_konstantinov

Untitled

Oct 23rd, 2025
702
0
Never
8
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <map>
  3. #include <cassert>
  4. #include <vector>
  5. #include <set>
  6.  
  7. #define Assert(ex) assert(test_name.c_str() && (ex))
  8. #define TEST(title) test_name = (title);
  9.  
  10. #include "func.h"
  11.  
  12. char RndLetter() {
  13.     return (rand() % 26) + 'a';
  14. }
  15.  
  16. int RndInt(int l, int r) {
  17.     return (rand() % (r - l + 1)) + l;
  18. }
  19.  
  20. int main() {
  21.     int test; std::cin >> test;
  22.     std::string test_name;
  23.     srand(test);
  24.    
  25.     TEST("not serializable") {
  26.         std::set<int> not_working;
  27.         not_working.insert(1);
  28.         not_working.insert(2);
  29.         not_working.insert(2);
  30.         Assert(Serialize(not_working) == "");
  31.     }
  32.    
  33.     TEST("string serialize") {
  34.         std::string name = "Dasha";
  35.         Assert(Serialize(name) == "\"Dasha\"");
  36.     }
  37.    
  38.     std::vector<std::string> names;
  39.     TEST("random strings") {
  40.         int q = (test == 0 ? 10 : 100);
  41.         for (size_t i = 0; i < q; ++i) {
  42.             int size = (rand() % 7) + 5;
  43.             std::string name(size, '\0');
  44.             for (size_t j = 0; j < size; ++j) {
  45.                 name[j] = RndLetter();
  46.             }
  47.             Assert(Serialize(name) == "\"" + name + "\"");
  48.             names.push_back(name);
  49.         }
  50.     }
  51.    
  52.     TEST("vector check") {
  53.         std::vector<int> numbers = {1, 2, 3};
  54.         Assert(Serialize(numbers) == "[1,2,3]");
  55.        
  56.         std::vector<std::string> strings = {"a", "bb", "ccc"};
  57.         Assert(Serialize(strings) == "[\"a\",\"bb\",\"ccc\"]");
  58.        
  59.         std::vector<int> empty;
  60.         Assert(Serialize(empty) == "[]");
  61.     }
  62.    
  63.     TEST("map check") {
  64.         std::map<int, std::string> test_map = {{1, "one"}, {2, "two"}};
  65.         Assert(Serialize(test_map) == "{1:\"one\",2:\"two\"}");
  66.        
  67.         std::map<std::string, int> string_keys = {{"a", 1}, {"b", 2}};
  68.         Assert(Serialize(string_keys) == "{\"a\":1,\"b\":2}");
  69.        
  70.         std::map<int, int> empty_map;
  71.         Assert(Serialize(empty_map) == "{}");
  72.     }
  73.    
  74.     TEST("nested structures") {
  75.         std::vector<std::map<int, std::string>> nested = {
  76.             {{1, "a"}, {2, "b"}},
  77.             {{3, "c"}, {4, "d"}}
  78.         };
  79.         // std::cout << Serialize(nested) << '\n';
  80.         Assert(Serialize(nested) == "[{1:\"a\",2:\"b\"},{3:\"c\",4:\"d\"}]");
  81.        
  82.         std::map<std::string, std::vector<int>> map_with_vectors = {
  83.             {"odds", {1, 3, 5}},
  84.             {"evens", {2, 4, 6}}
  85.         };
  86.         Assert(Serialize(map_with_vectors) == "{\"evens\":[2,4,6],\"odds\":[1,3,5]}");
  87.     }
  88.    
  89.     TEST("int serialize") {
  90.         Assert(Serialize(42) == "42");
  91.         Assert(Serialize(-10) == "-10");
  92.         Assert(Serialize(0) == "0");
  93.     }
  94.    
  95.     TEST("empty collections") {
  96.         std::vector<int> empty_vec;
  97.         std::map<int, int> empty_map;
  98.         std::vector<std::map<int, int>> empty_nested;
  99.        
  100.         Assert(Serialize(empty_vec) == "[]");
  101.         Assert(Serialize(empty_map) == "{}");
  102.         Assert(Serialize(empty_nested) == "[]");
  103.     }
  104.    
  105.     TEST("single element collections") {
  106.         std::vector<int> single = {42};
  107.         std::map<int, std::string> single_map = {{1, "one"}};
  108.        
  109.         Assert(Serialize(single) == "[42]");
  110.         Assert(Serialize(single_map) == "{1:\"one\"}");
  111.     }
  112.  
  113.     std::cout << "All tests passed!" << std::endl;
  114.     return 0;
  115. }
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • brave42
    86 days
    # CSS 0.84 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Swapzone — instant swap).
  • User was banned
  • User was banned
  • Beksatan
    69 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment