Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ init_is_square
Function
init_is_square
code/tricks/is_square.cpp:2–3 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
long long M;
2
void init_is_square() {
3
rep(i,0,64) M |= 1ULL << (63-(i*i)%64); }
4
inline bool is_square(ll x) {
5
if (x == 0) return true; // XXX
6
if ((M << x) >= 0) return false;
Callers
1
test
Function · 0.85
Calls
no outgoing calls
Tested by
1
test
Function · 0.68