xtaci / algorithms

Algorithms & Data structures in C++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RANDOM has some problems

lucusfly opened this issue · comments

define RANDOM(L, R) (L + rand() % ((R) - (L))) // gen a random integer in [L, R]

I think the RANDOM cannot get R, it should be (L + rand() % ((R) - (L) + 1))

it's true, please send pull requests.