foo.cc: In function 'int main()':
foo.cc:14:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld%lld%lld", &w, &p, &h, &n);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:15:47: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 1; i <= n; ++i) dp[i] = -1e18, scanf("%lld%lld%lld%lld", &pr[i].t, &pr[i].r, &pr[i].v, &pr[i].s);
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~