MCPcopy Create free account
hub / github.com/Jonathan-Uy/CSES-Solutions / insert_vector

Function insert_vector

Additional Problems I/Square Subsets.cpp:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37bool insert_vector(bitset<SIZE> mask){
38 for(int i = SIZE-1; i >= 0; i--){
39 if(mask[i] == 0) continue;
40 if(!basis[i].any()){
41 basis[i] = mask;
42 return true;
43 }
44 mask ^= basis[i];
45 }
46 return false;
47}
48
49int main(){
50 scanf("%d", &N);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected