foo.cc: In function 'int main()':
foo.cc:40: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:41: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:45: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:27:14: warning: 'k' may be used uninitialized in this function [-Wmaybe-uninitialized]
v[k] = 1;
~~~~~^~~