foo.cpp: In member function 'void node::build(int*, int, int, int)':
foo.cpp:17:47: error: 'min' was not declared in this scope
Min[p] = min(Min[p+p],Min[p+p+1]);
^
foo.cpp: In member function 'void node::update(int)':
foo.cpp:20:52: error: 'min' was not declared in this scope
Min[p] = min(Min[p+p]-dec[p+p],Min[p]);
^
foo.cpp: In function 'int main()':
foo.cpp:50:5: error: 'cin' was not declared in this scope
cin >> n >> m ;
^
foo.cpp:61:5: error: 'cout' was not declared in this scope
cout << 0 << endl;
^
foo.cpp:61:18: error: 'endl' was not declared in this scope
cout << 0 << endl;
^