Submission #985999

# Submission time Handle Problem Language Result Execution time Memory
985999 2024-05-19T14:55:20 Z cig32 Tourism (JOI23_tourism) C++17
100 / 100
1066 ms 65860 KB
#include "bits/stdc++.h"
using namespace std;
#define int long long
#define double long double
const int MAXN = 2e5 + 10;
const int MOD = 1e9 + 7;
mt19937_64 rng((int)std::chrono::steady_clock::now().time_since_epoch().count());
int rnd(int x, int y) {
  int u = uniform_int_distribution<int>(x, y)(rng); return u;
}
int bm(int b, int p) {
  if(p==0) return 1 % MOD;
  int r = bm(b, p >> 1);
  if(p&1) return (((r*r) % MOD) * b) % MOD;
  return (r*r) % MOD;
}
int inv(int b) { 
  return bm(b, MOD-2);
}
int fastlog(int x) {
  return (x == 0 ? -1 : 64 - __builtin_clzll(x) - 1);
}
void printcase(int i) { cout << "Case #" << i << ": "; }
static void run_with_stack_size(void (*func)(void), size_t stsize) {
  char *stack, *send;
  stack = (char *)malloc(stsize);
  send = stack + stsize - 16;
  send = (char *)((uintptr_t)send / 16 * 16);
  asm volatile(
    "mov %%rsp, (%0)\n"
    "mov %0, %%rsp\n"
    :
    : "r"(send));
  func();
  asm volatile("mov (%0), %%rsp\n" : : "r"(send));
  free(stack);
}
vector<int> adj[MAXN];
pair<pair<int,int>,int> qry[MAXN];
bool cmp(pair<pair<int,int>,int> x,pair<pair<int,int>,int>y) {
  return x.first.second<y.first.second;
}
struct sets_and_fenwick {
  int n, m; // n = ARRAY SIZE, m = MAX ELEMENT
  vector<int> bit;
  set< pair<pair<int,int>,int> > st;
  const int base = 1;
  const int oob = -1;
  void add(int x, int v) {
    x++;
    for(;x<m+5;x+=x&-x) bit[x] += v;
  }
  int sum(int x) {
    x++;
    int s = 0;
    for(;x;x-=x&-x) s+=bit[x];
    return s;
  }
  void resize(int n_, int m_) {
    m = m_;
    n = n_;
    bit.resize(m + 5);
    st.insert({{base, n - 1 + base}, 0});
    st.insert({{n + base, n + base}, oob});
    add(0, n);
  }
  void reset() {
    for(int i=0; i<=m; i++) bit[i] = 0;
    st.clear();
    st.insert({{base, n - 1 + base}, 0});
    st.insert({{n + base, n + base}, oob});
    add(0, n);
  }
  
  void update_range(int l, int r, int v) {
    vector<pair<pair<int,int>,int> > rem,ins;
    ins.push_back({{l, r}, v});
    auto it = st.lower_bound({{l, 0}, 0});
    while(1) {
      int lb = (*it).first.first;
      int rb = (*it).first.second;
      int val = (*it).second;
      if(lb == n+base) break;
      if(lb <= r) {
        if(rb <= r) {
          rem.push_back(*it);
          it++;
          continue;
        }
        rem.push_back(*it);
        ins.push_back({{r + 1, rb}, val});
        break;
      }
      else break;
    }
    it = st.lower_bound({{l, 0}, 0});
    if((*it).first.first > base) {
      it--;
      int lb = (*it).first.first;
      int rb = (*it).first.second;
      int val = (*it).second;
      if(rb >= l) {
        if(rb > r) {
          rem.push_back(*it);
          ins.push_back({{lb, l - 1}, val});
          ins.push_back({{r + 1, rb}, val});
        }
        else {
          rem.push_back(*it);
          ins.push_back({{lb, l - 1}, val});
        }
      }
    }
    for(auto x: rem) {
      st.erase(x);
      add(x.second, -(x.first.second - x.first.first + 1));
    }
    for(auto x: ins) {
      st.insert(x);
      add(x.second, x.first.second - x.first.first + 1);
    }
  }
  int query_ranges() { // Number of disjoint ranges 
    return st.size(); 
  }
  int query_count(int l, int r) { // Number of elements having value in [l, r]
    return sum(r) - sum(l - 1);
  }
};

int sz[MAXN];
void dfs1(int node, int prv) {
  sz[node] = 1;
  for(int x: adj[node]) {
    if(x != prv) {
      dfs1(x, node);
      sz[node] += sz[x];
    }
  }
}
bool hld(int x, int y) {
  return sz[x] > sz[y];
}
int L[MAXN], R[MAXN];
pair<int32_t,int32_t> st[18][MAXN];
vector<int> euler;
int ord[MAXN];
int ptr;
int dep[MAXN];
int par[MAXN];
int pos[MAXN];
int dage[MAXN]; // pos to pos
void dfs2(int node, int prv) {
  ord[++ptr] = node;
  par[node] = prv;
  pos[node] = ptr;
  euler.push_back(node);
  dep[node] = (prv == -1 ? 0 : dep[prv] + 1);
  for(int x: adj[node]) {
    if(x != prv) {
      dfs2(x, node);
      euler.push_back(node);
    }
  }
}
int lca(int x, int y) {
  int m1 = min(L[x], L[y]);
  int m2 = max(R[x], R[y]);
  int k = 32 - __builtin_clz(m2 - m1 + 1) - 1;
  return min(st[k][m1], st[k][m2 - (1<<k) + 1]).second;
}
sets_and_fenwick saf;
void complete_path(int u, int v, int w) {
  int l = lca(u, v);
  while(dep[u] >= dep[l]) {
    int p1 = pos[u], p2 = dage[p1];
    if(p2 <= pos[l]) p2 = pos[l];
    swap(p1, p2);
    int tp = ord[p1]; // range [p1, p2]
    saf.update_range(p1, p2, w);
    if(tp == l) break;
    u = par[tp];
  }
  while(dep[v] >= dep[l]) {
    int p1 = pos[v], p2 = dage[p1];
    if(p2 <= pos[l]) p2 = pos[l];
    swap(p1, p2);
    int tp = ord[p1]; // range [p1, p2]
    saf.update_range(p1, p2, w);
    if(tp == l) break;
    v = par[tp];
  }
}
void solve(int tc) {
  int n, m, q;
  cin >> n >> m >> q;
  saf.resize(n, m);
  for(int i=1; i<n; i++) {
    int x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  int c[m+1];
  for(int i=1; i<=m; i++) cin >> c[i];
  for(int i=1; i<=q; i++) {
    cin >> qry[i].first.first >> qry[i].first.second;
    qry[i].second = i;
  }
  sort(qry + 1, qry + q + 1, cmp);
  dfs1(1, -1);
  for(int i=1; i<=n; i++) sort(adj[i].begin(), adj[i].end(), hld);
  dfs2(1, -1);
  for(int i=0; i<euler.size(); i++) {
    R[euler[i]] = i;
  }
  for(int i=euler.size()-1; i>=0; i--) {
    L[euler[i]] = i;
  }
  for(int i=0; i<euler.size(); i++) {
    st[0][i] = {dep[euler[i]], euler[i]};
  }
  for(int i=1; i<18; i++) {
    for(int j=0; j+(1<<i)-1<euler.size(); j++) {
      st[i][j] = min(st[i-1][j], st[i-1][j+(1<<(i-1))]);
    }
  }
  dage[1] = 1;
  for(int i=2; i<=n; i++) {
    if(dep[ord[i]] > dep[ord[i-1]]) dage[i] = dage[i-1];
    else dage[i] = i;
  }
  int ans[q+1];
  int maxr = 1;
  saf.update_range(pos[c[1]], pos[c[1]], 1);
  for(int i=1; i<=q; i++) {
    bool yes = 0;
    int rb = qry[i].first.second;
    while(maxr < rb) {
      yes = 1;
      complete_path(c[maxr], c[maxr + 1], maxr);
      maxr++;
    }
    if(yes) {
      saf.update_range(pos[c[rb]], pos[c[rb]], rb);
    }
    ans[qry[i].second] = saf.query_count(qry[i].first.first, rb);
  }
  for(int i=1; i<=q;i++) cout<<ans[i]<<"\n";
} 
void uwu() {
  ios::sync_with_stdio(0); cin.tie(0);
  int t = 1; //cin >> t;
  for(int i=1; i<=t; i++) solve(i);
}
int32_t main() {
  #ifdef ONLINE_JUDGE
  uwu();
  #endif
  #ifndef ONLINE_JUDGE
  run_with_stack_size(uwu, 1024 * 1024 * 1024); // run with a 1 GiB stack
  #endif
}
/*
g++ B.cpp -std=c++17 -O2 -o B
./B < input.txt

0 1 2 5 
3 7 11 6 
15 14 13 10 
12 8 4 9 

*/

Compilation message

tourism.cpp: In function 'void solve(long long int)':
tourism.cpp:214:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  214 |   for(int i=0; i<euler.size(); i++) {
      |                ~^~~~~~~~~~~~~
tourism.cpp:220:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  220 |   for(int i=0; i<euler.size(); i++) {
      |                ~^~~~~~~~~~~~~
tourism.cpp:224:28: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  224 |     for(int j=0; j+(1<<i)-1<euler.size(); j++) {
      |                  ~~~~~~~~~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 23644 KB Output is correct
2 Correct 4 ms 23644 KB Output is correct
3 Correct 4 ms 23644 KB Output is correct
4 Correct 5 ms 29788 KB Output is correct
5 Correct 5 ms 29788 KB Output is correct
6 Correct 5 ms 29788 KB Output is correct
7 Correct 5 ms 29784 KB Output is correct
8 Correct 5 ms 31984 KB Output is correct
9 Correct 6 ms 31836 KB Output is correct
10 Correct 5 ms 31836 KB Output is correct
11 Correct 5 ms 31836 KB Output is correct
12 Correct 5 ms 31856 KB Output is correct
13 Correct 5 ms 31836 KB Output is correct
14 Correct 7 ms 31836 KB Output is correct
15 Correct 5 ms 31832 KB Output is correct
16 Correct 5 ms 31836 KB Output is correct
17 Correct 5 ms 31832 KB Output is correct
18 Correct 5 ms 31836 KB Output is correct
19 Correct 6 ms 31836 KB Output is correct
20 Correct 5 ms 31836 KB Output is correct
21 Correct 6 ms 31836 KB Output is correct
22 Correct 5 ms 31836 KB Output is correct
23 Correct 5 ms 31836 KB Output is correct
24 Correct 5 ms 31996 KB Output is correct
25 Correct 5 ms 31836 KB Output is correct
26 Correct 5 ms 31836 KB Output is correct
27 Correct 3 ms 17500 KB Output is correct
28 Correct 5 ms 31836 KB Output is correct
29 Correct 6 ms 31836 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 23644 KB Output is correct
2 Correct 4 ms 23644 KB Output is correct
3 Correct 4 ms 23644 KB Output is correct
4 Correct 5 ms 29788 KB Output is correct
5 Correct 5 ms 29788 KB Output is correct
6 Correct 5 ms 29788 KB Output is correct
7 Correct 5 ms 29784 KB Output is correct
8 Correct 5 ms 31984 KB Output is correct
9 Correct 6 ms 31836 KB Output is correct
10 Correct 5 ms 31836 KB Output is correct
11 Correct 5 ms 31836 KB Output is correct
12 Correct 5 ms 31856 KB Output is correct
13 Correct 5 ms 31836 KB Output is correct
14 Correct 7 ms 31836 KB Output is correct
15 Correct 5 ms 31832 KB Output is correct
16 Correct 5 ms 31836 KB Output is correct
17 Correct 5 ms 31832 KB Output is correct
18 Correct 5 ms 31836 KB Output is correct
19 Correct 6 ms 31836 KB Output is correct
20 Correct 5 ms 31836 KB Output is correct
21 Correct 6 ms 31836 KB Output is correct
22 Correct 5 ms 31836 KB Output is correct
23 Correct 5 ms 31836 KB Output is correct
24 Correct 5 ms 31996 KB Output is correct
25 Correct 5 ms 31836 KB Output is correct
26 Correct 5 ms 31836 KB Output is correct
27 Correct 3 ms 17500 KB Output is correct
28 Correct 5 ms 31836 KB Output is correct
29 Correct 6 ms 31836 KB Output is correct
30 Correct 11 ms 36184 KB Output is correct
31 Correct 11 ms 36188 KB Output is correct
32 Correct 16 ms 36444 KB Output is correct
33 Correct 13 ms 36368 KB Output is correct
34 Correct 13 ms 36188 KB Output is correct
35 Correct 12 ms 36268 KB Output is correct
36 Correct 13 ms 36188 KB Output is correct
37 Correct 12 ms 36188 KB Output is correct
38 Correct 9 ms 36188 KB Output is correct
39 Correct 8 ms 36356 KB Output is correct
40 Correct 9 ms 36188 KB Output is correct
41 Correct 8 ms 36408 KB Output is correct
42 Correct 8 ms 36188 KB Output is correct
43 Correct 8 ms 38236 KB Output is correct
44 Correct 10 ms 36336 KB Output is correct
45 Correct 10 ms 38236 KB Output is correct
46 Correct 12 ms 36188 KB Output is correct
47 Correct 9 ms 36188 KB Output is correct
48 Correct 10 ms 36188 KB Output is correct
49 Correct 9 ms 36188 KB Output is correct
50 Correct 9 ms 36188 KB Output is correct
51 Correct 9 ms 36188 KB Output is correct
52 Correct 9 ms 36188 KB Output is correct
53 Correct 9 ms 36188 KB Output is correct
54 Correct 9 ms 36188 KB Output is correct
55 Correct 11 ms 36184 KB Output is correct
56 Correct 4 ms 17500 KB Output is correct
57 Correct 7 ms 36188 KB Output is correct
58 Correct 13 ms 36184 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 23644 KB Output is correct
2 Correct 3 ms 17596 KB Output is correct
3 Correct 5 ms 17500 KB Output is correct
4 Correct 142 ms 55144 KB Output is correct
5 Correct 113 ms 58828 KB Output is correct
6 Correct 143 ms 60768 KB Output is correct
7 Correct 176 ms 62148 KB Output is correct
8 Correct 178 ms 61748 KB Output is correct
9 Correct 175 ms 60788 KB Output is correct
10 Correct 180 ms 62288 KB Output is correct
11 Correct 178 ms 61040 KB Output is correct
12 Correct 170 ms 61288 KB Output is correct
13 Correct 172 ms 61968 KB Output is correct
14 Correct 165 ms 61044 KB Output is correct
15 Correct 52 ms 60352 KB Output is correct
16 Correct 185 ms 60612 KB Output is correct
17 Correct 80 ms 21964 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 23644 KB Output is correct
2 Correct 315 ms 50884 KB Output is correct
3 Correct 510 ms 51924 KB Output is correct
4 Correct 409 ms 52740 KB Output is correct
5 Correct 640 ms 56188 KB Output is correct
6 Correct 659 ms 57564 KB Output is correct
7 Correct 651 ms 56328 KB Output is correct
8 Correct 646 ms 58612 KB Output is correct
9 Correct 650 ms 56256 KB Output is correct
10 Correct 651 ms 56256 KB Output is correct
11 Correct 658 ms 56392 KB Output is correct
12 Correct 669 ms 56356 KB Output is correct
13 Correct 673 ms 58520 KB Output is correct
14 Correct 687 ms 61912 KB Output is correct
15 Correct 731 ms 63424 KB Output is correct
16 Correct 648 ms 58312 KB Output is correct
17 Correct 669 ms 58248 KB Output is correct
18 Correct 644 ms 58304 KB Output is correct
19 Correct 399 ms 54984 KB Output is correct
20 Correct 404 ms 53668 KB Output is correct
21 Correct 418 ms 55252 KB Output is correct
22 Correct 401 ms 55272 KB Output is correct
23 Correct 399 ms 53704 KB Output is correct
24 Correct 393 ms 53452 KB Output is correct
25 Correct 407 ms 53600 KB Output is correct
26 Correct 400 ms 53688 KB Output is correct
27 Correct 405 ms 53588 KB Output is correct
28 Correct 403 ms 55500 KB Output is correct
29 Correct 415 ms 53712 KB Output is correct
30 Correct 419 ms 54184 KB Output is correct
31 Correct 410 ms 55424 KB Output is correct
32 Correct 427 ms 55740 KB Output is correct
33 Correct 475 ms 56516 KB Output is correct
34 Correct 497 ms 58964 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 23640 KB Output is correct
2 Correct 3 ms 17496 KB Output is correct
3 Correct 4 ms 17500 KB Output is correct
4 Correct 849 ms 56912 KB Output is correct
5 Correct 974 ms 57192 KB Output is correct
6 Correct 992 ms 60348 KB Output is correct
7 Correct 1063 ms 60460 KB Output is correct
8 Correct 1055 ms 60596 KB Output is correct
9 Correct 1048 ms 62068 KB Output is correct
10 Correct 1066 ms 60856 KB Output is correct
11 Correct 1053 ms 60368 KB Output is correct
12 Correct 1051 ms 61268 KB Output is correct
13 Correct 1062 ms 61408 KB Output is correct
14 Correct 71 ms 21964 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 23644 KB Output is correct
2 Correct 4 ms 23644 KB Output is correct
3 Correct 4 ms 23644 KB Output is correct
4 Correct 5 ms 29788 KB Output is correct
5 Correct 5 ms 29788 KB Output is correct
6 Correct 5 ms 29788 KB Output is correct
7 Correct 5 ms 29784 KB Output is correct
8 Correct 5 ms 31984 KB Output is correct
9 Correct 6 ms 31836 KB Output is correct
10 Correct 5 ms 31836 KB Output is correct
11 Correct 5 ms 31836 KB Output is correct
12 Correct 5 ms 31856 KB Output is correct
13 Correct 5 ms 31836 KB Output is correct
14 Correct 7 ms 31836 KB Output is correct
15 Correct 5 ms 31832 KB Output is correct
16 Correct 5 ms 31836 KB Output is correct
17 Correct 5 ms 31832 KB Output is correct
18 Correct 5 ms 31836 KB Output is correct
19 Correct 6 ms 31836 KB Output is correct
20 Correct 5 ms 31836 KB Output is correct
21 Correct 6 ms 31836 KB Output is correct
22 Correct 5 ms 31836 KB Output is correct
23 Correct 5 ms 31836 KB Output is correct
24 Correct 5 ms 31996 KB Output is correct
25 Correct 5 ms 31836 KB Output is correct
26 Correct 5 ms 31836 KB Output is correct
27 Correct 3 ms 17500 KB Output is correct
28 Correct 5 ms 31836 KB Output is correct
29 Correct 6 ms 31836 KB Output is correct
30 Correct 11 ms 36184 KB Output is correct
31 Correct 11 ms 36188 KB Output is correct
32 Correct 16 ms 36444 KB Output is correct
33 Correct 13 ms 36368 KB Output is correct
34 Correct 13 ms 36188 KB Output is correct
35 Correct 12 ms 36268 KB Output is correct
36 Correct 13 ms 36188 KB Output is correct
37 Correct 12 ms 36188 KB Output is correct
38 Correct 9 ms 36188 KB Output is correct
39 Correct 8 ms 36356 KB Output is correct
40 Correct 9 ms 36188 KB Output is correct
41 Correct 8 ms 36408 KB Output is correct
42 Correct 8 ms 36188 KB Output is correct
43 Correct 8 ms 38236 KB Output is correct
44 Correct 10 ms 36336 KB Output is correct
45 Correct 10 ms 38236 KB Output is correct
46 Correct 12 ms 36188 KB Output is correct
47 Correct 9 ms 36188 KB Output is correct
48 Correct 10 ms 36188 KB Output is correct
49 Correct 9 ms 36188 KB Output is correct
50 Correct 9 ms 36188 KB Output is correct
51 Correct 9 ms 36188 KB Output is correct
52 Correct 9 ms 36188 KB Output is correct
53 Correct 9 ms 36188 KB Output is correct
54 Correct 9 ms 36188 KB Output is correct
55 Correct 11 ms 36184 KB Output is correct
56 Correct 4 ms 17500 KB Output is correct
57 Correct 7 ms 36188 KB Output is correct
58 Correct 13 ms 36184 KB Output is correct
59 Correct 4 ms 23644 KB Output is correct
60 Correct 3 ms 17596 KB Output is correct
61 Correct 5 ms 17500 KB Output is correct
62 Correct 142 ms 55144 KB Output is correct
63 Correct 113 ms 58828 KB Output is correct
64 Correct 143 ms 60768 KB Output is correct
65 Correct 176 ms 62148 KB Output is correct
66 Correct 178 ms 61748 KB Output is correct
67 Correct 175 ms 60788 KB Output is correct
68 Correct 180 ms 62288 KB Output is correct
69 Correct 178 ms 61040 KB Output is correct
70 Correct 170 ms 61288 KB Output is correct
71 Correct 172 ms 61968 KB Output is correct
72 Correct 165 ms 61044 KB Output is correct
73 Correct 52 ms 60352 KB Output is correct
74 Correct 185 ms 60612 KB Output is correct
75 Correct 80 ms 21964 KB Output is correct
76 Correct 4 ms 23644 KB Output is correct
77 Correct 315 ms 50884 KB Output is correct
78 Correct 510 ms 51924 KB Output is correct
79 Correct 409 ms 52740 KB Output is correct
80 Correct 640 ms 56188 KB Output is correct
81 Correct 659 ms 57564 KB Output is correct
82 Correct 651 ms 56328 KB Output is correct
83 Correct 646 ms 58612 KB Output is correct
84 Correct 650 ms 56256 KB Output is correct
85 Correct 651 ms 56256 KB Output is correct
86 Correct 658 ms 56392 KB Output is correct
87 Correct 669 ms 56356 KB Output is correct
88 Correct 673 ms 58520 KB Output is correct
89 Correct 687 ms 61912 KB Output is correct
90 Correct 731 ms 63424 KB Output is correct
91 Correct 648 ms 58312 KB Output is correct
92 Correct 669 ms 58248 KB Output is correct
93 Correct 644 ms 58304 KB Output is correct
94 Correct 399 ms 54984 KB Output is correct
95 Correct 404 ms 53668 KB Output is correct
96 Correct 418 ms 55252 KB Output is correct
97 Correct 401 ms 55272 KB Output is correct
98 Correct 399 ms 53704 KB Output is correct
99 Correct 393 ms 53452 KB Output is correct
100 Correct 407 ms 53600 KB Output is correct
101 Correct 400 ms 53688 KB Output is correct
102 Correct 405 ms 53588 KB Output is correct
103 Correct 403 ms 55500 KB Output is correct
104 Correct 415 ms 53712 KB Output is correct
105 Correct 419 ms 54184 KB Output is correct
106 Correct 410 ms 55424 KB Output is correct
107 Correct 427 ms 55740 KB Output is correct
108 Correct 475 ms 56516 KB Output is correct
109 Correct 497 ms 58964 KB Output is correct
110 Correct 4 ms 23640 KB Output is correct
111 Correct 3 ms 17496 KB Output is correct
112 Correct 4 ms 17500 KB Output is correct
113 Correct 849 ms 56912 KB Output is correct
114 Correct 974 ms 57192 KB Output is correct
115 Correct 992 ms 60348 KB Output is correct
116 Correct 1063 ms 60460 KB Output is correct
117 Correct 1055 ms 60596 KB Output is correct
118 Correct 1048 ms 62068 KB Output is correct
119 Correct 1066 ms 60856 KB Output is correct
120 Correct 1053 ms 60368 KB Output is correct
121 Correct 1051 ms 61268 KB Output is correct
122 Correct 1062 ms 61408 KB Output is correct
123 Correct 71 ms 21964 KB Output is correct
124 Correct 606 ms 63780 KB Output is correct
125 Correct 484 ms 59980 KB Output is correct
126 Correct 745 ms 63748 KB Output is correct
127 Correct 746 ms 63940 KB Output is correct
128 Correct 737 ms 63172 KB Output is correct
129 Correct 700 ms 63680 KB Output is correct
130 Correct 752 ms 63428 KB Output is correct
131 Correct 200 ms 63020 KB Output is correct
132 Correct 196 ms 63424 KB Output is correct
133 Correct 192 ms 61836 KB Output is correct
134 Correct 463 ms 59248 KB Output is correct
135 Correct 502 ms 59592 KB Output is correct
136 Correct 469 ms 58824 KB Output is correct
137 Correct 331 ms 65528 KB Output is correct
138 Correct 315 ms 64840 KB Output is correct
139 Correct 322 ms 65644 KB Output is correct
140 Correct 309 ms 65160 KB Output is correct
141 Correct 324 ms 65524 KB Output is correct
142 Correct 319 ms 65860 KB Output is correct
143 Correct 64 ms 55060 KB Output is correct
144 Correct 728 ms 62524 KB Output is correct