#include <cstdio>
#include <vector>
#include <ctime>
using namespace std;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
const int N = 1e7;
struct Node {
int next, data;
};
int k = 1, head[N]; // for (int i = head[a]; i != 0; i = v[i].next)
Node v[N];
void add( int list_id, int x ) {
v[k].next = head[list_id], v[k].data = x;
head[list_id] = k++;
}
void solve() {
printf("time = %.2f\n", 1. * clock() / CLOCKS_PER_SEC);
forn(i, N - 1)
add(i, i);
printf("time = %.2f\n", 1. * clock() / CLOCKS_PER_SEC);
}
int main() {
solve();
printf("time = %.2f\n", 1. * clock() / CLOCKS_PER_SEC);
}