MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | WA
Submitted:2015-05-09 16:31:56

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<cstdio>
#include<cstring>
const int N = 100001;
typedef long long LL;
const LL inf = 0x7fffffffffffffffLL;
#define gc c=getchar()
bool mk;
char c;
int f[20];
inline void swap(int &a, int &b){
    int c = a;
    a = b;
    b = c;
}
inline void in(int &x){
    if(mk)  return;
    gc;
    if(c == EOF){
        mk = 1;
        return;
    }
    x = 0;
    while(c<48 || c>57) gc;
    while(c>=48 && c<=57){
        x = x*10+c-48;
        gc;
    }
}
int T, n, k, a[N];
LL pre(int st, int ed, int dd){
    if(st == ed)    return 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX