snake_escaping.cpp:1:1: error: 'include' does not name a type
include <bits/stdc++.h>
^
snake_escaping.cpp: In function 'int main()':
snake_escaping.cpp:45:30: error: 'scanf' was not declared in this scope
scanf("%d %d %s", &n, &q, &a);
^
snake_escaping.cpp:48:28: error: 'max' was not declared in this scope
for (int j = max(0, n - 6); j < n; ++j) { // first 7 bits
^
snake_escaping.cpp:53:35: error: 'max' was not declared in this scope
for (int j = 0; j < max(0, n - 6); ++j) { // last 13 bits
^
snake_escaping.cpp:61:24: error: 'memset' was not declared in this scope
memset(f, 0, sizeof f);
^
snake_escaping.cpp:62:41: error: 'max' was not declared in this scope
for (int j = 0; j < (1 << max(0, n - 6)); ++j) {
^
snake_escaping.cpp:70:51: error: 'printf' was not declared in this scope
for (int i = 0; i < q; ++i) printf("%d\n", res[i]);
^