money.cpp: In function 'int solve(int, int)':
money.cpp:15:9: warning: unused variable 'l' [-Wunused-variable]
int l = u, r = v, ans = u;
^
money.cpp:15:16: warning: unused variable 'r' [-Wunused-variable]
int l = u, r = v, ans = u;
^
money.cpp:15:23: warning: unused variable 'ans' [-Wunused-variable]
int l = u, r = v, ans = u;
^~~
money.cpp: In function 'int main()':
money.cpp:34:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
money.cpp:35:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
f1(i, n) scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~