foo.cpp:1:1: error: 'include' does not name a type
include<cstdio> include<cstring> include<iostream> include<algorithm>
^
foo.cpp: In function 'int main()':
foo.cpp:34:21: error: 'scanf' was not declared in this scope
scanf("%d%d", &N, &C);
^
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";
^