Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <vector>#include <math.h>#include <string.h>using namespace std;int N,M;vector<int> A(31,0);vector<int> B(31,0);int best[31][20001];int need(int i,int k){int temp = B[i];for (int t=0 ; t<k-1 ; ++t)temp = floor(temp*1.07);return temp;}int main(int argc,char** argv){cin>>N>>M;for (int i=1 ; i<=N ; ++i)cin>>A[i]>>B[i];memset(best[0],0,sizeof(int)*31*20001);for (int i=1 ; i<=N ; ++i){for (int j=1 ; j<=M ; ++j){int t = j;