/in/foo.cc: In function 'int main()':
/in/foo.cc:27:53: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type 'long long int*' [-Wformat=]
for (int i=1; i<=n; i++) scanf("%ld%ld",&p[i],&w[i]);
^
/in/foo.cc:27:53: warning: format '%ld' expects argument of type 'long int*', but argument 3 has type 'long long int*' [-Wformat=]
/in/foo.cc:33:52: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
if (f[1][n][0]<=f[1][n][1]) printf("%d",f[1][n][0]);
^
/in/foo.cc:34:30: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=]
else printf("%ld",f[1][n][1]);
^