hiho week 244 register

Ended

Participants:122

Verdict:Accepted
Score:100 / 100
Submitted:2019-03-05 00:15:08

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 <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn = 1000 + 5;
const int maxs = (1 << 10) + 5;
const int INF = 1 << 30;
int dp[2][maxs];
void upmax(int &a, int b)
{
    a = max(a, b);
}
int main()
{
    int T;
    scanf("%d", &T);
    while(T--)
    {
        int n, m;
        scanf("%d%d", &n, &m);
        int tol = 1 << m, now = 0, nxt = 1;
        fill(dp[0], dp[0] + tol, -INF);
        dp[0][0] = 0;
        for(int i = 1; i <= n; ++i)
        {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX