knapsack.cpp: In function 'void solve()':
knapsack.cpp:7:27: warning: right operand of comma operator has no effect [-Wunused-value]
7 | long long s,n;cin>>s,n;
| ^
knapsack.cpp:26:24: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
26 | for(long long i=0;i<v.size();i++){
| ~^~~~~~~~~
knapsack.cpp:32:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
32 | for(long long i=0;i<s+1;i++) res=max(res,dp[i]);cout<<res<<"\n";
| ^~~
knapsack.cpp:32:53: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
32 | for(long long i=0;i<s+1;i++) res=max(res,dp[i]);cout<<res<<"\n";
| ^~~~
knapsack.cpp:9:25: warning: 'n' may be used uninitialized in this function [-Wmaybe-uninitialized]
9 | for(long long i=0;i<n;i++){
| ~^~