We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C++
- Other Concepts
- Bit Array
- Discussions
Bit Array
Bit Array
Sort by
recency
|
311 Discussions
|
Please Login in order to post a comment
There will always be a time in life, where you'll reach a new low, this was mine guys, good luck. using int64 = long long; const int64 MOD = 1LL << 31;
int64 gcd64(int64 a, int64 b) { while (b) { int64 t = a % b; a = b; b = t; } return a; }
long long uniqueCount(long long S, long long P, long long Q, long long N) { if ((Q & 1LL) && (P % 4 == 1)) { return min(N, MOD); }
}
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ unsigned int n, s, p, q; cin>>n>>s>>p>>q;
} `
hey brothers, can anyone clarify the question please, I'm not understand what they mentioned in this problem, I'm so confused
Stupid optimization preferences. =( I had to study Knut on the subject of RNG - maybe I don't know something, How else to guarantee the uniqueness of a given sequence or its not going beyond N. I couldn't meet the time limit in one test case. It turned out that the compiler there did not want to optimize human-readable expressions.
Here is Bit Array solution in c++ - https://programmingoneonone.com/hackerrank-bit-array-solution-in-cpp.html