#include #include #include using namespace std; #define MAX (1<<12) #define IMAX (2*MAX) int a[IMAX]; int u = 0; vector pos[MAX]; int f = -1; int n = -1; bool overflow = false; void emit(int v) { ++n; bool first = false; if (v=0) { cout << u << ' ' << a[u] << endl; u++; } } } } int main() { memset(a, -1, sizeof(a)); emit(0); while (!overflow) { int mx = n; for (int v=0; v