foo.cpp:1:18: warning: extra tokens at end of #include directive [enabled by default]
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm>
^
foo.cpp: In function 'int main()':
foo.cpp:39:22: error: 'sort' was not declared in this scope
sort(o + 1, o + N + 1);
^
foo.cpp:46:25: error: 'unique' was not declared in this scope
int hn = unique(H, H + N) - H;
^
foo.cpp:48:43: error: 'lower_bound' was not declared in this scope
o[i].v = lower_bound(H, H + hn, o[i].v) - H;
^
foo.cpp:49:25: error: 'memset' was not declared in this scope
memset(dp, -1, sizeof dp);
^
foo.cpp:53:1: error: 'cout' was not declared in this scope
cout << ans << "\n";
^