#include "utils.h" #include vector* fibon_seq(int size) { static vector elems; if (size <= 0 || size > 1024) { cout << "size is invalid!" << endl; return 0; } int current_size = elems.size(); if (size > current_size) { for (int ix = current_size; ix < size; ++ix) { if (ix < 2) { elems.push_back(1); } else { int value_ix = elems[ix - 1] + elems[ix - 2]; elems.push_back(value_ix); } } } return &elems; } int main() { vector* v = fibon_seq(100); if (v) { display(*v); } int max_int = numeric_limits::max(); cout << max_int << endl; return 0; }