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