san.cpp:8:1: error: 'vector' does not name a type; did you mean 'perror'?
vector<int> val[N],val1[N];
^~~~~~
perror
san.cpp: In function 'int main()':
san.cpp:36:5: error: 'val' was not declared in this scope
val[pos].push_back(k);
^~~
san.cpp:56:5: error: 'val1' was not declared in this scope
val1[pos].push_back(k);
^~~~
san.cpp:65:8: error: 'val' was not declared in this scope
sort(val[i].begin(),val[i].end());
^~~
san.cpp:68:8: error: 'val1' was not declared in this scope
sort(val1[i].begin(),val1[i].end());
^~~~
san.cpp:73:15: error: 'val' was not declared in this scope
for(k=0;k<val[i].size();k++){
^~~
san.cpp:74:20: error: 'val1' was not declared in this scope
l=lower_bound(val1[j].begin(),val1[j].end(),num-val[i][k])-val1[j].begin();
^~~~