foo.cc: In function 'void work(char*)':
foo.cc:37:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
  if (d1 < d2)
     ^
foo.cc:41:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
  if (d1 > d2)
     ^
foo.cc:26:13: warning: unused variable 't' [-Wunused-variable]
  int i = 0, t = 0;
             ^
foo.cc:27:6: warning: unused variable 'a' [-Wunused-variable]
  int a[20] = { 0 };
      ^
foo.cc:28:6: warning: unused variable 'ans' [-Wunused-variable]
  int ans = 0;
      ^~~
   
  
    [Hydro](https://hydro.ac)提供评测服务