hiho week 67 register

Ended

Participants:406

Verdict:Accepted
Score:100 / 100
Submitted:2015-10-11 16:31:49

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX