#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define ull unsigned long long
#define pb push_back
#define pll pair<int, pii>
#define pii pair<ll, int>
#define fi first
#define se second
using namespace std;
const int N = 3e5+2;
const int M = 60;
const int mod = 1e9+7;
const ll base = 1e6;
const ll inf = 1e9;
int n, m, b[N], a[N], k, t, d[N], cnt, par[N];
ll ans, tong;
vector<int> adj[N];
vector<pii> add[N], itadd[N], query[N];
bool vis[N], ok;
struct node
{
ll sum, suf;
node()
{
sum = 0;
suf = 0;
}
node(ll _sum, ll _suf)
{
sum = _sum;
suf = _suf;
}
};
node merga(node x, node y)
{
node res;
res.sum = x.sum+y.sum;
res.suf = max(x.suf+y.sum, y.suf);
return res;
}
struct IT
{
int n;
vector<node> st;
IT(int _n)
{
n = _n;
st.resize(n*4+4);
}
void build(int id, int l, int r, int pos, ll x)
{
if(l == r)
{
st[id] = node(x, x);
return;
}
int mid = (l+r)>>1;
if(pos <= mid)build(id<<1, l, mid, pos, x);
else build(id<<1|1, mid+1, r, pos, x);
st[id] = merga(st[id<<1], st[id<<1|1]);
}
void build(int pos, ll x)
{
build(1, 1, n, pos, x);
}
node get(int id, int l, int r, int u, int v)
{
if(u <= l && r <= v)return st[id];
if(u > r || l > v)return node(0, 0);
int mid = (l+r)>>1;
return merga(get(id<<1, l, mid, u, v), get(id<<1|1, mid+1, r, u, v));
}
node get(int l, int r)
{
return get(1, 1, n, l, r);
}
};
struct BIT
{
int n;
vector<ll> fe;
BIT(int _n)
{
n = _n;
fe.resize(n+1, 0);
}
void add(int id, ll x)
{
for(; id <= n; id += id & -id)fe[id] += x;
}
ll get(int id)
{
ll total = 0;
for(; id; id -= id & -id)total += fe[id];
return total;
}
int getK(ll v)
{
int pos = 0;
for(int j = 18; j >= 0; j --)
{
pos += (1<<j);
if(pos <= n && fe[pos] < v)v -= fe[pos];
else pos -= (1<<j);
}
return pos+1;
}
};
void sol()
{
cin >> n >> m >> k;
for(int i = 1; i <= k; i ++)
{
a[i] = -1;
cin >> t;
if(t == 1)
{
int li, ri, ci;
ll ki;
cin >> li >> ri >> ci >> ki;
add[li].pb({ki, i});
add[ri+1].pb({-ki, i});
itadd[li].pb({ki, i});
itadd[ri+1].pb({0, i});
d[i] = ci;
}
else if(t == 2)
{
int li, ri;
ll ki;
cin >> li >> ri >> ki;
itadd[li].pb({-ki, i});
itadd[ri+1].pb({0, i});
}
else
{
int li;
ll ki;
cin >> li >> ki;
query[li].pb({ki, i});
}
}
IT it(k);
BIT bit(k);
for(int i = 1; i <= n; i ++)
{
for(pii x: add[i])bit.add(x.se, x.fi);
for(pii x: itadd[i])
{
//cout << x.se <<" "<<x.fi<<" "<<i<<'\n';
it.build(x.se, x.fi);
}
for(pii x: query[i])
{
ans = it.get(1, x.se).suf;
if(ans < x.fi)a[x.se] = 0;
else a[x.se] = d[bit.getK(bit.get(x.se)-(ans-x.fi))];
}
}
for(int i = 1; i <= k; i ++)if(a[i] != -1)cout << a[i]<<'\n';
}
int main()
{
cin.tie(0);
cout.tie(0);
ios_base::sync_with_stdio(0);
#define task "test"
if(fopen(task".inp", "r"))
{
freopen(task".inp", "r", stdin);
freopen(task".out", "w", stdout);
}
int test = 1;
//cin >> test;
while(test -- > 0)sol();
return 0;
}
/*
2 1 6 5 4 3
*/
Compilation message
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:172:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
172 | freopen(task".inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:173:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
173 | freopen(task".out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
28756 KB |
Output is correct |
2 |
Correct |
17 ms |
28756 KB |
Output is correct |
3 |
Correct |
15 ms |
28676 KB |
Output is correct |
4 |
Correct |
17 ms |
28820 KB |
Output is correct |
5 |
Correct |
14 ms |
28756 KB |
Output is correct |
6 |
Correct |
14 ms |
28660 KB |
Output is correct |
7 |
Correct |
17 ms |
28696 KB |
Output is correct |
8 |
Correct |
15 ms |
28756 KB |
Output is correct |
9 |
Correct |
15 ms |
28808 KB |
Output is correct |
10 |
Correct |
16 ms |
28812 KB |
Output is correct |
11 |
Correct |
16 ms |
28756 KB |
Output is correct |
12 |
Correct |
15 ms |
28756 KB |
Output is correct |
13 |
Correct |
16 ms |
28680 KB |
Output is correct |
14 |
Correct |
15 ms |
28700 KB |
Output is correct |
15 |
Correct |
15 ms |
28628 KB |
Output is correct |
16 |
Correct |
15 ms |
28740 KB |
Output is correct |
17 |
Correct |
15 ms |
28664 KB |
Output is correct |
18 |
Correct |
14 ms |
28812 KB |
Output is correct |
19 |
Correct |
15 ms |
28756 KB |
Output is correct |
20 |
Correct |
15 ms |
28756 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
28756 KB |
Output is correct |
2 |
Correct |
17 ms |
28756 KB |
Output is correct |
3 |
Correct |
15 ms |
28676 KB |
Output is correct |
4 |
Correct |
17 ms |
28820 KB |
Output is correct |
5 |
Correct |
14 ms |
28756 KB |
Output is correct |
6 |
Correct |
14 ms |
28660 KB |
Output is correct |
7 |
Correct |
17 ms |
28696 KB |
Output is correct |
8 |
Correct |
15 ms |
28756 KB |
Output is correct |
9 |
Correct |
15 ms |
28808 KB |
Output is correct |
10 |
Correct |
16 ms |
28812 KB |
Output is correct |
11 |
Correct |
16 ms |
28756 KB |
Output is correct |
12 |
Correct |
15 ms |
28756 KB |
Output is correct |
13 |
Correct |
16 ms |
28680 KB |
Output is correct |
14 |
Correct |
15 ms |
28700 KB |
Output is correct |
15 |
Correct |
15 ms |
28628 KB |
Output is correct |
16 |
Correct |
15 ms |
28740 KB |
Output is correct |
17 |
Correct |
15 ms |
28664 KB |
Output is correct |
18 |
Correct |
14 ms |
28812 KB |
Output is correct |
19 |
Correct |
15 ms |
28756 KB |
Output is correct |
20 |
Correct |
15 ms |
28756 KB |
Output is correct |
21 |
Correct |
16 ms |
28756 KB |
Output is correct |
22 |
Correct |
19 ms |
28724 KB |
Output is correct |
23 |
Correct |
25 ms |
28748 KB |
Output is correct |
24 |
Correct |
17 ms |
28784 KB |
Output is correct |
25 |
Correct |
16 ms |
28720 KB |
Output is correct |
26 |
Correct |
15 ms |
28780 KB |
Output is correct |
27 |
Correct |
16 ms |
28784 KB |
Output is correct |
28 |
Correct |
16 ms |
28756 KB |
Output is correct |
29 |
Correct |
16 ms |
28772 KB |
Output is correct |
30 |
Correct |
17 ms |
28780 KB |
Output is correct |
31 |
Correct |
16 ms |
28756 KB |
Output is correct |
32 |
Correct |
16 ms |
28808 KB |
Output is correct |
33 |
Correct |
15 ms |
28712 KB |
Output is correct |
34 |
Correct |
18 ms |
28756 KB |
Output is correct |
35 |
Correct |
16 ms |
28776 KB |
Output is correct |
36 |
Correct |
16 ms |
28832 KB |
Output is correct |
37 |
Correct |
16 ms |
28692 KB |
Output is correct |
38 |
Correct |
17 ms |
28832 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
74 ms |
37636 KB |
Output is correct |
2 |
Correct |
79 ms |
38268 KB |
Output is correct |
3 |
Correct |
86 ms |
37644 KB |
Output is correct |
4 |
Correct |
99 ms |
37680 KB |
Output is correct |
5 |
Correct |
80 ms |
38256 KB |
Output is correct |
6 |
Correct |
78 ms |
38280 KB |
Output is correct |
7 |
Correct |
40 ms |
35580 KB |
Output is correct |
8 |
Correct |
40 ms |
36184 KB |
Output is correct |
9 |
Correct |
76 ms |
37832 KB |
Output is correct |
10 |
Correct |
89 ms |
37836 KB |
Output is correct |
11 |
Correct |
82 ms |
37892 KB |
Output is correct |
12 |
Correct |
77 ms |
37892 KB |
Output is correct |
13 |
Correct |
78 ms |
37192 KB |
Output is correct |
14 |
Correct |
91 ms |
38348 KB |
Output is correct |
15 |
Correct |
99 ms |
39440 KB |
Output is correct |
16 |
Correct |
92 ms |
39512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
372 ms |
66300 KB |
Output is correct |
2 |
Correct |
301 ms |
58744 KB |
Output is correct |
3 |
Correct |
406 ms |
69960 KB |
Output is correct |
4 |
Correct |
318 ms |
60460 KB |
Output is correct |
5 |
Correct |
306 ms |
60888 KB |
Output is correct |
6 |
Correct |
456 ms |
72416 KB |
Output is correct |
7 |
Correct |
143 ms |
63464 KB |
Output is correct |
8 |
Correct |
149 ms |
63980 KB |
Output is correct |
9 |
Correct |
410 ms |
71116 KB |
Output is correct |
10 |
Correct |
401 ms |
71060 KB |
Output is correct |
11 |
Correct |
419 ms |
70300 KB |
Output is correct |
12 |
Correct |
395 ms |
70736 KB |
Output is correct |
13 |
Correct |
406 ms |
70460 KB |
Output is correct |
14 |
Correct |
419 ms |
70688 KB |
Output is correct |
15 |
Correct |
406 ms |
70656 KB |
Output is correct |
16 |
Correct |
455 ms |
70828 KB |
Output is correct |
17 |
Correct |
434 ms |
70732 KB |
Output is correct |
18 |
Correct |
424 ms |
70648 KB |
Output is correct |
19 |
Correct |
433 ms |
70732 KB |
Output is correct |
20 |
Correct |
433 ms |
70732 KB |
Output is correct |
21 |
Correct |
424 ms |
70748 KB |
Output is correct |
22 |
Correct |
436 ms |
70624 KB |
Output is correct |
23 |
Correct |
411 ms |
70716 KB |
Output is correct |
24 |
Correct |
427 ms |
70704 KB |
Output is correct |
25 |
Correct |
271 ms |
68864 KB |
Output is correct |
26 |
Correct |
290 ms |
69796 KB |
Output is correct |
27 |
Correct |
338 ms |
74572 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
28756 KB |
Output is correct |
2 |
Correct |
17 ms |
28756 KB |
Output is correct |
3 |
Correct |
15 ms |
28676 KB |
Output is correct |
4 |
Correct |
17 ms |
28820 KB |
Output is correct |
5 |
Correct |
14 ms |
28756 KB |
Output is correct |
6 |
Correct |
14 ms |
28660 KB |
Output is correct |
7 |
Correct |
17 ms |
28696 KB |
Output is correct |
8 |
Correct |
15 ms |
28756 KB |
Output is correct |
9 |
Correct |
15 ms |
28808 KB |
Output is correct |
10 |
Correct |
16 ms |
28812 KB |
Output is correct |
11 |
Correct |
16 ms |
28756 KB |
Output is correct |
12 |
Correct |
15 ms |
28756 KB |
Output is correct |
13 |
Correct |
16 ms |
28680 KB |
Output is correct |
14 |
Correct |
15 ms |
28700 KB |
Output is correct |
15 |
Correct |
15 ms |
28628 KB |
Output is correct |
16 |
Correct |
15 ms |
28740 KB |
Output is correct |
17 |
Correct |
15 ms |
28664 KB |
Output is correct |
18 |
Correct |
14 ms |
28812 KB |
Output is correct |
19 |
Correct |
15 ms |
28756 KB |
Output is correct |
20 |
Correct |
15 ms |
28756 KB |
Output is correct |
21 |
Correct |
74 ms |
37636 KB |
Output is correct |
22 |
Correct |
79 ms |
38268 KB |
Output is correct |
23 |
Correct |
86 ms |
37644 KB |
Output is correct |
24 |
Correct |
99 ms |
37680 KB |
Output is correct |
25 |
Correct |
80 ms |
38256 KB |
Output is correct |
26 |
Correct |
78 ms |
38280 KB |
Output is correct |
27 |
Correct |
40 ms |
35580 KB |
Output is correct |
28 |
Correct |
40 ms |
36184 KB |
Output is correct |
29 |
Correct |
76 ms |
37832 KB |
Output is correct |
30 |
Correct |
89 ms |
37836 KB |
Output is correct |
31 |
Correct |
82 ms |
37892 KB |
Output is correct |
32 |
Correct |
77 ms |
37892 KB |
Output is correct |
33 |
Correct |
78 ms |
37192 KB |
Output is correct |
34 |
Correct |
91 ms |
38348 KB |
Output is correct |
35 |
Correct |
99 ms |
39440 KB |
Output is correct |
36 |
Correct |
92 ms |
39512 KB |
Output is correct |
37 |
Correct |
83 ms |
36736 KB |
Output is correct |
38 |
Correct |
83 ms |
36312 KB |
Output is correct |
39 |
Correct |
37 ms |
34984 KB |
Output is correct |
40 |
Correct |
42 ms |
35688 KB |
Output is correct |
41 |
Correct |
84 ms |
37836 KB |
Output is correct |
42 |
Correct |
82 ms |
37880 KB |
Output is correct |
43 |
Correct |
86 ms |
37972 KB |
Output is correct |
44 |
Correct |
86 ms |
37920 KB |
Output is correct |
45 |
Correct |
92 ms |
37976 KB |
Output is correct |
46 |
Correct |
103 ms |
37912 KB |
Output is correct |
47 |
Correct |
49 ms |
36784 KB |
Output is correct |
48 |
Correct |
61 ms |
37728 KB |
Output is correct |
49 |
Correct |
62 ms |
35180 KB |
Output is correct |
50 |
Correct |
72 ms |
36636 KB |
Output is correct |
51 |
Correct |
82 ms |
38060 KB |
Output is correct |
52 |
Correct |
93 ms |
38092 KB |
Output is correct |
53 |
Correct |
84 ms |
37092 KB |
Output is correct |
54 |
Correct |
104 ms |
39444 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
90 ms |
38664 KB |
Output is correct |
2 |
Correct |
96 ms |
39584 KB |
Output is correct |
3 |
Correct |
110 ms |
39800 KB |
Output is correct |
4 |
Correct |
68 ms |
36496 KB |
Output is correct |
5 |
Correct |
85 ms |
38252 KB |
Output is correct |
6 |
Correct |
102 ms |
39692 KB |
Output is correct |
7 |
Correct |
49 ms |
36880 KB |
Output is correct |
8 |
Correct |
44 ms |
36116 KB |
Output is correct |
9 |
Correct |
59 ms |
38320 KB |
Output is correct |
10 |
Correct |
53 ms |
36172 KB |
Output is correct |
11 |
Correct |
71 ms |
38988 KB |
Output is correct |
12 |
Correct |
94 ms |
39072 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
28756 KB |
Output is correct |
2 |
Correct |
17 ms |
28756 KB |
Output is correct |
3 |
Correct |
15 ms |
28676 KB |
Output is correct |
4 |
Correct |
17 ms |
28820 KB |
Output is correct |
5 |
Correct |
14 ms |
28756 KB |
Output is correct |
6 |
Correct |
14 ms |
28660 KB |
Output is correct |
7 |
Correct |
17 ms |
28696 KB |
Output is correct |
8 |
Correct |
15 ms |
28756 KB |
Output is correct |
9 |
Correct |
15 ms |
28808 KB |
Output is correct |
10 |
Correct |
16 ms |
28812 KB |
Output is correct |
11 |
Correct |
16 ms |
28756 KB |
Output is correct |
12 |
Correct |
15 ms |
28756 KB |
Output is correct |
13 |
Correct |
16 ms |
28680 KB |
Output is correct |
14 |
Correct |
15 ms |
28700 KB |
Output is correct |
15 |
Correct |
15 ms |
28628 KB |
Output is correct |
16 |
Correct |
15 ms |
28740 KB |
Output is correct |
17 |
Correct |
15 ms |
28664 KB |
Output is correct |
18 |
Correct |
14 ms |
28812 KB |
Output is correct |
19 |
Correct |
15 ms |
28756 KB |
Output is correct |
20 |
Correct |
15 ms |
28756 KB |
Output is correct |
21 |
Correct |
16 ms |
28756 KB |
Output is correct |
22 |
Correct |
19 ms |
28724 KB |
Output is correct |
23 |
Correct |
25 ms |
28748 KB |
Output is correct |
24 |
Correct |
17 ms |
28784 KB |
Output is correct |
25 |
Correct |
16 ms |
28720 KB |
Output is correct |
26 |
Correct |
15 ms |
28780 KB |
Output is correct |
27 |
Correct |
16 ms |
28784 KB |
Output is correct |
28 |
Correct |
16 ms |
28756 KB |
Output is correct |
29 |
Correct |
16 ms |
28772 KB |
Output is correct |
30 |
Correct |
17 ms |
28780 KB |
Output is correct |
31 |
Correct |
16 ms |
28756 KB |
Output is correct |
32 |
Correct |
16 ms |
28808 KB |
Output is correct |
33 |
Correct |
15 ms |
28712 KB |
Output is correct |
34 |
Correct |
18 ms |
28756 KB |
Output is correct |
35 |
Correct |
16 ms |
28776 KB |
Output is correct |
36 |
Correct |
16 ms |
28832 KB |
Output is correct |
37 |
Correct |
16 ms |
28692 KB |
Output is correct |
38 |
Correct |
17 ms |
28832 KB |
Output is correct |
39 |
Correct |
74 ms |
37636 KB |
Output is correct |
40 |
Correct |
79 ms |
38268 KB |
Output is correct |
41 |
Correct |
86 ms |
37644 KB |
Output is correct |
42 |
Correct |
99 ms |
37680 KB |
Output is correct |
43 |
Correct |
80 ms |
38256 KB |
Output is correct |
44 |
Correct |
78 ms |
38280 KB |
Output is correct |
45 |
Correct |
40 ms |
35580 KB |
Output is correct |
46 |
Correct |
40 ms |
36184 KB |
Output is correct |
47 |
Correct |
76 ms |
37832 KB |
Output is correct |
48 |
Correct |
89 ms |
37836 KB |
Output is correct |
49 |
Correct |
82 ms |
37892 KB |
Output is correct |
50 |
Correct |
77 ms |
37892 KB |
Output is correct |
51 |
Correct |
78 ms |
37192 KB |
Output is correct |
52 |
Correct |
91 ms |
38348 KB |
Output is correct |
53 |
Correct |
99 ms |
39440 KB |
Output is correct |
54 |
Correct |
92 ms |
39512 KB |
Output is correct |
55 |
Correct |
83 ms |
36736 KB |
Output is correct |
56 |
Correct |
83 ms |
36312 KB |
Output is correct |
57 |
Correct |
37 ms |
34984 KB |
Output is correct |
58 |
Correct |
42 ms |
35688 KB |
Output is correct |
59 |
Correct |
84 ms |
37836 KB |
Output is correct |
60 |
Correct |
82 ms |
37880 KB |
Output is correct |
61 |
Correct |
86 ms |
37972 KB |
Output is correct |
62 |
Correct |
86 ms |
37920 KB |
Output is correct |
63 |
Correct |
92 ms |
37976 KB |
Output is correct |
64 |
Correct |
103 ms |
37912 KB |
Output is correct |
65 |
Correct |
49 ms |
36784 KB |
Output is correct |
66 |
Correct |
61 ms |
37728 KB |
Output is correct |
67 |
Correct |
62 ms |
35180 KB |
Output is correct |
68 |
Correct |
72 ms |
36636 KB |
Output is correct |
69 |
Correct |
82 ms |
38060 KB |
Output is correct |
70 |
Correct |
93 ms |
38092 KB |
Output is correct |
71 |
Correct |
84 ms |
37092 KB |
Output is correct |
72 |
Correct |
104 ms |
39444 KB |
Output is correct |
73 |
Correct |
90 ms |
38664 KB |
Output is correct |
74 |
Correct |
96 ms |
39584 KB |
Output is correct |
75 |
Correct |
110 ms |
39800 KB |
Output is correct |
76 |
Correct |
68 ms |
36496 KB |
Output is correct |
77 |
Correct |
85 ms |
38252 KB |
Output is correct |
78 |
Correct |
102 ms |
39692 KB |
Output is correct |
79 |
Correct |
49 ms |
36880 KB |
Output is correct |
80 |
Correct |
44 ms |
36116 KB |
Output is correct |
81 |
Correct |
59 ms |
38320 KB |
Output is correct |
82 |
Correct |
53 ms |
36172 KB |
Output is correct |
83 |
Correct |
71 ms |
38988 KB |
Output is correct |
84 |
Correct |
94 ms |
39072 KB |
Output is correct |
85 |
Correct |
81 ms |
38216 KB |
Output is correct |
86 |
Correct |
90 ms |
39344 KB |
Output is correct |
87 |
Correct |
85 ms |
38608 KB |
Output is correct |
88 |
Correct |
102 ms |
40008 KB |
Output is correct |
89 |
Correct |
58 ms |
35884 KB |
Output is correct |
90 |
Correct |
85 ms |
39504 KB |
Output is correct |
91 |
Correct |
73 ms |
37552 KB |
Output is correct |
92 |
Correct |
77 ms |
37004 KB |
Output is correct |
93 |
Correct |
99 ms |
39568 KB |
Output is correct |
94 |
Correct |
89 ms |
39512 KB |
Output is correct |
95 |
Correct |
82 ms |
39268 KB |
Output is correct |
96 |
Correct |
95 ms |
39524 KB |
Output is correct |
97 |
Correct |
85 ms |
39492 KB |
Output is correct |
98 |
Correct |
93 ms |
37852 KB |
Output is correct |
99 |
Correct |
58 ms |
37756 KB |
Output is correct |
100 |
Correct |
56 ms |
37120 KB |
Output is correct |
101 |
Correct |
68 ms |
39268 KB |
Output is correct |
102 |
Correct |
84 ms |
40580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
28756 KB |
Output is correct |
2 |
Correct |
17 ms |
28756 KB |
Output is correct |
3 |
Correct |
15 ms |
28676 KB |
Output is correct |
4 |
Correct |
17 ms |
28820 KB |
Output is correct |
5 |
Correct |
14 ms |
28756 KB |
Output is correct |
6 |
Correct |
14 ms |
28660 KB |
Output is correct |
7 |
Correct |
17 ms |
28696 KB |
Output is correct |
8 |
Correct |
15 ms |
28756 KB |
Output is correct |
9 |
Correct |
15 ms |
28808 KB |
Output is correct |
10 |
Correct |
16 ms |
28812 KB |
Output is correct |
11 |
Correct |
16 ms |
28756 KB |
Output is correct |
12 |
Correct |
15 ms |
28756 KB |
Output is correct |
13 |
Correct |
16 ms |
28680 KB |
Output is correct |
14 |
Correct |
15 ms |
28700 KB |
Output is correct |
15 |
Correct |
15 ms |
28628 KB |
Output is correct |
16 |
Correct |
15 ms |
28740 KB |
Output is correct |
17 |
Correct |
15 ms |
28664 KB |
Output is correct |
18 |
Correct |
14 ms |
28812 KB |
Output is correct |
19 |
Correct |
15 ms |
28756 KB |
Output is correct |
20 |
Correct |
15 ms |
28756 KB |
Output is correct |
21 |
Correct |
16 ms |
28756 KB |
Output is correct |
22 |
Correct |
19 ms |
28724 KB |
Output is correct |
23 |
Correct |
25 ms |
28748 KB |
Output is correct |
24 |
Correct |
17 ms |
28784 KB |
Output is correct |
25 |
Correct |
16 ms |
28720 KB |
Output is correct |
26 |
Correct |
15 ms |
28780 KB |
Output is correct |
27 |
Correct |
16 ms |
28784 KB |
Output is correct |
28 |
Correct |
16 ms |
28756 KB |
Output is correct |
29 |
Correct |
16 ms |
28772 KB |
Output is correct |
30 |
Correct |
17 ms |
28780 KB |
Output is correct |
31 |
Correct |
16 ms |
28756 KB |
Output is correct |
32 |
Correct |
16 ms |
28808 KB |
Output is correct |
33 |
Correct |
15 ms |
28712 KB |
Output is correct |
34 |
Correct |
18 ms |
28756 KB |
Output is correct |
35 |
Correct |
16 ms |
28776 KB |
Output is correct |
36 |
Correct |
16 ms |
28832 KB |
Output is correct |
37 |
Correct |
16 ms |
28692 KB |
Output is correct |
38 |
Correct |
17 ms |
28832 KB |
Output is correct |
39 |
Correct |
74 ms |
37636 KB |
Output is correct |
40 |
Correct |
79 ms |
38268 KB |
Output is correct |
41 |
Correct |
86 ms |
37644 KB |
Output is correct |
42 |
Correct |
99 ms |
37680 KB |
Output is correct |
43 |
Correct |
80 ms |
38256 KB |
Output is correct |
44 |
Correct |
78 ms |
38280 KB |
Output is correct |
45 |
Correct |
40 ms |
35580 KB |
Output is correct |
46 |
Correct |
40 ms |
36184 KB |
Output is correct |
47 |
Correct |
76 ms |
37832 KB |
Output is correct |
48 |
Correct |
89 ms |
37836 KB |
Output is correct |
49 |
Correct |
82 ms |
37892 KB |
Output is correct |
50 |
Correct |
77 ms |
37892 KB |
Output is correct |
51 |
Correct |
78 ms |
37192 KB |
Output is correct |
52 |
Correct |
91 ms |
38348 KB |
Output is correct |
53 |
Correct |
99 ms |
39440 KB |
Output is correct |
54 |
Correct |
92 ms |
39512 KB |
Output is correct |
55 |
Correct |
372 ms |
66300 KB |
Output is correct |
56 |
Correct |
301 ms |
58744 KB |
Output is correct |
57 |
Correct |
406 ms |
69960 KB |
Output is correct |
58 |
Correct |
318 ms |
60460 KB |
Output is correct |
59 |
Correct |
306 ms |
60888 KB |
Output is correct |
60 |
Correct |
456 ms |
72416 KB |
Output is correct |
61 |
Correct |
143 ms |
63464 KB |
Output is correct |
62 |
Correct |
149 ms |
63980 KB |
Output is correct |
63 |
Correct |
410 ms |
71116 KB |
Output is correct |
64 |
Correct |
401 ms |
71060 KB |
Output is correct |
65 |
Correct |
419 ms |
70300 KB |
Output is correct |
66 |
Correct |
395 ms |
70736 KB |
Output is correct |
67 |
Correct |
406 ms |
70460 KB |
Output is correct |
68 |
Correct |
419 ms |
70688 KB |
Output is correct |
69 |
Correct |
406 ms |
70656 KB |
Output is correct |
70 |
Correct |
455 ms |
70828 KB |
Output is correct |
71 |
Correct |
434 ms |
70732 KB |
Output is correct |
72 |
Correct |
424 ms |
70648 KB |
Output is correct |
73 |
Correct |
433 ms |
70732 KB |
Output is correct |
74 |
Correct |
433 ms |
70732 KB |
Output is correct |
75 |
Correct |
424 ms |
70748 KB |
Output is correct |
76 |
Correct |
436 ms |
70624 KB |
Output is correct |
77 |
Correct |
411 ms |
70716 KB |
Output is correct |
78 |
Correct |
427 ms |
70704 KB |
Output is correct |
79 |
Correct |
271 ms |
68864 KB |
Output is correct |
80 |
Correct |
290 ms |
69796 KB |
Output is correct |
81 |
Correct |
338 ms |
74572 KB |
Output is correct |
82 |
Correct |
83 ms |
36736 KB |
Output is correct |
83 |
Correct |
83 ms |
36312 KB |
Output is correct |
84 |
Correct |
37 ms |
34984 KB |
Output is correct |
85 |
Correct |
42 ms |
35688 KB |
Output is correct |
86 |
Correct |
84 ms |
37836 KB |
Output is correct |
87 |
Correct |
82 ms |
37880 KB |
Output is correct |
88 |
Correct |
86 ms |
37972 KB |
Output is correct |
89 |
Correct |
86 ms |
37920 KB |
Output is correct |
90 |
Correct |
92 ms |
37976 KB |
Output is correct |
91 |
Correct |
103 ms |
37912 KB |
Output is correct |
92 |
Correct |
49 ms |
36784 KB |
Output is correct |
93 |
Correct |
61 ms |
37728 KB |
Output is correct |
94 |
Correct |
62 ms |
35180 KB |
Output is correct |
95 |
Correct |
72 ms |
36636 KB |
Output is correct |
96 |
Correct |
82 ms |
38060 KB |
Output is correct |
97 |
Correct |
93 ms |
38092 KB |
Output is correct |
98 |
Correct |
84 ms |
37092 KB |
Output is correct |
99 |
Correct |
104 ms |
39444 KB |
Output is correct |
100 |
Correct |
90 ms |
38664 KB |
Output is correct |
101 |
Correct |
96 ms |
39584 KB |
Output is correct |
102 |
Correct |
110 ms |
39800 KB |
Output is correct |
103 |
Correct |
68 ms |
36496 KB |
Output is correct |
104 |
Correct |
85 ms |
38252 KB |
Output is correct |
105 |
Correct |
102 ms |
39692 KB |
Output is correct |
106 |
Correct |
49 ms |
36880 KB |
Output is correct |
107 |
Correct |
44 ms |
36116 KB |
Output is correct |
108 |
Correct |
59 ms |
38320 KB |
Output is correct |
109 |
Correct |
53 ms |
36172 KB |
Output is correct |
110 |
Correct |
71 ms |
38988 KB |
Output is correct |
111 |
Correct |
94 ms |
39072 KB |
Output is correct |
112 |
Correct |
81 ms |
38216 KB |
Output is correct |
113 |
Correct |
90 ms |
39344 KB |
Output is correct |
114 |
Correct |
85 ms |
38608 KB |
Output is correct |
115 |
Correct |
102 ms |
40008 KB |
Output is correct |
116 |
Correct |
58 ms |
35884 KB |
Output is correct |
117 |
Correct |
85 ms |
39504 KB |
Output is correct |
118 |
Correct |
73 ms |
37552 KB |
Output is correct |
119 |
Correct |
77 ms |
37004 KB |
Output is correct |
120 |
Correct |
99 ms |
39568 KB |
Output is correct |
121 |
Correct |
89 ms |
39512 KB |
Output is correct |
122 |
Correct |
82 ms |
39268 KB |
Output is correct |
123 |
Correct |
95 ms |
39524 KB |
Output is correct |
124 |
Correct |
85 ms |
39492 KB |
Output is correct |
125 |
Correct |
93 ms |
37852 KB |
Output is correct |
126 |
Correct |
58 ms |
37756 KB |
Output is correct |
127 |
Correct |
56 ms |
37120 KB |
Output is correct |
128 |
Correct |
68 ms |
39268 KB |
Output is correct |
129 |
Correct |
84 ms |
40580 KB |
Output is correct |
130 |
Correct |
438 ms |
70396 KB |
Output is correct |
131 |
Correct |
297 ms |
59020 KB |
Output is correct |
132 |
Correct |
427 ms |
70352 KB |
Output is correct |
133 |
Correct |
428 ms |
71148 KB |
Output is correct |
134 |
Correct |
414 ms |
66688 KB |
Output is correct |
135 |
Correct |
466 ms |
73220 KB |
Output is correct |
136 |
Correct |
438 ms |
71996 KB |
Output is correct |
137 |
Correct |
451 ms |
71964 KB |
Output is correct |
138 |
Correct |
441 ms |
70884 KB |
Output is correct |
139 |
Correct |
416 ms |
71372 KB |
Output is correct |
140 |
Correct |
438 ms |
71024 KB |
Output is correct |
141 |
Correct |
438 ms |
71320 KB |
Output is correct |
142 |
Correct |
429 ms |
71344 KB |
Output is correct |
143 |
Correct |
445 ms |
71388 KB |
Output is correct |
144 |
Correct |
411 ms |
71116 KB |
Output is correct |
145 |
Correct |
442 ms |
71348 KB |
Output is correct |
146 |
Correct |
436 ms |
71224 KB |
Output is correct |
147 |
Correct |
420 ms |
71372 KB |
Output is correct |
148 |
Correct |
474 ms |
71304 KB |
Output is correct |
149 |
Correct |
427 ms |
71436 KB |
Output is correct |
150 |
Correct |
230 ms |
66144 KB |
Output is correct |
151 |
Correct |
284 ms |
70356 KB |
Output is correct |
152 |
Correct |
307 ms |
70496 KB |
Output is correct |
153 |
Correct |
324 ms |
75468 KB |
Output is correct |