fork download
  1. #include <iostream>
  2. #include <unordered_map>
  3. #include <vector>
  4. #include <tuple>
  5. #include <cstdint>
  6.  
  7. typedef std::tuple<std::uint32_t, std::uint32_t> Pair;
  8. typedef std::vector<Pair> Data;
  9. typedef std::unordered_map<std::uint_fast64_t, Data> Hash;
  10.  
  11. int main() {
  12.  
  13. Hash H;
  14. std::size_t L = 21073;
  15. //std::size_t L = (1ull<<15)-1;
  16. for (std::uint_fast32_t i = 1; i < L; i++) {
  17. for (std::uint_fast32_t j = 1; j < L; j++) {
  18. std::uint_fast64_t Idx = (i * i * i) - (j * j * j);
  19. H[Idx].push_back({ i,j });
  20. }
  21. }
  22.  
  23. return true;
  24.  
  25. }
Time limit exceeded #stdin #stdout 5s 897024KB
stdin
Standard input is empty
stdout
Standard output is empty