foo.cc: In function 'int main()':
foo.cc:41:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
foo.cc:42:38: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 1; i <= n; i++) scanf("%lf%lf", &ax[i], &ay[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:46:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
~~~~~^~~~~~~~~~~~~~~~
foo.cc: In function 'void dijkstra(int, int)':
foo.cc:28:14: warning: 'k' may be used uninitialized in this function [-Wmaybe-uninitialized]
v[k] = 1;
~~~~~^~~