OK, I will try to improve my solution. However, there is a set of fixed tests with a vector of 10 millions numbers. The fourth test has no solution pair and my current solution does not time out and return an empty vector.

I moved the includes and using namespace in the appropriate sections. I also added random tests (although the other approved translations do not have any). Let me know if this is OK.

I think another option is to reduce the size of the arguments (between 1e+5 and 1e+6). Then the returned result will fit into the C++ unsigned-long-int data type. The drawback is that it is possible to pass the random tests with a loop and the difficulty of the kata would be mitigated.

I checked the maximum value of an unsigned long long int and in fact it is the same as an unsigned long int (1.84e+19). With w = l = h = 1e+6 I get a result of 2.33e+18 which fits into the unsigned long int type. However if I reduce the max value of the arguments to 1e+6 then I can pass the random tests with a loop and that mitigates the difficulty of the kata. Is there a way to increase the size of the return data type?

C++ translation kumited. Feel free to review and approve it when you get some time.

I'm stuck on this kata for a while. Can anyone give me a small hint?

C++ translation kumited.

OK, I will try to improve my solution. However, there is a set of fixed tests with a vector of 10 millions numbers. The fourth test has no solution pair and my current solution does not time out and return an empty vector.

I moved the includes and using namespace in the appropriate sections. I also added random tests (although the other approved translations do not have any). Let me know if this is OK.

done

I changed the range to (9.9e6 ; 10e6)

I change the type of the arguments to unsigned int.

I deleted the code in the preloaded section.

I took it out.

I change it to unsigned long long int.

I forked my translation with number of tests raised to 10k.

I think another option is to reduce the size of the arguments (between 1e+5 and 1e+6). Then the returned result will fit into the C++ unsigned-long-int data type. The drawback is that it is possible to pass the random tests with a loop and the difficulty of the kata would be mitigated.

I checked the maximum value of an unsigned long long int and in fact it is the same as an unsigned long int (1.84e+19). With w = l = h = 1e+6 I get a result of 2.33e+18 which fits into the unsigned long int type. However if I reduce the max value of the arguments to 1e+6 then I can pass the random tests with a loop and that mitigates the difficulty of the kata. Is there a way to increase the size of the return data type?

It should be OK now.

## Loading more items...