
Hello, thank you for the note of wrong size of the structure, I missed that. After setting it's size to correct value, it seems to pass without any issues. However, now I have a similar problem with the second function, 'ranArray', where Brute says the layout of the array is not random, even though the access pattern quite corresponds to a random one and it is different on each function call. How much more random can it be? Thank you again very much, have a nice day, Tomas Kasl - kasltoma

Hello, let me highlight the 's' in 'arrays' (upload system responds that the arrays doesn't look random). In test 4, multiple arrays are generated using 'ranArray' to determine, whether the function isn't just a predefined shifting (e.g. staticly saved randomization). For a proper solution, it is more like a matter of probability, but the odds of getting a similar ordering are quite low. In your case, you are defining around 15 possible solutions (i.e. not so random, especially in contrast to n!), and, therefore, reducing the chance of passing through the test. I would recommend you to add some random variable, and probably use 'srand()' to mix with the arrays a 'little bit more'. (Last part can is relevant for everybody.) Sincerely Jaroslav Klapálek Cituji kasltoma@fel.cvut.cz:
Hello,
thank you for the note of wrong size of the structure, I missed that.
After setting it's size to correct value, it seems to pass without any issues.
However, now I have a similar problem with the second function, 'ranArray', where Brute says the layout of the array is not random, even though the access pattern quite corresponds to a random one and it is different on each function call.
How much more random can it be?
Thank you again very much, have a nice day, Tomas Kasl - kasltoma
_______________________________________________ PSR mailing list PSR@rtime.felk.cvut.cz You can unsubscribe from the list at https://rtime.felk.cvut.cz/mailman/listinfo/psr
participants (2)
-
kasltoma@fel.cvut.cz
-
klapajar@fel.cvut.cz