MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | TLE
Submitted:2015-05-09 15:02:14

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 <bits/stdc++.h>
#define  LL  long long
#define  PB  push_back
using namespace std;
const int N = 2e5 + 7;
const int INF = 0x7fffffff;
int T, n, Q, a[N], SZ, ans[N], cas;
struct Query {
    int g, l, r, k, id;
} q[N];
bool cmp1 (const Query &A, const Query &B) {
    if (A.g == B.g) {
        return A.r < B.r;
    }
    return A.g < B.g;
}
multiset <int> S;
multiset <int> :: iterator it;
int main() {
//    freopen("in.txt", "r", stdin);
    cin >> T;
    while (T --) {
        scanf("%d%d", &n, &Q);
        SZ = sqrt(n + 0.5);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX