garage.cpp: In function 'int main()':
garage.cpp:9:9: warning: unused variable 'j' [-Wunused-variable]
int i, j, n, m, ans = 0; scanf("%d%d", &n, &m);
^
garage.cpp:8:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("input.txt", "r", stdin);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
garage.cpp:9:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int i, j, n, m, ans = 0; scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
garage.cpp:10:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (i = 1; i <= n; i++)H.push(-i), scanf("%d", &C[i]);
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
garage.cpp:11:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (i = 1; i <= m; i++)scanf("%d", &V[i]);
~~~~~^~~~~~~~~~~~~
garage.cpp:13:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int x; scanf("%d", &x);
~~~~~^~~~~~~~~~