tolbi's blog

By tolbi, 22 months ago, In English

level: **VERY HARD*

hello today am gonna tech xor basis/ but proofs are very hard so no proof. it inituavautve

okl we hvae arary basis[37] mane basis[i] mst's i so we habvee

flolpowing codem for is to isnert x in tonhe the set;/ buist it's bveyr har adsso i wont';t exp[alaomn

include<stdc++/bits.h>

using namespace = std; typedef int long long; void insert(x){ for(i in 30 to 0) if(x's i'th bit is not 1) : ccinonitue if(basis[i] == -1) basis[i] = x; break; else x = x $$$\oplus$$$ basis[i] } ~~~~~

isneritng is same aas qureying hwo to i mane queery if ew cna maefae the X swith gigven xorn basis ealneaments

fi yow odsndint udnestsnad yoib can askj in comenents

UPD: code for query

include<stdc++/bits.h>

using namespace = std; typedef int long long; void insert(x){ for(i in 30 to 0) if(x's i'th bit is not 1) : ccinonitue if(basis[i] == -1) return false; else x = x $$$\oplus$$$ basis[i] return true;} ~~~~~

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
22 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Auto comment: topic has been updated by tolbi (previous revision, new revision, compare).

»
22 months ago, # |
  Vote: I like it +31 Vote: I do not like it

thaknss fo4r th1s awsoeme edutiroal!

»
22 months ago, # |
  Vote: I like it +17 Vote: I do not like it

your code didn't compile. can you fix it?

»
22 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

If you enter:

```cpp

#include <iostream>

using namespace std;

int main{

  int array[10];

  return 0;

}

```

Then it will show:

#include <iostream>
int main{
    int array[10];
    return 0;
}
»
22 months ago, # |
Rev. 3   Vote: I like it +3 Vote: I do not like it

thenk yu for the explanat1on!!! ay ken n0w AC oll ex0R pr0bbblamss

»
22 months ago, # |
  Vote: I like it +11 Vote: I do not like it

ay dond undstersatnd pls fhelp

»
22 months ago, # |
  Vote: I like it +14 Vote: I do not like it

Very gut tutoral. Pleas more

»
22 months ago, # |
  Vote: I like it +8 Vote: I do not like it

n1ec bolg, nwo 1 c4n b3 a lgm in 23 s3c0nds

»
22 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Veyr ince epxlantaion, txh!

»
22 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Tghsnkcs orf isth aeswome tut6969

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

r/ihadastroke

»
22 months ago, # |
  Vote: I like it +11 Vote: I do not like it

too difficult to understand, had to go through a grad level linear algebra textbook to even understand the notation. downvoted ù_ú

»
22 months ago, # |
  Vote: I like it +8 Vote: I do not like it

yur qurey si viod soo it caonot reutn bolo.