koala.cpp: In function 'int main()':
koala.cpp:18:34: warning: right operand of comma operator has no effect [-Wunused-value]
for(j=i-1;j>0&&cnt--;j--,cnt)dp[i]=max(dp[i],dp[j]-a*((p[i].fr-p[j].fr+d-1)/d)+p[i].sc);
^~~
koala.cpp:10:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld%lld%lld%lld",&k,&m,&d,&a,&n);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
koala.cpp:11:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=2;i<n+2;i++)scanf("%lld%lld",&p[i].fr,&p[i].sc);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~