답안 #706523

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
706523 2023-03-06T22:06:35 Z Pety 푸드 코트 (JOI21_foodcourt) C++14
100 / 100
804 ms 43300 KB
#include <bits/stdc++.h>
#define ll long long

using namespace std;

ifstream fin ("text.in");
ofstream fout ("text.out");

const int N = 250002;

struct node {
  ll min1, min2;
  ll fr;
} aint[4*N];

ll lazy[4*N]; 

int a[N], b[N];
ll c[N], k[N], cnt[N], answer[N];

node merge (node a, node b) {
  node c;
  if (a.min1 == b.min1) {
    c.min1 = a.min1;
    c.fr = a.fr + b.fr;
    c.min2 = min(a.min2, b.min2);
  }
  else if (a.min1 < b.min1) {
    c.min1 = a.min1;
    c.fr = a.fr;
    c.min2 = min(a.min2, b.min1);
  }
  else {
    c.min1 = b.min1;
    c.fr = b.fr;
    c.min2 = min(b.min2, a.min1);
  }
  return c;
}

void push_add(int nod, ll x) {
  aint[nod].min1 += x;
  if (aint[nod].min2 != 1e18)
    aint[nod].min2 += x;
  lazy[nod] += x;
}

void push_max (int nod, ll k) {
  aint[nod].min1 = max(aint[nod].min1, k);
}


void push_lazy (int nod, int st, int dr) {
  if (st == dr)
    return;
  push_add(2 * nod, lazy[nod]);
  push_add(2 * nod + 1, lazy[nod]);
  lazy[nod] = 0;
  push_max(2 * nod, aint[nod].min1);
  push_max(2 * nod + 1, aint[nod].min1);
}

void update_chmax (int nod, int st, int dr, int a, int b, ll value) {
  push_lazy(nod, st, dr);
  if (a > b || b < st || a > dr || aint[nod].min1 >= value)
    return;
  if (a <= st && dr <= b && aint[nod].min2 > value) {
    push_max(nod, value);
    return;
  }
  int mid = (st + dr) / 2;
  update_chmax(2 * nod, st, mid, a, b, value);
  update_chmax(2 * nod + 1, mid + 1, dr, a, b, value);
  aint[nod] = merge(aint[2 * nod], aint[2 * nod + 1]);
}
void update_sum (int nod, int st, int dr, int a, int b, ll x) {
  push_lazy(nod, st, dr);
  if (a > b || b < st || a > dr)
    return;
  if (a <= st && dr <= b)  {
    push_add(nod, x);
    return;
  }
  int mid = (st + dr) / 2;
  update_sum(2 * nod, st, mid, a, b, x);
  update_sum(2 * nod + 1, mid + 1, dr, a, b, x);
  aint[nod] = merge(aint[2 * nod], aint[2 * nod + 1]);
}

void build (int nod, int st, int dr) {
  if (st == dr) {
    aint[nod].min1 = 0;
    aint[nod].min2 = 1e18;
    aint[nod].fr = 1;
    return;
  }
  int mid = (st + dr) / 2;
  build(2 * nod, st, mid);
  build(2 * nod + 1, mid + 1, dr);

  aint[nod] = merge(aint[2 * nod], aint[2 * nod + 1]);
}
ll query (int nod, int st, int dr, int a) {
  push_lazy(nod, st, dr);
  if (st == dr) {
    return aint[nod].min1;
  }
  int mid = (st + dr) / 2;
  if (a <= mid)
    return query(2 * nod, st, mid, a);
  else
    return query(2 * nod + 1, mid + 1, dr, a);
}

long long aint2[4*N];

void update (int nod, int st, int dr, int poz, ll x) {
  if (st == dr) {
    aint2[nod] = x;
    return;
  }
  int mid = (st + dr) / 2;
  if (poz <=mid)
    update(2 * nod, st, mid, poz, x);
  else
    update(2 * nod + 1, mid + 1, dr, poz, x);
  aint2[nod] = aint2[2 * nod] + aint2[2 * nod + 1];
}

int query2 (int nod, int st, int dr, ll x) {
  if (aint2[nod] < x)
    return 0;
  if (st == dr)
    return st;
  if (aint2[2*nod] < x)
    return query2(2 * nod + 1, (st + dr) / 2 + 1, dr, x - aint2[2 * nod]);
  else
    return query2(2 * nod, st, (st + dr) / 2, x);
}

ll query_sum (int nod, int st, int dr, int a, int b) {
  if (a > dr || b < st || a > b)
    return 0;
  if (a <= st && dr <= b)
    return aint2[nod];
  int mid = (st + dr) / 2;
  return query_sum(2 * nod, st, mid, a, b) + query_sum(2 * nod + 1, mid + 1, dr, a, b);
}

int n, m, q;

int main () 
{
  cin >> n >> m >> q;
  build(1, 1, n);
  vector<pair<int, pair<int, int>>>event;
  vector<int>idk(q + 2);
  for (int i = 1; i <= q; i++) {
    int type;
    cin >> type;
    if (type == 1) 
      cin >> a[i] >> b[i] >> c[i] >> k[i];
    if (type == 2) 
      cin >> a[i] >> b[i] >> k[i];
    if (type == 3) 
      cin >> a[i] >> k[i];
    if (type == 1) {
      event.push_back({a[i], {1, i}});
      event.push_back({b[i] + 1, {2, i}});
      update_sum(1, 1, n, a[i], b[i], k[i]);
    }
    if (type == 2) {
      update_sum(1, 1, n, a[i], b[i], -k[i]);
      update_chmax(1, 1, n, a[i], b[i], 0);
    }

    if (type == 3) {
      idk[i] = 1;
      cnt[i] = query(1, 1, n, a[i]);
      event.push_back({a[i], {3, i}});
    }
  }
  sort(event.begin(), event.end());
  for (auto it : event) {
    if (it.second.first == 1) {
      update(1, 1, q, it.second.second, k[it.second.second]);
    }
    if (it.second.first == 2) {
      update(1, 1, q, it.second.second, 0);
    }
    if (it.second.first == 3) {
      ll total = query_sum(1, 1, q, 1, it.second.second);
      if (cnt[it.second.second] < k[it.second.second]) {
        continue;
      }
      ll val = total - cnt[it.second.second] + k[it.second.second];
      int time = query2(1, 1, q, val);
      answer[it.second.second] = c[time];
    }
  }
  for (int i = 1; i <= q; i++)
    if (idk[i])
      cout << answer[i] << "\n";
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 596 KB Output is correct
2 Correct 4 ms 596 KB Output is correct
3 Correct 3 ms 596 KB Output is correct
4 Correct 4 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 2 ms 468 KB Output is correct
7 Correct 4 ms 596 KB Output is correct
8 Correct 4 ms 628 KB Output is correct
9 Correct 4 ms 596 KB Output is correct
10 Correct 4 ms 716 KB Output is correct
11 Correct 4 ms 596 KB Output is correct
12 Correct 4 ms 596 KB Output is correct
13 Correct 2 ms 584 KB Output is correct
14 Correct 4 ms 724 KB Output is correct
15 Correct 3 ms 596 KB Output is correct
16 Correct 4 ms 568 KB Output is correct
17 Correct 4 ms 596 KB Output is correct
18 Correct 4 ms 724 KB Output is correct
19 Correct 4 ms 688 KB Output is correct
20 Correct 5 ms 724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 596 KB Output is correct
2 Correct 4 ms 596 KB Output is correct
3 Correct 3 ms 596 KB Output is correct
4 Correct 4 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 2 ms 468 KB Output is correct
7 Correct 4 ms 596 KB Output is correct
8 Correct 4 ms 628 KB Output is correct
9 Correct 4 ms 596 KB Output is correct
10 Correct 4 ms 716 KB Output is correct
11 Correct 4 ms 596 KB Output is correct
12 Correct 4 ms 596 KB Output is correct
13 Correct 2 ms 584 KB Output is correct
14 Correct 4 ms 724 KB Output is correct
15 Correct 3 ms 596 KB Output is correct
16 Correct 4 ms 568 KB Output is correct
17 Correct 4 ms 596 KB Output is correct
18 Correct 4 ms 724 KB Output is correct
19 Correct 4 ms 688 KB Output is correct
20 Correct 5 ms 724 KB Output is correct
21 Correct 4 ms 596 KB Output is correct
22 Correct 4 ms 596 KB Output is correct
23 Correct 4 ms 716 KB Output is correct
24 Correct 5 ms 744 KB Output is correct
25 Correct 3 ms 468 KB Output is correct
26 Correct 3 ms 468 KB Output is correct
27 Correct 5 ms 596 KB Output is correct
28 Correct 4 ms 596 KB Output is correct
29 Correct 4 ms 596 KB Output is correct
30 Correct 4 ms 724 KB Output is correct
31 Correct 5 ms 596 KB Output is correct
32 Correct 5 ms 596 KB Output is correct
33 Correct 3 ms 596 KB Output is correct
34 Correct 3 ms 596 KB Output is correct
35 Correct 4 ms 596 KB Output is correct
36 Correct 4 ms 584 KB Output is correct
37 Correct 3 ms 632 KB Output is correct
38 Correct 4 ms 672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 153 ms 9836 KB Output is correct
2 Correct 161 ms 10180 KB Output is correct
3 Correct 155 ms 9916 KB Output is correct
4 Correct 159 ms 10076 KB Output is correct
5 Correct 164 ms 10252 KB Output is correct
6 Correct 158 ms 10204 KB Output is correct
7 Correct 55 ms 5592 KB Output is correct
8 Correct 60 ms 5700 KB Output is correct
9 Correct 146 ms 9660 KB Output is correct
10 Correct 161 ms 9972 KB Output is correct
11 Correct 153 ms 9800 KB Output is correct
12 Correct 158 ms 9880 KB Output is correct
13 Correct 128 ms 10084 KB Output is correct
14 Correct 152 ms 10548 KB Output is correct
15 Correct 154 ms 11044 KB Output is correct
16 Correct 153 ms 11056 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 654 ms 39124 KB Output is correct
2 Correct 557 ms 35352 KB Output is correct
3 Correct 690 ms 40776 KB Output is correct
4 Correct 511 ms 35960 KB Output is correct
5 Correct 492 ms 36240 KB Output is correct
6 Correct 699 ms 41704 KB Output is correct
7 Correct 255 ms 22464 KB Output is correct
8 Correct 265 ms 22508 KB Output is correct
9 Correct 645 ms 42456 KB Output is correct
10 Correct 658 ms 42380 KB Output is correct
11 Correct 676 ms 37828 KB Output is correct
12 Correct 677 ms 40992 KB Output is correct
13 Correct 680 ms 38056 KB Output is correct
14 Correct 719 ms 40952 KB Output is correct
15 Correct 756 ms 40896 KB Output is correct
16 Correct 748 ms 40760 KB Output is correct
17 Correct 739 ms 40780 KB Output is correct
18 Correct 701 ms 39416 KB Output is correct
19 Correct 717 ms 40864 KB Output is correct
20 Correct 729 ms 39636 KB Output is correct
21 Correct 751 ms 40808 KB Output is correct
22 Correct 759 ms 40888 KB Output is correct
23 Correct 732 ms 40900 KB Output is correct
24 Correct 733 ms 40744 KB Output is correct
25 Correct 590 ms 40412 KB Output is correct
26 Correct 579 ms 40640 KB Output is correct
27 Correct 642 ms 40036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 596 KB Output is correct
2 Correct 4 ms 596 KB Output is correct
3 Correct 3 ms 596 KB Output is correct
4 Correct 4 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 2 ms 468 KB Output is correct
7 Correct 4 ms 596 KB Output is correct
8 Correct 4 ms 628 KB Output is correct
9 Correct 4 ms 596 KB Output is correct
10 Correct 4 ms 716 KB Output is correct
11 Correct 4 ms 596 KB Output is correct
12 Correct 4 ms 596 KB Output is correct
13 Correct 2 ms 584 KB Output is correct
14 Correct 4 ms 724 KB Output is correct
15 Correct 3 ms 596 KB Output is correct
16 Correct 4 ms 568 KB Output is correct
17 Correct 4 ms 596 KB Output is correct
18 Correct 4 ms 724 KB Output is correct
19 Correct 4 ms 688 KB Output is correct
20 Correct 5 ms 724 KB Output is correct
21 Correct 153 ms 9836 KB Output is correct
22 Correct 161 ms 10180 KB Output is correct
23 Correct 155 ms 9916 KB Output is correct
24 Correct 159 ms 10076 KB Output is correct
25 Correct 164 ms 10252 KB Output is correct
26 Correct 158 ms 10204 KB Output is correct
27 Correct 55 ms 5592 KB Output is correct
28 Correct 60 ms 5700 KB Output is correct
29 Correct 146 ms 9660 KB Output is correct
30 Correct 161 ms 9972 KB Output is correct
31 Correct 153 ms 9800 KB Output is correct
32 Correct 158 ms 9880 KB Output is correct
33 Correct 128 ms 10084 KB Output is correct
34 Correct 152 ms 10548 KB Output is correct
35 Correct 154 ms 11044 KB Output is correct
36 Correct 153 ms 11056 KB Output is correct
37 Correct 129 ms 9756 KB Output is correct
38 Correct 118 ms 9620 KB Output is correct
39 Correct 44 ms 4936 KB Output is correct
40 Correct 54 ms 5448 KB Output is correct
41 Correct 138 ms 9596 KB Output is correct
42 Correct 143 ms 10288 KB Output is correct
43 Correct 159 ms 10252 KB Output is correct
44 Correct 148 ms 10004 KB Output is correct
45 Correct 140 ms 10244 KB Output is correct
46 Correct 149 ms 10252 KB Output is correct
47 Correct 73 ms 10060 KB Output is correct
48 Correct 135 ms 10264 KB Output is correct
49 Correct 120 ms 8896 KB Output is correct
50 Correct 148 ms 9544 KB Output is correct
51 Correct 176 ms 10372 KB Output is correct
52 Correct 179 ms 10312 KB Output is correct
53 Correct 121 ms 9832 KB Output is correct
54 Correct 163 ms 10988 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 128 ms 10736 KB Output is correct
2 Correct 148 ms 11268 KB Output is correct
3 Correct 143 ms 11360 KB Output is correct
4 Correct 107 ms 9672 KB Output is correct
5 Correct 123 ms 10488 KB Output is correct
6 Correct 148 ms 11320 KB Output is correct
7 Correct 74 ms 6224 KB Output is correct
8 Correct 71 ms 5968 KB Output is correct
9 Correct 107 ms 11232 KB Output is correct
10 Correct 99 ms 9556 KB Output is correct
11 Correct 144 ms 11344 KB Output is correct
12 Correct 140 ms 11248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 596 KB Output is correct
2 Correct 4 ms 596 KB Output is correct
3 Correct 3 ms 596 KB Output is correct
4 Correct 4 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 2 ms 468 KB Output is correct
7 Correct 4 ms 596 KB Output is correct
8 Correct 4 ms 628 KB Output is correct
9 Correct 4 ms 596 KB Output is correct
10 Correct 4 ms 716 KB Output is correct
11 Correct 4 ms 596 KB Output is correct
12 Correct 4 ms 596 KB Output is correct
13 Correct 2 ms 584 KB Output is correct
14 Correct 4 ms 724 KB Output is correct
15 Correct 3 ms 596 KB Output is correct
16 Correct 4 ms 568 KB Output is correct
17 Correct 4 ms 596 KB Output is correct
18 Correct 4 ms 724 KB Output is correct
19 Correct 4 ms 688 KB Output is correct
20 Correct 5 ms 724 KB Output is correct
21 Correct 4 ms 596 KB Output is correct
22 Correct 4 ms 596 KB Output is correct
23 Correct 4 ms 716 KB Output is correct
24 Correct 5 ms 744 KB Output is correct
25 Correct 3 ms 468 KB Output is correct
26 Correct 3 ms 468 KB Output is correct
27 Correct 5 ms 596 KB Output is correct
28 Correct 4 ms 596 KB Output is correct
29 Correct 4 ms 596 KB Output is correct
30 Correct 4 ms 724 KB Output is correct
31 Correct 5 ms 596 KB Output is correct
32 Correct 5 ms 596 KB Output is correct
33 Correct 3 ms 596 KB Output is correct
34 Correct 3 ms 596 KB Output is correct
35 Correct 4 ms 596 KB Output is correct
36 Correct 4 ms 584 KB Output is correct
37 Correct 3 ms 632 KB Output is correct
38 Correct 4 ms 672 KB Output is correct
39 Correct 153 ms 9836 KB Output is correct
40 Correct 161 ms 10180 KB Output is correct
41 Correct 155 ms 9916 KB Output is correct
42 Correct 159 ms 10076 KB Output is correct
43 Correct 164 ms 10252 KB Output is correct
44 Correct 158 ms 10204 KB Output is correct
45 Correct 55 ms 5592 KB Output is correct
46 Correct 60 ms 5700 KB Output is correct
47 Correct 146 ms 9660 KB Output is correct
48 Correct 161 ms 9972 KB Output is correct
49 Correct 153 ms 9800 KB Output is correct
50 Correct 158 ms 9880 KB Output is correct
51 Correct 128 ms 10084 KB Output is correct
52 Correct 152 ms 10548 KB Output is correct
53 Correct 154 ms 11044 KB Output is correct
54 Correct 153 ms 11056 KB Output is correct
55 Correct 129 ms 9756 KB Output is correct
56 Correct 118 ms 9620 KB Output is correct
57 Correct 44 ms 4936 KB Output is correct
58 Correct 54 ms 5448 KB Output is correct
59 Correct 138 ms 9596 KB Output is correct
60 Correct 143 ms 10288 KB Output is correct
61 Correct 159 ms 10252 KB Output is correct
62 Correct 148 ms 10004 KB Output is correct
63 Correct 140 ms 10244 KB Output is correct
64 Correct 149 ms 10252 KB Output is correct
65 Correct 73 ms 10060 KB Output is correct
66 Correct 135 ms 10264 KB Output is correct
67 Correct 120 ms 8896 KB Output is correct
68 Correct 148 ms 9544 KB Output is correct
69 Correct 176 ms 10372 KB Output is correct
70 Correct 179 ms 10312 KB Output is correct
71 Correct 121 ms 9832 KB Output is correct
72 Correct 163 ms 10988 KB Output is correct
73 Correct 128 ms 10736 KB Output is correct
74 Correct 148 ms 11268 KB Output is correct
75 Correct 143 ms 11360 KB Output is correct
76 Correct 107 ms 9672 KB Output is correct
77 Correct 123 ms 10488 KB Output is correct
78 Correct 148 ms 11320 KB Output is correct
79 Correct 74 ms 6224 KB Output is correct
80 Correct 71 ms 5968 KB Output is correct
81 Correct 107 ms 11232 KB Output is correct
82 Correct 99 ms 9556 KB Output is correct
83 Correct 144 ms 11344 KB Output is correct
84 Correct 140 ms 11248 KB Output is correct
85 Correct 156 ms 10368 KB Output is correct
86 Correct 158 ms 10732 KB Output is correct
87 Correct 143 ms 10348 KB Output is correct
88 Correct 153 ms 11104 KB Output is correct
89 Correct 105 ms 8408 KB Output is correct
90 Correct 169 ms 10860 KB Output is correct
91 Correct 127 ms 9852 KB Output is correct
92 Correct 125 ms 9692 KB Output is correct
93 Correct 183 ms 10776 KB Output is correct
94 Correct 156 ms 10628 KB Output is correct
95 Correct 142 ms 10696 KB Output is correct
96 Correct 155 ms 10876 KB Output is correct
97 Correct 168 ms 10776 KB Output is correct
98 Correct 138 ms 10064 KB Output is correct
99 Correct 88 ms 10620 KB Output is correct
100 Correct 116 ms 9900 KB Output is correct
101 Correct 139 ms 10780 KB Output is correct
102 Correct 152 ms 10712 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 596 KB Output is correct
2 Correct 4 ms 596 KB Output is correct
3 Correct 3 ms 596 KB Output is correct
4 Correct 4 ms 724 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 2 ms 468 KB Output is correct
7 Correct 4 ms 596 KB Output is correct
8 Correct 4 ms 628 KB Output is correct
9 Correct 4 ms 596 KB Output is correct
10 Correct 4 ms 716 KB Output is correct
11 Correct 4 ms 596 KB Output is correct
12 Correct 4 ms 596 KB Output is correct
13 Correct 2 ms 584 KB Output is correct
14 Correct 4 ms 724 KB Output is correct
15 Correct 3 ms 596 KB Output is correct
16 Correct 4 ms 568 KB Output is correct
17 Correct 4 ms 596 KB Output is correct
18 Correct 4 ms 724 KB Output is correct
19 Correct 4 ms 688 KB Output is correct
20 Correct 5 ms 724 KB Output is correct
21 Correct 4 ms 596 KB Output is correct
22 Correct 4 ms 596 KB Output is correct
23 Correct 4 ms 716 KB Output is correct
24 Correct 5 ms 744 KB Output is correct
25 Correct 3 ms 468 KB Output is correct
26 Correct 3 ms 468 KB Output is correct
27 Correct 5 ms 596 KB Output is correct
28 Correct 4 ms 596 KB Output is correct
29 Correct 4 ms 596 KB Output is correct
30 Correct 4 ms 724 KB Output is correct
31 Correct 5 ms 596 KB Output is correct
32 Correct 5 ms 596 KB Output is correct
33 Correct 3 ms 596 KB Output is correct
34 Correct 3 ms 596 KB Output is correct
35 Correct 4 ms 596 KB Output is correct
36 Correct 4 ms 584 KB Output is correct
37 Correct 3 ms 632 KB Output is correct
38 Correct 4 ms 672 KB Output is correct
39 Correct 153 ms 9836 KB Output is correct
40 Correct 161 ms 10180 KB Output is correct
41 Correct 155 ms 9916 KB Output is correct
42 Correct 159 ms 10076 KB Output is correct
43 Correct 164 ms 10252 KB Output is correct
44 Correct 158 ms 10204 KB Output is correct
45 Correct 55 ms 5592 KB Output is correct
46 Correct 60 ms 5700 KB Output is correct
47 Correct 146 ms 9660 KB Output is correct
48 Correct 161 ms 9972 KB Output is correct
49 Correct 153 ms 9800 KB Output is correct
50 Correct 158 ms 9880 KB Output is correct
51 Correct 128 ms 10084 KB Output is correct
52 Correct 152 ms 10548 KB Output is correct
53 Correct 154 ms 11044 KB Output is correct
54 Correct 153 ms 11056 KB Output is correct
55 Correct 654 ms 39124 KB Output is correct
56 Correct 557 ms 35352 KB Output is correct
57 Correct 690 ms 40776 KB Output is correct
58 Correct 511 ms 35960 KB Output is correct
59 Correct 492 ms 36240 KB Output is correct
60 Correct 699 ms 41704 KB Output is correct
61 Correct 255 ms 22464 KB Output is correct
62 Correct 265 ms 22508 KB Output is correct
63 Correct 645 ms 42456 KB Output is correct
64 Correct 658 ms 42380 KB Output is correct
65 Correct 676 ms 37828 KB Output is correct
66 Correct 677 ms 40992 KB Output is correct
67 Correct 680 ms 38056 KB Output is correct
68 Correct 719 ms 40952 KB Output is correct
69 Correct 756 ms 40896 KB Output is correct
70 Correct 748 ms 40760 KB Output is correct
71 Correct 739 ms 40780 KB Output is correct
72 Correct 701 ms 39416 KB Output is correct
73 Correct 717 ms 40864 KB Output is correct
74 Correct 729 ms 39636 KB Output is correct
75 Correct 751 ms 40808 KB Output is correct
76 Correct 759 ms 40888 KB Output is correct
77 Correct 732 ms 40900 KB Output is correct
78 Correct 733 ms 40744 KB Output is correct
79 Correct 590 ms 40412 KB Output is correct
80 Correct 579 ms 40640 KB Output is correct
81 Correct 642 ms 40036 KB Output is correct
82 Correct 129 ms 9756 KB Output is correct
83 Correct 118 ms 9620 KB Output is correct
84 Correct 44 ms 4936 KB Output is correct
85 Correct 54 ms 5448 KB Output is correct
86 Correct 138 ms 9596 KB Output is correct
87 Correct 143 ms 10288 KB Output is correct
88 Correct 159 ms 10252 KB Output is correct
89 Correct 148 ms 10004 KB Output is correct
90 Correct 140 ms 10244 KB Output is correct
91 Correct 149 ms 10252 KB Output is correct
92 Correct 73 ms 10060 KB Output is correct
93 Correct 135 ms 10264 KB Output is correct
94 Correct 120 ms 8896 KB Output is correct
95 Correct 148 ms 9544 KB Output is correct
96 Correct 176 ms 10372 KB Output is correct
97 Correct 179 ms 10312 KB Output is correct
98 Correct 121 ms 9832 KB Output is correct
99 Correct 163 ms 10988 KB Output is correct
100 Correct 128 ms 10736 KB Output is correct
101 Correct 148 ms 11268 KB Output is correct
102 Correct 143 ms 11360 KB Output is correct
103 Correct 107 ms 9672 KB Output is correct
104 Correct 123 ms 10488 KB Output is correct
105 Correct 148 ms 11320 KB Output is correct
106 Correct 74 ms 6224 KB Output is correct
107 Correct 71 ms 5968 KB Output is correct
108 Correct 107 ms 11232 KB Output is correct
109 Correct 99 ms 9556 KB Output is correct
110 Correct 144 ms 11344 KB Output is correct
111 Correct 140 ms 11248 KB Output is correct
112 Correct 156 ms 10368 KB Output is correct
113 Correct 158 ms 10732 KB Output is correct
114 Correct 143 ms 10348 KB Output is correct
115 Correct 153 ms 11104 KB Output is correct
116 Correct 105 ms 8408 KB Output is correct
117 Correct 169 ms 10860 KB Output is correct
118 Correct 127 ms 9852 KB Output is correct
119 Correct 125 ms 9692 KB Output is correct
120 Correct 183 ms 10776 KB Output is correct
121 Correct 156 ms 10628 KB Output is correct
122 Correct 142 ms 10696 KB Output is correct
123 Correct 155 ms 10876 KB Output is correct
124 Correct 168 ms 10776 KB Output is correct
125 Correct 138 ms 10064 KB Output is correct
126 Correct 88 ms 10620 KB Output is correct
127 Correct 116 ms 9900 KB Output is correct
128 Correct 139 ms 10780 KB Output is correct
129 Correct 152 ms 10712 KB Output is correct
130 Correct 743 ms 41292 KB Output is correct
131 Correct 513 ms 35772 KB Output is correct
132 Correct 773 ms 41280 KB Output is correct
133 Correct 702 ms 41540 KB Output is correct
134 Correct 608 ms 39440 KB Output is correct
135 Correct 729 ms 42476 KB Output is correct
136 Correct 681 ms 43204 KB Output is correct
137 Correct 685 ms 43300 KB Output is correct
138 Correct 692 ms 38464 KB Output is correct
139 Correct 739 ms 41596 KB Output is correct
140 Correct 738 ms 39276 KB Output is correct
141 Correct 707 ms 41412 KB Output is correct
142 Correct 709 ms 41452 KB Output is correct
143 Correct 756 ms 41312 KB Output is correct
144 Correct 717 ms 40016 KB Output is correct
145 Correct 738 ms 41468 KB Output is correct
146 Correct 804 ms 40476 KB Output is correct
147 Correct 785 ms 41332 KB Output is correct
148 Correct 757 ms 41400 KB Output is correct
149 Correct 752 ms 41476 KB Output is correct
150 Correct 378 ms 40708 KB Output is correct
151 Correct 603 ms 41012 KB Output is correct
152 Correct 609 ms 41152 KB Output is correct
153 Correct 668 ms 40904 KB Output is correct