fortune_telling2.cpp: In function ‘int main()’:
fortune_telling2.cpp:21:27: error: ‘sort’ was not declared in this scope
sort(v.begin(),v.end());
^
fortune_telling2.cpp:22:38: error: ‘unique’ was not declared in this scope
v.resize(unique(v.begin(),v.end()) - v.begin());
^
fortune_telling2.cpp:29:56: error: ‘upper_bound’ was not declared in this scope
q[i] = (int)(upper_bound(v.begin(),v.end(),q[i]) - v.begin()) - 1;
^
fortune_telling2.cpp:11:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&n,&k);
^
fortune_telling2.cpp:13:35: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&a[i],&b[i]);
^
fortune_telling2.cpp:28:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&q[i]);
^