MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | AC
Submitted:2015-05-09 15:58:37

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 <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long LL;
const int MAXN=100005;
const int MAXK=18;
const int MAXS=(1<<16)+20;
const LL INF=10000000000LL;
int n,K,a[MAXN],s[MAXN][MAXK],c[MAXK][MAXK];
LL f[MAXS],g[MAXK][MAXS];
int get()
{
    int f=0,v=0; char ch;
    while (!isdigit(ch=getchar()))if (ch=='-')break;
    if (ch=='-')f=1; else v=ch-48;
    while (isdigit(ch=getchar()))v=v*10+ch-48;
    if (f==1)return -v ;return v;
}
int main()
{
    int T=get();
    for(int test=1;test<=T;test++)
    {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX