Tools made in assistance of the Metacall Project
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

20 行
447 B

  1. #include "lfhmap.hpp"
  2. #include <string>
  3. #include <iostream>
  4. int main() {
  5. size_t v = 13;
  6. auto map = new mct20::lfhmap<size_t, std::string, 80000>();
  7. for(int a = 0; a < 250000; a++) {
  8. //if(a % 1000 == 0) std::cout << a << std::endl;
  9. map->set(v, std::to_string(v));
  10. if(auto acc = map->get(v); acc) {
  11. const std::string& t = acc.value();
  12. if(t != std::to_string(v))
  13. return 1;
  14. } else
  15. return 1;
  16. v*=121;
  17. v+=17;
  18. }
  19. return 0;
  20. }