include iostream include iomanip include vector include queue include

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <iostream>
#include <iomanip>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <iterator>
#include <string>
#include <algorithm>
#include <sstream>
#include <cmath>
using namespace std;
#define pb push_back
#define mp make_pair
#define make_state make_pair
#define all(x) x.begin(),x.end()
#define forn(x) for(int i=0;i<x;i++)
typedef long double T;
typedef long long ll;
typedef unsigned char uchar;
const int IMPOSSIBLE = -1;
uchar dist[256][256];
void precalc() {
for(int i = 0; i < 256; i++) {
for(int j = 0; j < 256; j++) {
bool found = false;
for(int k = 0; k <= 8; k++) {
uchar mask = (1LL << k) - 1;
if((i ^ mask) == j)
dist[i][j] = k, found = true;
}
if(!found) dist[i][j] = IMPOSSIBLE;
}
}
}
typedef vector<int> sequence;
vector<long long> hashes;
const int p = 271;
void calcHash() {
hashes[0] = 0;
}
long long subHash(int i, int len) {
}
int main() {
ios_base::sync_with_stdio(false);
// freopen("in.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
precalc();
return 0;
}