static bool inRange(int x, int n) { ret x >= 0 && x < n; } static bool inRange(int x, int a, int b) { ret x >= a && x < b; }