route.cpp: In function 'int main()':
route.cpp:10:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &k);
~~~~~^~~~~~~~~~~~~~~~~
route.cpp:13:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", a + i);
~~~~~^~~~~~~~~~~~~
route.cpp:16:29: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized]
int lo = 1, hi = 1e9, m;
^