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