我写了一个 SPJ,但是最后我想给它在判题的时候加上一个随机数,结果编译失败了,告诉我不应该用
[Error] call to 'srand' declared with attribute error: Don't use srand(), you should use 'registerGen(argc, argv, 1);' to initialize generator seed by hash code of the command line params. The third parameter is randomGeneratorVersion (currently the latest is 1).
所以谁能解释一下为什么,以及怎样去做,谢谢!