new_home.cpp:24:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main() {
^
new_home.cpp: In function 'int main()':
new_home.cpp:43:3: error: 'ans' was not declared in this scope
ans = max(abs(l - pos[0]), abs(l - pos.back()));
^~~
new_home.cpp:43:3: note: suggested alternative: 'abs'
ans = max(abs(l - pos[0]), abs(l - pos.back()));
^~~
abs
new_home.cpp:25:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &k, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:27:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d %d", &ar[i].fr, &ar[i].sc, &a[i], &b[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
new_home.cpp:42:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &l, &y);
~~~~~^~~~~~~~~~~~~~~~~