This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define LIMIT 1000000000 | |
#define CHUNK_COUNT 35000 | |
#define CHUNK_NUMS 15 * CHUNK_COUNT | |
// max size of buffer for CHUNK_NUMS numbers (except 1B) | |
#define CHUNK_SIZE (119 * CHUNK_COUNT) | |
void print(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdio> | |
using namespace std; | |
const int MAXN = 100010; | |
const int MAXLEV = 17; | |
// Array and sparse table. | |
// Actually, array can be stored in 0's row of array |