#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using ld = long double;
//#define int ll
#define sz(x) ((int)(x).size())
using pii = pair<int,int>;
using tii = tuple<int,int,int>;
const int nmax = 2e5 + 5;
pii segments[nmax];
struct Oper {
int type;
int a, b;
int k;
};
namespace Precalc {
multiset<pii> actives;
multiset<pii> actives_sortfwr;
auto cmp = [](const pii& a, const pii& b) -> bool { return a.second < b.second || (a.second == b.second && a.first < b.first); };
multiset<pii, decltype(cmp)> actives_sortbckw(cmp);
void rebatch(vector<Oper> opqueue) {
for(auto [t, a, b, k] : opqueue) {
if(t == 1)
actives.insert(pii{a, b}),
actives_sortfwr.insert(pii{a, b}),
actives_sortbckw.insert(pii{a, b});
else if(t == 2)
actives.erase(actives.find(segments[a])),
actives_sortfwr.erase(actives_sortfwr.find(segments[a])),
actives_sortbckw.erase(actives_sortbckw.find(segments[a]));
}
return;
}
struct Item {
int link, sum, own;
};
#warning theyre out here saying ca daca le tii in map direct e O(N) toata chestia
#warning poate e doar Bmax sau ceva (700) (pt MLE sau cv)
set<pii> fwrpoz;
set<pii> bckwpoz;
int freq[nmax];
Item fwr[nmax], bckw[nmax];
pii atrf[nmax], atrb[nmax];
map<int, int> norm_Ks;
vector<int> currKs;
int n;
void contextualize(vector<int> Ks) {
norm_Ks.clear();
for(auto x : Ks) norm_Ks[x];
int ptrnrm = 0;
for(auto &[a, b] : norm_Ks) freq[ptrnrm] = 0, b = ptrnrm++;
fwrpoz.clear(), bckwpoz.clear();
{ // forward links
pii lst = {-1, -1};
n = 0;
for(auto [a, b] : actives_sortfwr) {
int k = b - a + 1;
if(k < Ks[0]) continue;
if(pii{a, b} != lst) { n++; fwr[n].sum = fwr[n].own = 0; }
atrf[n] = lst = pii{a, b};
fwr[n].own++;
}
vector<int> counter_app(sz(Ks));
for(int i = n, atrcoef = sz(Ks) - 1; i > 0; atrcoef = (atrcoef == 0? sz(Ks) - 1 : atrcoef - 1), i--) {
auto [a, b] = atrf[i];
int poz = distance(begin(Ks), prev(upper_bound(all(Ks), b - a + 1)));
counter_app[poz] += fwr[i].own;
fwr[i].link = atrcoef;
fwr[i].sum = counter_app[atrcoef];
fwrpoz.emplace(pii{a, i});
}
}
// ----
{ // backward links
pii lst = {-1, -1};
n = 0;
for(auto [a, b] : actives_sortbckw) {
int k = b - a + 1;
if(k < Ks[0]) continue;
if(pii{a, b} != lst) { n++; bckw[n].sum = bckw[n].own = 0; }
atrb[n] = lst = pii{a, b};
bckw[n].own++;
}
vector<int> counter_app(sz(Ks));
for(int i = 1, atrcoef = sz(Ks) - 1; i <= n; atrcoef = (atrcoef == 0? sz(Ks) - 1 : atrcoef - 1), i++) {
auto [a, b] = atrb[i];
int poz = distance(begin(Ks), prev(upper_bound(all(Ks), b - a + 1)));
counter_app[poz] += bckw[i].own;
bckw[i].link = atrcoef;
bckw[i].sum = counter_app[atrcoef];
bckwpoz.emplace(pii{b, i});
}
}
for(auto [a, b] : actives) {
int k = b - a + 1;
if(k < Ks[0]) continue;
freq[distance(begin(Ks), prev(upper_bound(all(Ks), k)))]++;
}
for(int i = sz(Ks) - 2; i >= 0; i--)
freq[i] += freq[i + 1];
currKs = move(Ks);
}
int query_K(int k) {
return freq[norm_Ks[k]];
}
int query_L(int L, int k) {
k = norm_Ks[k];
auto it = bckwpoz.upper_bound(pii{L + 1, - 1});
if(it == bckwpoz.begin()) return 0;
int poz = prev(it) -> second;
int rez = 0;
while(k < sz(currKs) && poz > 0) {
if(bckw[poz].link == k) {
rez += bckw[poz].sum;
k++;
}
if(k < sz(currKs) && currKs[k] <= atrb[poz].second - atrb[poz].first + 1) rez += bckw[poz].own;
poz--;
}
return rez;
}
int query_R(int R, int k) {
k = norm_Ks[k];
auto it = fwrpoz.upper_bound(pii{R, - 1});
if(it == fwrpoz.end()) return 0;
int poz = it -> second;
int rez = 0;
while(k < sz(currKs) && poz <= n) {
if(fwr[poz].link == k) {
rez += fwr[poz].sum;
k++;
}
if(k < sz(currKs) && currKs[k] <= atrf[poz].second - atrf[poz].first + 1) rez += fwr[poz].own;
poz++;
}
return rez;
}
}
//#error in loc sa ai pozitii care corespund unor segmente bune, doar pune suma partiala a alora congruenti cu (-pozitia) mod sz(Ks)
int segmpoz = 1;
int unitValue(int l, int r, int a, int b, int k) {
return min(r, b) - max(l, a) + 1 >= k;
}
signed main() {
cin.tie(0) -> sync_with_stdio(0);
int n, t_offline;
cin >> n >> t_offline;
const int idealBuck = 1024;
const ll worstInner = (ll)ceil(idealBuck / 2) * n + 5;
vector<Oper> operation_queue;
int lastans = 0;
auto flush_queue = [&]() {
vector<int> Ks;
for(auto [t, a, b, k] : operation_queue)
if(t == 3) Ks.emplace_back(k);
if(sz(Ks) == 0) return;
sort(all(Ks));
Ks.erase(unique(all(Ks)), Ks.end());
Precalc::contextualize(Ks);
for(int i = 0; i < sz(operation_queue); i++) {
auto &[ti, ai, bi, ki] = operation_queue[i];
if(ti == 1 || ti == 3) {
ai = ai ^ (t_offline * lastans);
bi = bi ^ (t_offline * lastans);
if(ai > bi) swap(ai, bi);
}
if(ti == 1)
segments[segmpoz++] = pii{ai, bi};
if(ti == 3) {
if(bi - ai + 1 < ki) {
lastans = 0;
}
else {
int rez = Precalc::query_K(ki) - Precalc::query_R(bi - ki + 1 + 1, ki) - Precalc::query_L(ai + ki - 1 - 1, ki);
for(int j = i - 1; j >= 0; j--) {
auto &[tj, aj, bj, kj] = operation_queue[j];
if(tj == 3) continue;
else if(tj == 2)
rez -= unitValue(ai, bi, segments[aj].first, segments[aj].second, ki);
else
rez += unitValue(ai, bi, aj, bj, ki);
}
lastans = rez;
}
cout << lastans << '\n';
}
}
Precalc::rebatch(operation_queue);
operation_queue.clear();
};
int cnt[2] = {1, 0};
for(int t, a, b, k, tc = 0; tc < n; tc++) {
cin >> t;
if(t == 1) {
cin >> a >> b;
operation_queue.emplace_back(Oper{t, a, b, -1});
cnt[0]++;
}
if(t == 2) {
cin >> a;
operation_queue.emplace_back(Oper{t, a, -1, -1});
cnt[0]++;
}
if(t == 3) {
cin >> a >> b >> k;
operation_queue.emplace_back(Oper{t, a, b, k});
cnt[1]++;
}
if(tc == n - 1 || (ll)cnt[0] * cnt[1] >= worstInner) {
flush_queue();
cnt[0] = sz(Precalc::actives_sortfwr);
cnt[1] = 0;
}
}
return 0;
}
/**
Anul asta nu se da centroid
-- Rugaciunile mele
*/
Compilation message
segments.cpp:51:4: warning: #warning theyre out here saying ca daca le tii in map direct e O(N) toata chestia [-Wcpp]
51 | #warning theyre out here saying ca daca le tii in map direct e O(N) toata chestia
| ^~~~~~~
segments.cpp:52:4: warning: #warning poate e doar Bmax sau ceva (700) (pt MLE sau cv) [-Wcpp]
52 | #warning poate e doar Bmax sau ceva (700) (pt MLE sau cv)
| ^~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
7 ms |
8812 KB |
Output is correct |
4 |
Correct |
7 ms |
8740 KB |
Output is correct |
5 |
Correct |
11 ms |
9820 KB |
Output is correct |
6 |
Correct |
12 ms |
9564 KB |
Output is correct |
7 |
Correct |
9 ms |
8796 KB |
Output is correct |
8 |
Correct |
9 ms |
9308 KB |
Output is correct |
9 |
Correct |
11 ms |
9228 KB |
Output is correct |
10 |
Correct |
5 ms |
3164 KB |
Output is correct |
11 |
Correct |
16 ms |
9460 KB |
Output is correct |
12 |
Correct |
16 ms |
9320 KB |
Output is correct |
13 |
Correct |
5 ms |
3160 KB |
Output is correct |
14 |
Correct |
9 ms |
9308 KB |
Output is correct |
15 |
Correct |
7 ms |
8800 KB |
Output is correct |
16 |
Correct |
7 ms |
8836 KB |
Output is correct |
17 |
Correct |
10 ms |
9048 KB |
Output is correct |
18 |
Correct |
7 ms |
3164 KB |
Output is correct |
19 |
Correct |
9 ms |
9068 KB |
Output is correct |
20 |
Correct |
9 ms |
9048 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1900 ms |
23036 KB |
Output is correct |
2 |
Correct |
1880 ms |
23780 KB |
Output is correct |
3 |
Correct |
1912 ms |
23536 KB |
Output is correct |
4 |
Correct |
2161 ms |
25212 KB |
Output is correct |
5 |
Correct |
917 ms |
34560 KB |
Output is correct |
6 |
Correct |
602 ms |
35276 KB |
Output is correct |
7 |
Correct |
1980 ms |
23728 KB |
Output is correct |
8 |
Correct |
2008 ms |
23920 KB |
Output is correct |
9 |
Correct |
2175 ms |
23872 KB |
Output is correct |
10 |
Correct |
1627 ms |
16248 KB |
Output is correct |
11 |
Correct |
1562 ms |
18388 KB |
Output is correct |
12 |
Correct |
2347 ms |
29032 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
582 ms |
9512 KB |
Output is correct |
2 |
Correct |
600 ms |
9840 KB |
Output is correct |
3 |
Correct |
580 ms |
10016 KB |
Output is correct |
4 |
Correct |
616 ms |
9564 KB |
Output is correct |
5 |
Correct |
1665 ms |
27928 KB |
Output is correct |
6 |
Correct |
1540 ms |
26208 KB |
Output is correct |
7 |
Correct |
1464 ms |
27244 KB |
Output is correct |
8 |
Correct |
737 ms |
34552 KB |
Output is correct |
9 |
Correct |
509 ms |
33300 KB |
Output is correct |
10 |
Correct |
622 ms |
27300 KB |
Output is correct |
11 |
Correct |
454 ms |
11732 KB |
Output is correct |
12 |
Correct |
667 ms |
27528 KB |
Output is correct |
13 |
Correct |
643 ms |
25424 KB |
Output is correct |
14 |
Correct |
378 ms |
18004 KB |
Output is correct |
15 |
Correct |
343 ms |
16948 KB |
Output is correct |
16 |
Correct |
356 ms |
14804 KB |
Output is correct |
17 |
Correct |
925 ms |
23724 KB |
Output is correct |
18 |
Correct |
1014 ms |
23880 KB |
Output is correct |
19 |
Correct |
916 ms |
23732 KB |
Output is correct |
20 |
Correct |
1061 ms |
23984 KB |
Output is correct |
21 |
Correct |
432 ms |
12520 KB |
Output is correct |
22 |
Correct |
414 ms |
19816 KB |
Output is correct |
23 |
Correct |
476 ms |
23012 KB |
Output is correct |
24 |
Correct |
474 ms |
20396 KB |
Output is correct |
25 |
Correct |
588 ms |
10880 KB |
Output is correct |
26 |
Correct |
629 ms |
10648 KB |
Output is correct |
27 |
Correct |
577 ms |
11348 KB |
Output is correct |
28 |
Correct |
588 ms |
10852 KB |
Output is correct |
29 |
Correct |
489 ms |
24244 KB |
Output is correct |
30 |
Correct |
615 ms |
24252 KB |
Output is correct |
31 |
Correct |
428 ms |
33560 KB |
Output is correct |
32 |
Correct |
631 ms |
27040 KB |
Output is correct |
33 |
Correct |
552 ms |
25632 KB |
Output is correct |
34 |
Correct |
339 ms |
16648 KB |
Output is correct |
35 |
Correct |
529 ms |
22780 KB |
Output is correct |
36 |
Correct |
636 ms |
26600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
619 ms |
10028 KB |
Output is correct |
2 |
Correct |
603 ms |
9832 KB |
Output is correct |
3 |
Correct |
614 ms |
9832 KB |
Output is correct |
4 |
Correct |
595 ms |
9964 KB |
Output is correct |
5 |
Correct |
2206 ms |
29572 KB |
Output is correct |
6 |
Correct |
1825 ms |
13120 KB |
Output is correct |
7 |
Correct |
1931 ms |
31932 KB |
Output is correct |
8 |
Correct |
1625 ms |
16724 KB |
Output is correct |
9 |
Correct |
724 ms |
19472 KB |
Output is correct |
10 |
Correct |
890 ms |
28864 KB |
Output is correct |
11 |
Correct |
772 ms |
13892 KB |
Output is correct |
12 |
Correct |
463 ms |
34620 KB |
Output is correct |
13 |
Correct |
793 ms |
25268 KB |
Output is correct |
14 |
Correct |
582 ms |
18604 KB |
Output is correct |
15 |
Correct |
600 ms |
33228 KB |
Output is correct |
16 |
Correct |
825 ms |
26352 KB |
Output is correct |
17 |
Correct |
1886 ms |
23656 KB |
Output is correct |
18 |
Correct |
2076 ms |
23912 KB |
Output is correct |
19 |
Correct |
1904 ms |
23760 KB |
Output is correct |
20 |
Correct |
1844 ms |
23788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
7 ms |
8812 KB |
Output is correct |
4 |
Correct |
7 ms |
8740 KB |
Output is correct |
5 |
Correct |
11 ms |
9820 KB |
Output is correct |
6 |
Correct |
12 ms |
9564 KB |
Output is correct |
7 |
Correct |
9 ms |
8796 KB |
Output is correct |
8 |
Correct |
9 ms |
9308 KB |
Output is correct |
9 |
Correct |
11 ms |
9228 KB |
Output is correct |
10 |
Correct |
5 ms |
3164 KB |
Output is correct |
11 |
Correct |
16 ms |
9460 KB |
Output is correct |
12 |
Correct |
16 ms |
9320 KB |
Output is correct |
13 |
Correct |
5 ms |
3160 KB |
Output is correct |
14 |
Correct |
9 ms |
9308 KB |
Output is correct |
15 |
Correct |
7 ms |
8800 KB |
Output is correct |
16 |
Correct |
7 ms |
8836 KB |
Output is correct |
17 |
Correct |
10 ms |
9048 KB |
Output is correct |
18 |
Correct |
7 ms |
3164 KB |
Output is correct |
19 |
Correct |
9 ms |
9068 KB |
Output is correct |
20 |
Correct |
9 ms |
9048 KB |
Output is correct |
21 |
Correct |
1900 ms |
23036 KB |
Output is correct |
22 |
Correct |
1880 ms |
23780 KB |
Output is correct |
23 |
Correct |
1912 ms |
23536 KB |
Output is correct |
24 |
Correct |
2161 ms |
25212 KB |
Output is correct |
25 |
Correct |
917 ms |
34560 KB |
Output is correct |
26 |
Correct |
602 ms |
35276 KB |
Output is correct |
27 |
Correct |
1980 ms |
23728 KB |
Output is correct |
28 |
Correct |
2008 ms |
23920 KB |
Output is correct |
29 |
Correct |
2175 ms |
23872 KB |
Output is correct |
30 |
Correct |
1627 ms |
16248 KB |
Output is correct |
31 |
Correct |
1562 ms |
18388 KB |
Output is correct |
32 |
Correct |
2347 ms |
29032 KB |
Output is correct |
33 |
Correct |
619 ms |
10028 KB |
Output is correct |
34 |
Correct |
603 ms |
9832 KB |
Output is correct |
35 |
Correct |
614 ms |
9832 KB |
Output is correct |
36 |
Correct |
595 ms |
9964 KB |
Output is correct |
37 |
Correct |
2206 ms |
29572 KB |
Output is correct |
38 |
Correct |
1825 ms |
13120 KB |
Output is correct |
39 |
Correct |
1931 ms |
31932 KB |
Output is correct |
40 |
Correct |
1625 ms |
16724 KB |
Output is correct |
41 |
Correct |
724 ms |
19472 KB |
Output is correct |
42 |
Correct |
890 ms |
28864 KB |
Output is correct |
43 |
Correct |
772 ms |
13892 KB |
Output is correct |
44 |
Correct |
463 ms |
34620 KB |
Output is correct |
45 |
Correct |
793 ms |
25268 KB |
Output is correct |
46 |
Correct |
582 ms |
18604 KB |
Output is correct |
47 |
Correct |
600 ms |
33228 KB |
Output is correct |
48 |
Correct |
825 ms |
26352 KB |
Output is correct |
49 |
Correct |
1886 ms |
23656 KB |
Output is correct |
50 |
Correct |
2076 ms |
23912 KB |
Output is correct |
51 |
Correct |
1904 ms |
23760 KB |
Output is correct |
52 |
Correct |
1844 ms |
23788 KB |
Output is correct |
53 |
Correct |
611 ms |
11112 KB |
Output is correct |
54 |
Correct |
659 ms |
11052 KB |
Output is correct |
55 |
Correct |
615 ms |
11016 KB |
Output is correct |
56 |
Correct |
613 ms |
11132 KB |
Output is correct |
57 |
Correct |
1796 ms |
19432 KB |
Output is correct |
58 |
Correct |
1841 ms |
13892 KB |
Output is correct |
59 |
Correct |
2191 ms |
26892 KB |
Output is correct |
60 |
Correct |
1698 ms |
13644 KB |
Output is correct |
61 |
Correct |
815 ms |
25108 KB |
Output is correct |
62 |
Correct |
683 ms |
32356 KB |
Output is correct |
63 |
Correct |
479 ms |
33952 KB |
Output is correct |
64 |
Correct |
695 ms |
32776 KB |
Output is correct |
65 |
Correct |
600 ms |
15432 KB |
Output is correct |
66 |
Correct |
656 ms |
14452 KB |
Output is correct |
67 |
Correct |
823 ms |
26656 KB |
Output is correct |
68 |
Correct |
810 ms |
22928 KB |
Output is correct |
69 |
Correct |
2127 ms |
23644 KB |
Output is correct |
70 |
Correct |
2119 ms |
23824 KB |
Output is correct |
71 |
Correct |
2177 ms |
23620 KB |
Output is correct |
72 |
Correct |
1963 ms |
23704 KB |
Output is correct |
73 |
Correct |
738 ms |
16528 KB |
Output is correct |
74 |
Correct |
800 ms |
22484 KB |
Output is correct |
75 |
Correct |
271 ms |
35244 KB |
Output is correct |
76 |
Correct |
464 ms |
34324 KB |
Output is correct |
77 |
Correct |
607 ms |
11044 KB |
Output is correct |
78 |
Correct |
607 ms |
10992 KB |
Output is correct |
79 |
Correct |
607 ms |
10984 KB |
Output is correct |
80 |
Correct |
624 ms |
11248 KB |
Output is correct |
81 |
Correct |
731 ms |
21992 KB |
Output is correct |
82 |
Correct |
696 ms |
16868 KB |
Output is correct |
83 |
Correct |
785 ms |
13972 KB |
Output is correct |
84 |
Correct |
726 ms |
22216 KB |
Output is correct |
85 |
Correct |
797 ms |
26896 KB |
Output is correct |
86 |
Correct |
790 ms |
27312 KB |
Output is correct |
87 |
Correct |
619 ms |
19436 KB |
Output is correct |
88 |
Correct |
642 ms |
14164 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
7 ms |
8812 KB |
Output is correct |
4 |
Correct |
7 ms |
8740 KB |
Output is correct |
5 |
Correct |
11 ms |
9820 KB |
Output is correct |
6 |
Correct |
12 ms |
9564 KB |
Output is correct |
7 |
Correct |
9 ms |
8796 KB |
Output is correct |
8 |
Correct |
9 ms |
9308 KB |
Output is correct |
9 |
Correct |
11 ms |
9228 KB |
Output is correct |
10 |
Correct |
5 ms |
3164 KB |
Output is correct |
11 |
Correct |
16 ms |
9460 KB |
Output is correct |
12 |
Correct |
16 ms |
9320 KB |
Output is correct |
13 |
Correct |
5 ms |
3160 KB |
Output is correct |
14 |
Correct |
9 ms |
9308 KB |
Output is correct |
15 |
Correct |
7 ms |
8800 KB |
Output is correct |
16 |
Correct |
7 ms |
8836 KB |
Output is correct |
17 |
Correct |
10 ms |
9048 KB |
Output is correct |
18 |
Correct |
7 ms |
3164 KB |
Output is correct |
19 |
Correct |
9 ms |
9068 KB |
Output is correct |
20 |
Correct |
9 ms |
9048 KB |
Output is correct |
21 |
Correct |
1900 ms |
23036 KB |
Output is correct |
22 |
Correct |
1880 ms |
23780 KB |
Output is correct |
23 |
Correct |
1912 ms |
23536 KB |
Output is correct |
24 |
Correct |
2161 ms |
25212 KB |
Output is correct |
25 |
Correct |
917 ms |
34560 KB |
Output is correct |
26 |
Correct |
602 ms |
35276 KB |
Output is correct |
27 |
Correct |
1980 ms |
23728 KB |
Output is correct |
28 |
Correct |
2008 ms |
23920 KB |
Output is correct |
29 |
Correct |
2175 ms |
23872 KB |
Output is correct |
30 |
Correct |
1627 ms |
16248 KB |
Output is correct |
31 |
Correct |
1562 ms |
18388 KB |
Output is correct |
32 |
Correct |
2347 ms |
29032 KB |
Output is correct |
33 |
Correct |
582 ms |
9512 KB |
Output is correct |
34 |
Correct |
600 ms |
9840 KB |
Output is correct |
35 |
Correct |
580 ms |
10016 KB |
Output is correct |
36 |
Correct |
616 ms |
9564 KB |
Output is correct |
37 |
Correct |
1665 ms |
27928 KB |
Output is correct |
38 |
Correct |
1540 ms |
26208 KB |
Output is correct |
39 |
Correct |
1464 ms |
27244 KB |
Output is correct |
40 |
Correct |
737 ms |
34552 KB |
Output is correct |
41 |
Correct |
509 ms |
33300 KB |
Output is correct |
42 |
Correct |
622 ms |
27300 KB |
Output is correct |
43 |
Correct |
454 ms |
11732 KB |
Output is correct |
44 |
Correct |
667 ms |
27528 KB |
Output is correct |
45 |
Correct |
643 ms |
25424 KB |
Output is correct |
46 |
Correct |
378 ms |
18004 KB |
Output is correct |
47 |
Correct |
343 ms |
16948 KB |
Output is correct |
48 |
Correct |
356 ms |
14804 KB |
Output is correct |
49 |
Correct |
925 ms |
23724 KB |
Output is correct |
50 |
Correct |
1014 ms |
23880 KB |
Output is correct |
51 |
Correct |
916 ms |
23732 KB |
Output is correct |
52 |
Correct |
1061 ms |
23984 KB |
Output is correct |
53 |
Correct |
432 ms |
12520 KB |
Output is correct |
54 |
Correct |
414 ms |
19816 KB |
Output is correct |
55 |
Correct |
476 ms |
23012 KB |
Output is correct |
56 |
Correct |
474 ms |
20396 KB |
Output is correct |
57 |
Correct |
588 ms |
10880 KB |
Output is correct |
58 |
Correct |
629 ms |
10648 KB |
Output is correct |
59 |
Correct |
577 ms |
11348 KB |
Output is correct |
60 |
Correct |
588 ms |
10852 KB |
Output is correct |
61 |
Correct |
489 ms |
24244 KB |
Output is correct |
62 |
Correct |
615 ms |
24252 KB |
Output is correct |
63 |
Correct |
428 ms |
33560 KB |
Output is correct |
64 |
Correct |
631 ms |
27040 KB |
Output is correct |
65 |
Correct |
552 ms |
25632 KB |
Output is correct |
66 |
Correct |
339 ms |
16648 KB |
Output is correct |
67 |
Correct |
529 ms |
22780 KB |
Output is correct |
68 |
Correct |
636 ms |
26600 KB |
Output is correct |
69 |
Correct |
619 ms |
10028 KB |
Output is correct |
70 |
Correct |
603 ms |
9832 KB |
Output is correct |
71 |
Correct |
614 ms |
9832 KB |
Output is correct |
72 |
Correct |
595 ms |
9964 KB |
Output is correct |
73 |
Correct |
2206 ms |
29572 KB |
Output is correct |
74 |
Correct |
1825 ms |
13120 KB |
Output is correct |
75 |
Correct |
1931 ms |
31932 KB |
Output is correct |
76 |
Correct |
1625 ms |
16724 KB |
Output is correct |
77 |
Correct |
724 ms |
19472 KB |
Output is correct |
78 |
Correct |
890 ms |
28864 KB |
Output is correct |
79 |
Correct |
772 ms |
13892 KB |
Output is correct |
80 |
Correct |
463 ms |
34620 KB |
Output is correct |
81 |
Correct |
793 ms |
25268 KB |
Output is correct |
82 |
Correct |
582 ms |
18604 KB |
Output is correct |
83 |
Correct |
600 ms |
33228 KB |
Output is correct |
84 |
Correct |
825 ms |
26352 KB |
Output is correct |
85 |
Correct |
1886 ms |
23656 KB |
Output is correct |
86 |
Correct |
2076 ms |
23912 KB |
Output is correct |
87 |
Correct |
1904 ms |
23760 KB |
Output is correct |
88 |
Correct |
1844 ms |
23788 KB |
Output is correct |
89 |
Correct |
611 ms |
11112 KB |
Output is correct |
90 |
Correct |
659 ms |
11052 KB |
Output is correct |
91 |
Correct |
615 ms |
11016 KB |
Output is correct |
92 |
Correct |
613 ms |
11132 KB |
Output is correct |
93 |
Correct |
1796 ms |
19432 KB |
Output is correct |
94 |
Correct |
1841 ms |
13892 KB |
Output is correct |
95 |
Correct |
2191 ms |
26892 KB |
Output is correct |
96 |
Correct |
1698 ms |
13644 KB |
Output is correct |
97 |
Correct |
815 ms |
25108 KB |
Output is correct |
98 |
Correct |
683 ms |
32356 KB |
Output is correct |
99 |
Correct |
479 ms |
33952 KB |
Output is correct |
100 |
Correct |
695 ms |
32776 KB |
Output is correct |
101 |
Correct |
600 ms |
15432 KB |
Output is correct |
102 |
Correct |
656 ms |
14452 KB |
Output is correct |
103 |
Correct |
823 ms |
26656 KB |
Output is correct |
104 |
Correct |
810 ms |
22928 KB |
Output is correct |
105 |
Correct |
2127 ms |
23644 KB |
Output is correct |
106 |
Correct |
2119 ms |
23824 KB |
Output is correct |
107 |
Correct |
2177 ms |
23620 KB |
Output is correct |
108 |
Correct |
1963 ms |
23704 KB |
Output is correct |
109 |
Correct |
738 ms |
16528 KB |
Output is correct |
110 |
Correct |
800 ms |
22484 KB |
Output is correct |
111 |
Correct |
271 ms |
35244 KB |
Output is correct |
112 |
Correct |
464 ms |
34324 KB |
Output is correct |
113 |
Correct |
607 ms |
11044 KB |
Output is correct |
114 |
Correct |
607 ms |
10992 KB |
Output is correct |
115 |
Correct |
607 ms |
10984 KB |
Output is correct |
116 |
Correct |
624 ms |
11248 KB |
Output is correct |
117 |
Correct |
731 ms |
21992 KB |
Output is correct |
118 |
Correct |
696 ms |
16868 KB |
Output is correct |
119 |
Correct |
785 ms |
13972 KB |
Output is correct |
120 |
Correct |
726 ms |
22216 KB |
Output is correct |
121 |
Correct |
797 ms |
26896 KB |
Output is correct |
122 |
Correct |
790 ms |
27312 KB |
Output is correct |
123 |
Correct |
619 ms |
19436 KB |
Output is correct |
124 |
Correct |
642 ms |
14164 KB |
Output is correct |
125 |
Correct |
2469 ms |
13568 KB |
Output is correct |
126 |
Correct |
2438 ms |
13044 KB |
Output is correct |
127 |
Correct |
2455 ms |
13424 KB |
Output is correct |
128 |
Correct |
2448 ms |
13116 KB |
Output is correct |
129 |
Correct |
2417 ms |
13076 KB |
Output is correct |
130 |
Correct |
2498 ms |
13396 KB |
Output is correct |
131 |
Execution timed out |
5025 ms |
19184 KB |
Time limit exceeded |
132 |
Halted |
0 ms |
0 KB |
- |