#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define lft(x) x * 2
#define rgt(x) x * 2 + 1
#define tm hui_pizda
#define ft first
#define sd second
#define pb push_back
#define pf push_front
#define sz size()
#define cnt continue
#define m_p make_pair
#define fr(i, l, r) for(int i = l; i <= r; ++ i)
#define rf(i, r, l) for(int i = r; i >= l; -- i)
#define all(x) x.begin(), x.end()
//#pragma GCC optimize(-O3)
//#pragma GCC optimize(Ofast)
//#pragma GCC optimize("unroll-loops")
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using _set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
typedef pair <ll, ll> pll;
typedef pair <int, int> pii;
typedef vector <int> vi;
typedef vector <ll> vl;
typedef vector <pii> vpi;
typedef vector <pll> vpl;
mt19937_64 rnd(time(NULL));
const ll N = 1e6;
const ll mtrxN = 10;
const ll oo = 1e18 + 10;
const ll B = 500;
const ll mod = 1e9 + 7;
const ll B1 = 1500;
const ll B2 = 1500;
struct mtrx{
ll m[mtrxN][mtrxN] = {};
};
mtrx mtrx_mult(mtrx a, mtrx b){
mtrx c;
fr(i, 0, mtrxN - 1){
fr(j, 0, mtrxN - 1){
ll sum = 0;
fr(x, 0, mtrxN - 1){
sum += a.m[i][x] * b.m[x][j];
sum %= mod;
}
c.m[i][j] = sum;
}
}
return c;
}
mtrx mtrx_pow(mtrx a, ll n){
mtrx res;
fr(i, 0, mtrxN - 1)fr(j, 0, mtrxN - 1)res.m[i][j] = a.m[i][j];
n --;
while(n){
if(n&1)res = mtrx_mult(res, a);
a = mtrx_mult(a, a);
n >>= 1;
}
return res;
}
ll _pow(ll a, ll n){
ll r = 1;
while(n){
if(n&1)r = r * a % mod;
a = a * a % mod;
n >>= 1;
}
return r;
}
ll div(ll x, ll y, ll md){
return x * _pow(y, md - 2) % md;
}
ll lastans, last = 1, n, t, i, a, b, k, l, r, now, usd[N], mn[N], mx[N];
vpl temp, sqd1, sqd2, deleted, aded;
vl sqd3, sqd4;
pll o[N];
ll cnv(ll a){
return (t * lastans) ^ a;
}
ll get1(ll l, ll r, ll x){
ll last = 0, ans = 0;
for(ll i = B2; i < (ll)sqd1.sz; i += B2){
if(mx[i] < l || mn[i] > r);
else if(mn[i] < l && l <= mx[i] || mn[i] <= r && r < mx[i]){
//посчитать вручную
//cout << "last: " << last << " i: " << i << endl;
fr(j, last, i - 1)
if(sqd1[j].sd >= l && sqd1[j].sd <= r && sqd1[j].ft >= x)ans ++;
} else{
ll pos = lower_bound(sqd3.begin() + last, sqd3.begin() + i, x) - sqd3.begin();
ans += i - pos;
}
last = i;
}
fr(i, last, (ll)sqd1.sz - 1)
if(sqd1[i].sd >= l && sqd1[i].sd <= r && sqd1[i].ft >= x)ans ++;
return ans;
}
ll get2(ll l, ll r, ll x){
ll last = 0, ans = 0;
for(ll i = B2; i < (ll)sqd2.sz; i += B2){
if(mx[i] < l || mn[i] > r);
else if(mn[i] < l && l <= mx[i] || mn[i] <= r && r < mx[i]){
//посчитать вручную
fr(j, last, i - 1)
if(sqd2[j].sd >= l && sqd2[j].sd <= r && sqd2[j].ft >= x)ans ++;
} else{
ll pos = lower_bound(sqd4.begin() + last, sqd4.begin() + i, x) - sqd4.begin();
ans += i - pos;
}
last = i;
}
fr(i, last, (ll)sqd2.sz - 1)
if(sqd2[i].sd >= l && sqd2[i].sd <= r && sqd2[i].ft >= x)ans ++;
return ans;
}
int main(){
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> n >> t;
fr(tr, 1, n){
cin >> i;
if(i == 1){
cin >> a >> b;
l = cnv(a);
r = cnv(b);
if(l > r)swap(l, r);
o[++ now] = {l, r};
aded.pb({l, r});
}
if(i == 2){
ll d;
cin >> d;
//удалить отрезок l..r
usd[d] = 1;
deleted.pb({o[d].ft, o[d].sd});
}
if(i == 3){
cin >> a >> b >> k;
l = cnv(a);
r = cnv(b);
if(l > r)swap(l, r);
//(кол-во чисел с li 1..l - 1 и ri >= l + k - 1) + (кол-во чисел с li l..r - k + 1 и ri - li + 1)
//пройтись по накопленному вектору отрезков
lastans = 0;
for(auto i : aded)
if(i.ft < l && i.sd >= l + k - 1 || i.ft >= l && i.ft <= r - k + 1 && i.sd - i.ft + 1 >= k)lastans ++;
for(auto i : deleted)
if(i.ft < l && i.sd >= l + k - 1 || i.ft >= l && i.ft <= r - k + 1 && i.sd - i.ft + 1 >= k)lastans --;
//взять ответ из посчитанной ранее sqrtdecompompozition
lastans += get1(1, l - 1, l + k - 1);
lastans += get2(l, r - k + 1, k);
// cout << " ";
cout << lastans << "\n";
}
if(tr % B1 == 0){
temp.clear();
fr(i, 1, now){
if(usd[i])cnt;
temp.pb(o[i]);
}
sort(temp.begin(), temp.end());
vpl temp2, temp3;
aded.clear();
deleted.clear();
sqd1.clear();
sqd2.clear();
sqd3.clear();
sqd4.clear();
ll n = oo, x = -oo;
fr(i, 0, (ll)temp.sz - 1){
if(i != 0 && i % B2 == 0){
mn[i] = n, mx[i] = x;
sort(temp2.begin(), temp2.end());
sort(temp3.begin(), temp3.end());
for(auto i : temp2)sqd1.pb(i), sqd3.pb(i.ft);
for(auto i : temp3)sqd2.pb(i), sqd4.pb(i.ft);
n = oo, x = -oo;
temp2.clear();
temp3.clear();
}
temp2.pb({temp[i].sd, temp[i].ft});
temp3.pb({temp[i].sd - temp[i].ft + 1, temp[i].ft});
n = min(n, temp[i].ft);
x = max(x, temp[i].ft);
}
sort(temp2.begin(), temp2.end());
sort(temp3.begin(), temp3.end());
for(auto i : temp2)sqd1.pb(i), sqd3.pb(i.ft);
for(auto i : temp3)sqd2.pb(i), sqd4.pb(i.ft);
last = now + 1;
}
}
return 0;
}
/*
*/
Compilation message
segments.cpp: In function 'll get1(ll, ll, ll)':
segments.cpp:103:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
else if(mn[i] < l && l <= mx[i] || mn[i] <= r && r < mx[i]){
~~~~~~~~~~^~~~~~~~~~~~~
segments.cpp: In function 'll get2(ll, ll, ll)':
segments.cpp:123:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
else if(mn[i] < l && l <= mx[i] || mn[i] <= r && r < mx[i]){
~~~~~~~~~~^~~~~~~~~~~~~
segments.cpp: In function 'int main()':
segments.cpp:171:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(i.ft < l && i.sd >= l + k - 1 || i.ft >= l && i.ft <= r - k + 1 && i.sd - i.ft + 1 >= k)lastans ++;
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
segments.cpp:173:29: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(i.ft < l && i.sd >= l + k - 1 || i.ft >= l && i.ft <= r - k + 1 && i.sd - i.ft + 1 >= k)lastans --;
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Correct |
11 ms |
400 KB |
Output is correct |
3 |
Correct |
13 ms |
548 KB |
Output is correct |
4 |
Correct |
10 ms |
504 KB |
Output is correct |
5 |
Correct |
22 ms |
1144 KB |
Output is correct |
6 |
Correct |
28 ms |
1016 KB |
Output is correct |
7 |
Correct |
16 ms |
632 KB |
Output is correct |
8 |
Correct |
18 ms |
888 KB |
Output is correct |
9 |
Correct |
16 ms |
888 KB |
Output is correct |
10 |
Correct |
9 ms |
1272 KB |
Output is correct |
11 |
Correct |
39 ms |
892 KB |
Output is correct |
12 |
Correct |
39 ms |
1016 KB |
Output is correct |
13 |
Correct |
11 ms |
1272 KB |
Output is correct |
14 |
Correct |
19 ms |
888 KB |
Output is correct |
15 |
Correct |
9 ms |
504 KB |
Output is correct |
16 |
Correct |
10 ms |
504 KB |
Output is correct |
17 |
Correct |
20 ms |
760 KB |
Output is correct |
18 |
Correct |
13 ms |
1016 KB |
Output is correct |
19 |
Correct |
18 ms |
888 KB |
Output is correct |
20 |
Correct |
18 ms |
760 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1719 ms |
7400 KB |
Output is correct |
2 |
Correct |
1715 ms |
7196 KB |
Output is correct |
3 |
Correct |
1723 ms |
7116 KB |
Output is correct |
4 |
Correct |
1704 ms |
7492 KB |
Output is correct |
5 |
Correct |
1020 ms |
10780 KB |
Output is correct |
6 |
Correct |
944 ms |
10848 KB |
Output is correct |
7 |
Correct |
1737 ms |
7152 KB |
Output is correct |
8 |
Correct |
1711 ms |
7252 KB |
Output is correct |
9 |
Correct |
1712 ms |
7136 KB |
Output is correct |
10 |
Correct |
1913 ms |
4576 KB |
Output is correct |
11 |
Correct |
1774 ms |
5096 KB |
Output is correct |
12 |
Correct |
1558 ms |
9360 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
197 ms |
2524 KB |
Output is correct |
2 |
Correct |
169 ms |
2492 KB |
Output is correct |
3 |
Correct |
261 ms |
2772 KB |
Output is correct |
4 |
Correct |
173 ms |
2424 KB |
Output is correct |
5 |
Correct |
1483 ms |
9612 KB |
Output is correct |
6 |
Correct |
1642 ms |
8300 KB |
Output is correct |
7 |
Correct |
1580 ms |
9400 KB |
Output is correct |
8 |
Correct |
1014 ms |
11104 KB |
Output is correct |
9 |
Correct |
954 ms |
11596 KB |
Output is correct |
10 |
Correct |
1067 ms |
9044 KB |
Output is correct |
11 |
Correct |
638 ms |
3084 KB |
Output is correct |
12 |
Correct |
1069 ms |
9644 KB |
Output is correct |
13 |
Correct |
1020 ms |
8464 KB |
Output is correct |
14 |
Correct |
933 ms |
5340 KB |
Output is correct |
15 |
Correct |
880 ms |
5008 KB |
Output is correct |
16 |
Correct |
767 ms |
4380 KB |
Output is correct |
17 |
Correct |
1729 ms |
7440 KB |
Output is correct |
18 |
Correct |
1733 ms |
7472 KB |
Output is correct |
19 |
Correct |
1746 ms |
7612 KB |
Output is correct |
20 |
Correct |
1731 ms |
7540 KB |
Output is correct |
21 |
Correct |
708 ms |
3224 KB |
Output is correct |
22 |
Correct |
1077 ms |
6680 KB |
Output is correct |
23 |
Correct |
1074 ms |
7688 KB |
Output is correct |
24 |
Correct |
1084 ms |
6748 KB |
Output is correct |
25 |
Correct |
204 ms |
2552 KB |
Output is correct |
26 |
Correct |
178 ms |
2680 KB |
Output is correct |
27 |
Correct |
202 ms |
2484 KB |
Output is correct |
28 |
Correct |
183 ms |
2552 KB |
Output is correct |
29 |
Correct |
1083 ms |
8124 KB |
Output is correct |
30 |
Correct |
1086 ms |
8056 KB |
Output is correct |
31 |
Correct |
951 ms |
11524 KB |
Output is correct |
32 |
Correct |
1061 ms |
8996 KB |
Output is correct |
33 |
Correct |
1034 ms |
8596 KB |
Output is correct |
34 |
Correct |
854 ms |
5060 KB |
Output is correct |
35 |
Correct |
1067 ms |
7520 KB |
Output is correct |
36 |
Correct |
1044 ms |
8796 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
170 ms |
2424 KB |
Output is correct |
2 |
Correct |
176 ms |
2824 KB |
Output is correct |
3 |
Correct |
175 ms |
2716 KB |
Output is correct |
4 |
Correct |
185 ms |
2736 KB |
Output is correct |
5 |
Correct |
1356 ms |
10124 KB |
Output is correct |
6 |
Correct |
1709 ms |
4152 KB |
Output is correct |
7 |
Correct |
1258 ms |
10596 KB |
Output is correct |
8 |
Correct |
1894 ms |
4884 KB |
Output is correct |
9 |
Correct |
1043 ms |
6684 KB |
Output is correct |
10 |
Correct |
1063 ms |
10236 KB |
Output is correct |
11 |
Correct |
865 ms |
4340 KB |
Output is correct |
12 |
Correct |
910 ms |
11900 KB |
Output is correct |
13 |
Correct |
1056 ms |
8652 KB |
Output is correct |
14 |
Correct |
941 ms |
5868 KB |
Output is correct |
15 |
Correct |
1002 ms |
11616 KB |
Output is correct |
16 |
Correct |
1052 ms |
8820 KB |
Output is correct |
17 |
Correct |
1725 ms |
7620 KB |
Output is correct |
18 |
Correct |
1718 ms |
7580 KB |
Output is correct |
19 |
Correct |
1785 ms |
7572 KB |
Output is correct |
20 |
Correct |
1717 ms |
7524 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Correct |
11 ms |
400 KB |
Output is correct |
3 |
Correct |
13 ms |
548 KB |
Output is correct |
4 |
Correct |
10 ms |
504 KB |
Output is correct |
5 |
Correct |
22 ms |
1144 KB |
Output is correct |
6 |
Correct |
28 ms |
1016 KB |
Output is correct |
7 |
Correct |
16 ms |
632 KB |
Output is correct |
8 |
Correct |
18 ms |
888 KB |
Output is correct |
9 |
Correct |
16 ms |
888 KB |
Output is correct |
10 |
Correct |
9 ms |
1272 KB |
Output is correct |
11 |
Correct |
39 ms |
892 KB |
Output is correct |
12 |
Correct |
39 ms |
1016 KB |
Output is correct |
13 |
Correct |
11 ms |
1272 KB |
Output is correct |
14 |
Correct |
19 ms |
888 KB |
Output is correct |
15 |
Correct |
9 ms |
504 KB |
Output is correct |
16 |
Correct |
10 ms |
504 KB |
Output is correct |
17 |
Correct |
20 ms |
760 KB |
Output is correct |
18 |
Correct |
13 ms |
1016 KB |
Output is correct |
19 |
Correct |
18 ms |
888 KB |
Output is correct |
20 |
Correct |
18 ms |
760 KB |
Output is correct |
21 |
Correct |
1719 ms |
7400 KB |
Output is correct |
22 |
Correct |
1715 ms |
7196 KB |
Output is correct |
23 |
Correct |
1723 ms |
7116 KB |
Output is correct |
24 |
Correct |
1704 ms |
7492 KB |
Output is correct |
25 |
Correct |
1020 ms |
10780 KB |
Output is correct |
26 |
Correct |
944 ms |
10848 KB |
Output is correct |
27 |
Correct |
1737 ms |
7152 KB |
Output is correct |
28 |
Correct |
1711 ms |
7252 KB |
Output is correct |
29 |
Correct |
1712 ms |
7136 KB |
Output is correct |
30 |
Correct |
1913 ms |
4576 KB |
Output is correct |
31 |
Correct |
1774 ms |
5096 KB |
Output is correct |
32 |
Correct |
1558 ms |
9360 KB |
Output is correct |
33 |
Correct |
170 ms |
2424 KB |
Output is correct |
34 |
Correct |
176 ms |
2824 KB |
Output is correct |
35 |
Correct |
175 ms |
2716 KB |
Output is correct |
36 |
Correct |
185 ms |
2736 KB |
Output is correct |
37 |
Correct |
1356 ms |
10124 KB |
Output is correct |
38 |
Correct |
1709 ms |
4152 KB |
Output is correct |
39 |
Correct |
1258 ms |
10596 KB |
Output is correct |
40 |
Correct |
1894 ms |
4884 KB |
Output is correct |
41 |
Correct |
1043 ms |
6684 KB |
Output is correct |
42 |
Correct |
1063 ms |
10236 KB |
Output is correct |
43 |
Correct |
865 ms |
4340 KB |
Output is correct |
44 |
Correct |
910 ms |
11900 KB |
Output is correct |
45 |
Correct |
1056 ms |
8652 KB |
Output is correct |
46 |
Correct |
941 ms |
5868 KB |
Output is correct |
47 |
Correct |
1002 ms |
11616 KB |
Output is correct |
48 |
Correct |
1052 ms |
8820 KB |
Output is correct |
49 |
Correct |
1725 ms |
7620 KB |
Output is correct |
50 |
Correct |
1718 ms |
7580 KB |
Output is correct |
51 |
Correct |
1785 ms |
7572 KB |
Output is correct |
52 |
Correct |
1717 ms |
7524 KB |
Output is correct |
53 |
Correct |
189 ms |
2844 KB |
Output is correct |
54 |
Correct |
192 ms |
2936 KB |
Output is correct |
55 |
Correct |
173 ms |
2936 KB |
Output is correct |
56 |
Correct |
190 ms |
2808 KB |
Output is correct |
57 |
Correct |
1813 ms |
5564 KB |
Output is correct |
58 |
Correct |
1602 ms |
2980 KB |
Output is correct |
59 |
Correct |
1652 ms |
7632 KB |
Output is correct |
60 |
Correct |
1752 ms |
2784 KB |
Output is correct |
61 |
Correct |
1105 ms |
8000 KB |
Output is correct |
62 |
Correct |
990 ms |
10632 KB |
Output is correct |
63 |
Correct |
946 ms |
11068 KB |
Output is correct |
64 |
Correct |
993 ms |
10656 KB |
Output is correct |
65 |
Correct |
808 ms |
4400 KB |
Output is correct |
66 |
Correct |
780 ms |
3980 KB |
Output is correct |
67 |
Correct |
1078 ms |
8428 KB |
Output is correct |
68 |
Correct |
1056 ms |
7296 KB |
Output is correct |
69 |
Correct |
1721 ms |
6748 KB |
Output is correct |
70 |
Correct |
1720 ms |
6932 KB |
Output is correct |
71 |
Correct |
1721 ms |
6836 KB |
Output is correct |
72 |
Correct |
1745 ms |
6876 KB |
Output is correct |
73 |
Correct |
929 ms |
4612 KB |
Output is correct |
74 |
Correct |
1064 ms |
7232 KB |
Output is correct |
75 |
Correct |
899 ms |
11408 KB |
Output is correct |
76 |
Correct |
956 ms |
11132 KB |
Output is correct |
77 |
Correct |
181 ms |
2296 KB |
Output is correct |
78 |
Correct |
175 ms |
2436 KB |
Output is correct |
79 |
Correct |
190 ms |
2296 KB |
Output is correct |
80 |
Correct |
180 ms |
2424 KB |
Output is correct |
81 |
Correct |
1058 ms |
6864 KB |
Output is correct |
82 |
Correct |
939 ms |
4584 KB |
Output is correct |
83 |
Correct |
832 ms |
3604 KB |
Output is correct |
84 |
Correct |
1052 ms |
7104 KB |
Output is correct |
85 |
Correct |
1046 ms |
8384 KB |
Output is correct |
86 |
Correct |
1069 ms |
9556 KB |
Output is correct |
87 |
Correct |
968 ms |
6108 KB |
Output is correct |
88 |
Correct |
719 ms |
3780 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Correct |
11 ms |
400 KB |
Output is correct |
3 |
Correct |
13 ms |
548 KB |
Output is correct |
4 |
Correct |
10 ms |
504 KB |
Output is correct |
5 |
Correct |
22 ms |
1144 KB |
Output is correct |
6 |
Correct |
28 ms |
1016 KB |
Output is correct |
7 |
Correct |
16 ms |
632 KB |
Output is correct |
8 |
Correct |
18 ms |
888 KB |
Output is correct |
9 |
Correct |
16 ms |
888 KB |
Output is correct |
10 |
Correct |
9 ms |
1272 KB |
Output is correct |
11 |
Correct |
39 ms |
892 KB |
Output is correct |
12 |
Correct |
39 ms |
1016 KB |
Output is correct |
13 |
Correct |
11 ms |
1272 KB |
Output is correct |
14 |
Correct |
19 ms |
888 KB |
Output is correct |
15 |
Correct |
9 ms |
504 KB |
Output is correct |
16 |
Correct |
10 ms |
504 KB |
Output is correct |
17 |
Correct |
20 ms |
760 KB |
Output is correct |
18 |
Correct |
13 ms |
1016 KB |
Output is correct |
19 |
Correct |
18 ms |
888 KB |
Output is correct |
20 |
Correct |
18 ms |
760 KB |
Output is correct |
21 |
Correct |
1719 ms |
7400 KB |
Output is correct |
22 |
Correct |
1715 ms |
7196 KB |
Output is correct |
23 |
Correct |
1723 ms |
7116 KB |
Output is correct |
24 |
Correct |
1704 ms |
7492 KB |
Output is correct |
25 |
Correct |
1020 ms |
10780 KB |
Output is correct |
26 |
Correct |
944 ms |
10848 KB |
Output is correct |
27 |
Correct |
1737 ms |
7152 KB |
Output is correct |
28 |
Correct |
1711 ms |
7252 KB |
Output is correct |
29 |
Correct |
1712 ms |
7136 KB |
Output is correct |
30 |
Correct |
1913 ms |
4576 KB |
Output is correct |
31 |
Correct |
1774 ms |
5096 KB |
Output is correct |
32 |
Correct |
1558 ms |
9360 KB |
Output is correct |
33 |
Correct |
197 ms |
2524 KB |
Output is correct |
34 |
Correct |
169 ms |
2492 KB |
Output is correct |
35 |
Correct |
261 ms |
2772 KB |
Output is correct |
36 |
Correct |
173 ms |
2424 KB |
Output is correct |
37 |
Correct |
1483 ms |
9612 KB |
Output is correct |
38 |
Correct |
1642 ms |
8300 KB |
Output is correct |
39 |
Correct |
1580 ms |
9400 KB |
Output is correct |
40 |
Correct |
1014 ms |
11104 KB |
Output is correct |
41 |
Correct |
954 ms |
11596 KB |
Output is correct |
42 |
Correct |
1067 ms |
9044 KB |
Output is correct |
43 |
Correct |
638 ms |
3084 KB |
Output is correct |
44 |
Correct |
1069 ms |
9644 KB |
Output is correct |
45 |
Correct |
1020 ms |
8464 KB |
Output is correct |
46 |
Correct |
933 ms |
5340 KB |
Output is correct |
47 |
Correct |
880 ms |
5008 KB |
Output is correct |
48 |
Correct |
767 ms |
4380 KB |
Output is correct |
49 |
Correct |
1729 ms |
7440 KB |
Output is correct |
50 |
Correct |
1733 ms |
7472 KB |
Output is correct |
51 |
Correct |
1746 ms |
7612 KB |
Output is correct |
52 |
Correct |
1731 ms |
7540 KB |
Output is correct |
53 |
Correct |
708 ms |
3224 KB |
Output is correct |
54 |
Correct |
1077 ms |
6680 KB |
Output is correct |
55 |
Correct |
1074 ms |
7688 KB |
Output is correct |
56 |
Correct |
1084 ms |
6748 KB |
Output is correct |
57 |
Correct |
204 ms |
2552 KB |
Output is correct |
58 |
Correct |
178 ms |
2680 KB |
Output is correct |
59 |
Correct |
202 ms |
2484 KB |
Output is correct |
60 |
Correct |
183 ms |
2552 KB |
Output is correct |
61 |
Correct |
1083 ms |
8124 KB |
Output is correct |
62 |
Correct |
1086 ms |
8056 KB |
Output is correct |
63 |
Correct |
951 ms |
11524 KB |
Output is correct |
64 |
Correct |
1061 ms |
8996 KB |
Output is correct |
65 |
Correct |
1034 ms |
8596 KB |
Output is correct |
66 |
Correct |
854 ms |
5060 KB |
Output is correct |
67 |
Correct |
1067 ms |
7520 KB |
Output is correct |
68 |
Correct |
1044 ms |
8796 KB |
Output is correct |
69 |
Correct |
170 ms |
2424 KB |
Output is correct |
70 |
Correct |
176 ms |
2824 KB |
Output is correct |
71 |
Correct |
175 ms |
2716 KB |
Output is correct |
72 |
Correct |
185 ms |
2736 KB |
Output is correct |
73 |
Correct |
1356 ms |
10124 KB |
Output is correct |
74 |
Correct |
1709 ms |
4152 KB |
Output is correct |
75 |
Correct |
1258 ms |
10596 KB |
Output is correct |
76 |
Correct |
1894 ms |
4884 KB |
Output is correct |
77 |
Correct |
1043 ms |
6684 KB |
Output is correct |
78 |
Correct |
1063 ms |
10236 KB |
Output is correct |
79 |
Correct |
865 ms |
4340 KB |
Output is correct |
80 |
Correct |
910 ms |
11900 KB |
Output is correct |
81 |
Correct |
1056 ms |
8652 KB |
Output is correct |
82 |
Correct |
941 ms |
5868 KB |
Output is correct |
83 |
Correct |
1002 ms |
11616 KB |
Output is correct |
84 |
Correct |
1052 ms |
8820 KB |
Output is correct |
85 |
Correct |
1725 ms |
7620 KB |
Output is correct |
86 |
Correct |
1718 ms |
7580 KB |
Output is correct |
87 |
Correct |
1785 ms |
7572 KB |
Output is correct |
88 |
Correct |
1717 ms |
7524 KB |
Output is correct |
89 |
Correct |
189 ms |
2844 KB |
Output is correct |
90 |
Correct |
192 ms |
2936 KB |
Output is correct |
91 |
Correct |
173 ms |
2936 KB |
Output is correct |
92 |
Correct |
190 ms |
2808 KB |
Output is correct |
93 |
Correct |
1813 ms |
5564 KB |
Output is correct |
94 |
Correct |
1602 ms |
2980 KB |
Output is correct |
95 |
Correct |
1652 ms |
7632 KB |
Output is correct |
96 |
Correct |
1752 ms |
2784 KB |
Output is correct |
97 |
Correct |
1105 ms |
8000 KB |
Output is correct |
98 |
Correct |
990 ms |
10632 KB |
Output is correct |
99 |
Correct |
946 ms |
11068 KB |
Output is correct |
100 |
Correct |
993 ms |
10656 KB |
Output is correct |
101 |
Correct |
808 ms |
4400 KB |
Output is correct |
102 |
Correct |
780 ms |
3980 KB |
Output is correct |
103 |
Correct |
1078 ms |
8428 KB |
Output is correct |
104 |
Correct |
1056 ms |
7296 KB |
Output is correct |
105 |
Correct |
1721 ms |
6748 KB |
Output is correct |
106 |
Correct |
1720 ms |
6932 KB |
Output is correct |
107 |
Correct |
1721 ms |
6836 KB |
Output is correct |
108 |
Correct |
1745 ms |
6876 KB |
Output is correct |
109 |
Correct |
929 ms |
4612 KB |
Output is correct |
110 |
Correct |
1064 ms |
7232 KB |
Output is correct |
111 |
Correct |
899 ms |
11408 KB |
Output is correct |
112 |
Correct |
956 ms |
11132 KB |
Output is correct |
113 |
Correct |
181 ms |
2296 KB |
Output is correct |
114 |
Correct |
175 ms |
2436 KB |
Output is correct |
115 |
Correct |
190 ms |
2296 KB |
Output is correct |
116 |
Correct |
180 ms |
2424 KB |
Output is correct |
117 |
Correct |
1058 ms |
6864 KB |
Output is correct |
118 |
Correct |
939 ms |
4584 KB |
Output is correct |
119 |
Correct |
832 ms |
3604 KB |
Output is correct |
120 |
Correct |
1052 ms |
7104 KB |
Output is correct |
121 |
Correct |
1046 ms |
8384 KB |
Output is correct |
122 |
Correct |
1069 ms |
9556 KB |
Output is correct |
123 |
Correct |
968 ms |
6108 KB |
Output is correct |
124 |
Correct |
719 ms |
3780 KB |
Output is correct |
125 |
Correct |
375 ms |
3200 KB |
Output is correct |
126 |
Correct |
388 ms |
3288 KB |
Output is correct |
127 |
Correct |
464 ms |
3320 KB |
Output is correct |
128 |
Correct |
400 ms |
3448 KB |
Output is correct |
129 |
Correct |
360 ms |
3256 KB |
Output is correct |
130 |
Correct |
417 ms |
3332 KB |
Output is correct |
131 |
Correct |
3954 ms |
4488 KB |
Output is correct |
132 |
Execution timed out |
5081 ms |
11056 KB |
Time limit exceeded |
133 |
Halted |
0 ms |
0 KB |
- |