#pragma GCC optimize("O3,unroll-loops")
#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_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_sortfwr.insert(pii{a, b}),
actives_sortbckw.insert(pii{a, b});
else if(t == 2)
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_sortfwr) {
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 = 400;
const ll worstInner = (ll)idealBuck * 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:47:4: warning: #warning theyre out here saying ca daca le tii in map direct e O(N) toata chestia [-Wcpp]
47 | #warning theyre out here saying ca daca le tii in map direct e O(N) toata chestia
| ^~~~~~~
segments.cpp:48:4: warning: #warning poate e doar Bmax sau ceva (700) (pt MLE sau cv) [-Wcpp]
48 | #warning poate e doar Bmax sau ceva (700) (pt MLE sau cv)
| ^~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
6 ms |
8796 KB |
Output is correct |
4 |
Correct |
7 ms |
8796 KB |
Output is correct |
5 |
Correct |
9 ms |
9564 KB |
Output is correct |
6 |
Correct |
17 ms |
9372 KB |
Output is correct |
7 |
Correct |
8 ms |
8800 KB |
Output is correct |
8 |
Correct |
8 ms |
9308 KB |
Output is correct |
9 |
Correct |
8 ms |
9308 KB |
Output is correct |
10 |
Correct |
4 ms |
2904 KB |
Output is correct |
11 |
Correct |
15 ms |
9272 KB |
Output is correct |
12 |
Correct |
15 ms |
9312 KB |
Output is correct |
13 |
Correct |
5 ms |
2908 KB |
Output is correct |
14 |
Correct |
8 ms |
9052 KB |
Output is correct |
15 |
Correct |
7 ms |
8796 KB |
Output is correct |
16 |
Correct |
6 ms |
8792 KB |
Output is correct |
17 |
Correct |
8 ms |
9052 KB |
Output is correct |
18 |
Correct |
5 ms |
2896 KB |
Output is correct |
19 |
Correct |
8 ms |
9060 KB |
Output is correct |
20 |
Correct |
8 ms |
8988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1903 ms |
19792 KB |
Output is correct |
2 |
Correct |
1992 ms |
19884 KB |
Output is correct |
3 |
Correct |
1966 ms |
19988 KB |
Output is correct |
4 |
Correct |
2095 ms |
20628 KB |
Output is correct |
5 |
Correct |
912 ms |
29212 KB |
Output is correct |
6 |
Correct |
567 ms |
29420 KB |
Output is correct |
7 |
Correct |
2023 ms |
19888 KB |
Output is correct |
8 |
Correct |
1859 ms |
19888 KB |
Output is correct |
9 |
Correct |
1911 ms |
20036 KB |
Output is correct |
10 |
Correct |
1284 ms |
13704 KB |
Output is correct |
11 |
Correct |
1369 ms |
14864 KB |
Output is correct |
12 |
Correct |
2206 ms |
24092 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
368 ms |
9476 KB |
Output is correct |
2 |
Correct |
370 ms |
9836 KB |
Output is correct |
3 |
Correct |
364 ms |
9680 KB |
Output is correct |
4 |
Correct |
361 ms |
9516 KB |
Output is correct |
5 |
Correct |
1458 ms |
24376 KB |
Output is correct |
6 |
Correct |
1180 ms |
22032 KB |
Output is correct |
7 |
Correct |
1336 ms |
22800 KB |
Output is correct |
8 |
Correct |
702 ms |
28852 KB |
Output is correct |
9 |
Correct |
453 ms |
27976 KB |
Output is correct |
10 |
Correct |
511 ms |
22700 KB |
Output is correct |
11 |
Correct |
366 ms |
10400 KB |
Output is correct |
12 |
Correct |
519 ms |
22932 KB |
Output is correct |
13 |
Correct |
467 ms |
21108 KB |
Output is correct |
14 |
Correct |
319 ms |
15316 KB |
Output is correct |
15 |
Correct |
314 ms |
14396 KB |
Output is correct |
16 |
Correct |
280 ms |
12800 KB |
Output is correct |
17 |
Correct |
969 ms |
19924 KB |
Output is correct |
18 |
Correct |
976 ms |
19932 KB |
Output is correct |
19 |
Correct |
992 ms |
19684 KB |
Output is correct |
20 |
Correct |
1047 ms |
19648 KB |
Output is correct |
21 |
Correct |
319 ms |
10708 KB |
Output is correct |
22 |
Correct |
350 ms |
16756 KB |
Output is correct |
23 |
Correct |
440 ms |
19520 KB |
Output is correct |
24 |
Correct |
364 ms |
17300 KB |
Output is correct |
25 |
Correct |
371 ms |
9988 KB |
Output is correct |
26 |
Correct |
372 ms |
9592 KB |
Output is correct |
27 |
Correct |
370 ms |
9860 KB |
Output is correct |
28 |
Correct |
363 ms |
9472 KB |
Output is correct |
29 |
Correct |
480 ms |
20480 KB |
Output is correct |
30 |
Correct |
461 ms |
20376 KB |
Output is correct |
31 |
Correct |
359 ms |
28036 KB |
Output is correct |
32 |
Correct |
505 ms |
22700 KB |
Output is correct |
33 |
Correct |
486 ms |
21508 KB |
Output is correct |
34 |
Correct |
292 ms |
14400 KB |
Output is correct |
35 |
Correct |
448 ms |
19236 KB |
Output is correct |
36 |
Correct |
515 ms |
22480 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
381 ms |
9728 KB |
Output is correct |
2 |
Correct |
395 ms |
9756 KB |
Output is correct |
3 |
Correct |
383 ms |
9744 KB |
Output is correct |
4 |
Correct |
394 ms |
9712 KB |
Output is correct |
5 |
Correct |
2033 ms |
25724 KB |
Output is correct |
6 |
Correct |
1362 ms |
12624 KB |
Output is correct |
7 |
Correct |
1761 ms |
26780 KB |
Output is correct |
8 |
Correct |
1257 ms |
13984 KB |
Output is correct |
9 |
Correct |
622 ms |
16524 KB |
Output is correct |
10 |
Correct |
804 ms |
24172 KB |
Output is correct |
11 |
Correct |
596 ms |
11988 KB |
Output is correct |
12 |
Correct |
311 ms |
28892 KB |
Output is correct |
13 |
Correct |
707 ms |
21340 KB |
Output is correct |
14 |
Correct |
522 ms |
15784 KB |
Output is correct |
15 |
Correct |
529 ms |
27764 KB |
Output is correct |
16 |
Correct |
746 ms |
22252 KB |
Output is correct |
17 |
Correct |
1790 ms |
20092 KB |
Output is correct |
18 |
Correct |
1810 ms |
19724 KB |
Output is correct |
19 |
Correct |
1842 ms |
19756 KB |
Output is correct |
20 |
Correct |
1826 ms |
19676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
6 ms |
8796 KB |
Output is correct |
4 |
Correct |
7 ms |
8796 KB |
Output is correct |
5 |
Correct |
9 ms |
9564 KB |
Output is correct |
6 |
Correct |
17 ms |
9372 KB |
Output is correct |
7 |
Correct |
8 ms |
8800 KB |
Output is correct |
8 |
Correct |
8 ms |
9308 KB |
Output is correct |
9 |
Correct |
8 ms |
9308 KB |
Output is correct |
10 |
Correct |
4 ms |
2904 KB |
Output is correct |
11 |
Correct |
15 ms |
9272 KB |
Output is correct |
12 |
Correct |
15 ms |
9312 KB |
Output is correct |
13 |
Correct |
5 ms |
2908 KB |
Output is correct |
14 |
Correct |
8 ms |
9052 KB |
Output is correct |
15 |
Correct |
7 ms |
8796 KB |
Output is correct |
16 |
Correct |
6 ms |
8792 KB |
Output is correct |
17 |
Correct |
8 ms |
9052 KB |
Output is correct |
18 |
Correct |
5 ms |
2896 KB |
Output is correct |
19 |
Correct |
8 ms |
9060 KB |
Output is correct |
20 |
Correct |
8 ms |
8988 KB |
Output is correct |
21 |
Correct |
1903 ms |
19792 KB |
Output is correct |
22 |
Correct |
1992 ms |
19884 KB |
Output is correct |
23 |
Correct |
1966 ms |
19988 KB |
Output is correct |
24 |
Correct |
2095 ms |
20628 KB |
Output is correct |
25 |
Correct |
912 ms |
29212 KB |
Output is correct |
26 |
Correct |
567 ms |
29420 KB |
Output is correct |
27 |
Correct |
2023 ms |
19888 KB |
Output is correct |
28 |
Correct |
1859 ms |
19888 KB |
Output is correct |
29 |
Correct |
1911 ms |
20036 KB |
Output is correct |
30 |
Correct |
1284 ms |
13704 KB |
Output is correct |
31 |
Correct |
1369 ms |
14864 KB |
Output is correct |
32 |
Correct |
2206 ms |
24092 KB |
Output is correct |
33 |
Correct |
381 ms |
9728 KB |
Output is correct |
34 |
Correct |
395 ms |
9756 KB |
Output is correct |
35 |
Correct |
383 ms |
9744 KB |
Output is correct |
36 |
Correct |
394 ms |
9712 KB |
Output is correct |
37 |
Correct |
2033 ms |
25724 KB |
Output is correct |
38 |
Correct |
1362 ms |
12624 KB |
Output is correct |
39 |
Correct |
1761 ms |
26780 KB |
Output is correct |
40 |
Correct |
1257 ms |
13984 KB |
Output is correct |
41 |
Correct |
622 ms |
16524 KB |
Output is correct |
42 |
Correct |
804 ms |
24172 KB |
Output is correct |
43 |
Correct |
596 ms |
11988 KB |
Output is correct |
44 |
Correct |
311 ms |
28892 KB |
Output is correct |
45 |
Correct |
707 ms |
21340 KB |
Output is correct |
46 |
Correct |
522 ms |
15784 KB |
Output is correct |
47 |
Correct |
529 ms |
27764 KB |
Output is correct |
48 |
Correct |
746 ms |
22252 KB |
Output is correct |
49 |
Correct |
1790 ms |
20092 KB |
Output is correct |
50 |
Correct |
1810 ms |
19724 KB |
Output is correct |
51 |
Correct |
1842 ms |
19756 KB |
Output is correct |
52 |
Correct |
1826 ms |
19676 KB |
Output is correct |
53 |
Correct |
384 ms |
9744 KB |
Output is correct |
54 |
Correct |
421 ms |
9732 KB |
Output is correct |
55 |
Correct |
389 ms |
9968 KB |
Output is correct |
56 |
Correct |
398 ms |
9724 KB |
Output is correct |
57 |
Correct |
1430 ms |
16508 KB |
Output is correct |
58 |
Correct |
1355 ms |
11524 KB |
Output is correct |
59 |
Correct |
2097 ms |
21940 KB |
Output is correct |
60 |
Correct |
1272 ms |
11380 KB |
Output is correct |
61 |
Correct |
781 ms |
21536 KB |
Output is correct |
62 |
Correct |
650 ms |
27108 KB |
Output is correct |
63 |
Correct |
414 ms |
28476 KB |
Output is correct |
64 |
Correct |
613 ms |
27152 KB |
Output is correct |
65 |
Correct |
510 ms |
13340 KB |
Output is correct |
66 |
Correct |
491 ms |
12508 KB |
Output is correct |
67 |
Correct |
725 ms |
22368 KB |
Output is correct |
68 |
Correct |
676 ms |
19164 KB |
Output is correct |
69 |
Correct |
1850 ms |
19748 KB |
Output is correct |
70 |
Correct |
1874 ms |
19732 KB |
Output is correct |
71 |
Correct |
1801 ms |
19752 KB |
Output is correct |
72 |
Correct |
1838 ms |
20176 KB |
Output is correct |
73 |
Correct |
614 ms |
14484 KB |
Output is correct |
74 |
Correct |
787 ms |
19132 KB |
Output is correct |
75 |
Correct |
223 ms |
29480 KB |
Output is correct |
76 |
Correct |
445 ms |
28456 KB |
Output is correct |
77 |
Correct |
402 ms |
9768 KB |
Output is correct |
78 |
Correct |
394 ms |
9792 KB |
Output is correct |
79 |
Correct |
402 ms |
9724 KB |
Output is correct |
80 |
Correct |
394 ms |
9764 KB |
Output is correct |
81 |
Correct |
752 ms |
18532 KB |
Output is correct |
82 |
Correct |
628 ms |
14272 KB |
Output is correct |
83 |
Correct |
600 ms |
12332 KB |
Output is correct |
84 |
Correct |
705 ms |
18920 KB |
Output is correct |
85 |
Correct |
741 ms |
22504 KB |
Output is correct |
86 |
Correct |
748 ms |
22872 KB |
Output is correct |
87 |
Correct |
549 ms |
16804 KB |
Output is correct |
88 |
Correct |
496 ms |
12228 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
6 ms |
8796 KB |
Output is correct |
4 |
Correct |
7 ms |
8796 KB |
Output is correct |
5 |
Correct |
9 ms |
9564 KB |
Output is correct |
6 |
Correct |
17 ms |
9372 KB |
Output is correct |
7 |
Correct |
8 ms |
8800 KB |
Output is correct |
8 |
Correct |
8 ms |
9308 KB |
Output is correct |
9 |
Correct |
8 ms |
9308 KB |
Output is correct |
10 |
Correct |
4 ms |
2904 KB |
Output is correct |
11 |
Correct |
15 ms |
9272 KB |
Output is correct |
12 |
Correct |
15 ms |
9312 KB |
Output is correct |
13 |
Correct |
5 ms |
2908 KB |
Output is correct |
14 |
Correct |
8 ms |
9052 KB |
Output is correct |
15 |
Correct |
7 ms |
8796 KB |
Output is correct |
16 |
Correct |
6 ms |
8792 KB |
Output is correct |
17 |
Correct |
8 ms |
9052 KB |
Output is correct |
18 |
Correct |
5 ms |
2896 KB |
Output is correct |
19 |
Correct |
8 ms |
9060 KB |
Output is correct |
20 |
Correct |
8 ms |
8988 KB |
Output is correct |
21 |
Correct |
1903 ms |
19792 KB |
Output is correct |
22 |
Correct |
1992 ms |
19884 KB |
Output is correct |
23 |
Correct |
1966 ms |
19988 KB |
Output is correct |
24 |
Correct |
2095 ms |
20628 KB |
Output is correct |
25 |
Correct |
912 ms |
29212 KB |
Output is correct |
26 |
Correct |
567 ms |
29420 KB |
Output is correct |
27 |
Correct |
2023 ms |
19888 KB |
Output is correct |
28 |
Correct |
1859 ms |
19888 KB |
Output is correct |
29 |
Correct |
1911 ms |
20036 KB |
Output is correct |
30 |
Correct |
1284 ms |
13704 KB |
Output is correct |
31 |
Correct |
1369 ms |
14864 KB |
Output is correct |
32 |
Correct |
2206 ms |
24092 KB |
Output is correct |
33 |
Correct |
368 ms |
9476 KB |
Output is correct |
34 |
Correct |
370 ms |
9836 KB |
Output is correct |
35 |
Correct |
364 ms |
9680 KB |
Output is correct |
36 |
Correct |
361 ms |
9516 KB |
Output is correct |
37 |
Correct |
1458 ms |
24376 KB |
Output is correct |
38 |
Correct |
1180 ms |
22032 KB |
Output is correct |
39 |
Correct |
1336 ms |
22800 KB |
Output is correct |
40 |
Correct |
702 ms |
28852 KB |
Output is correct |
41 |
Correct |
453 ms |
27976 KB |
Output is correct |
42 |
Correct |
511 ms |
22700 KB |
Output is correct |
43 |
Correct |
366 ms |
10400 KB |
Output is correct |
44 |
Correct |
519 ms |
22932 KB |
Output is correct |
45 |
Correct |
467 ms |
21108 KB |
Output is correct |
46 |
Correct |
319 ms |
15316 KB |
Output is correct |
47 |
Correct |
314 ms |
14396 KB |
Output is correct |
48 |
Correct |
280 ms |
12800 KB |
Output is correct |
49 |
Correct |
969 ms |
19924 KB |
Output is correct |
50 |
Correct |
976 ms |
19932 KB |
Output is correct |
51 |
Correct |
992 ms |
19684 KB |
Output is correct |
52 |
Correct |
1047 ms |
19648 KB |
Output is correct |
53 |
Correct |
319 ms |
10708 KB |
Output is correct |
54 |
Correct |
350 ms |
16756 KB |
Output is correct |
55 |
Correct |
440 ms |
19520 KB |
Output is correct |
56 |
Correct |
364 ms |
17300 KB |
Output is correct |
57 |
Correct |
371 ms |
9988 KB |
Output is correct |
58 |
Correct |
372 ms |
9592 KB |
Output is correct |
59 |
Correct |
370 ms |
9860 KB |
Output is correct |
60 |
Correct |
363 ms |
9472 KB |
Output is correct |
61 |
Correct |
480 ms |
20480 KB |
Output is correct |
62 |
Correct |
461 ms |
20376 KB |
Output is correct |
63 |
Correct |
359 ms |
28036 KB |
Output is correct |
64 |
Correct |
505 ms |
22700 KB |
Output is correct |
65 |
Correct |
486 ms |
21508 KB |
Output is correct |
66 |
Correct |
292 ms |
14400 KB |
Output is correct |
67 |
Correct |
448 ms |
19236 KB |
Output is correct |
68 |
Correct |
515 ms |
22480 KB |
Output is correct |
69 |
Correct |
381 ms |
9728 KB |
Output is correct |
70 |
Correct |
395 ms |
9756 KB |
Output is correct |
71 |
Correct |
383 ms |
9744 KB |
Output is correct |
72 |
Correct |
394 ms |
9712 KB |
Output is correct |
73 |
Correct |
2033 ms |
25724 KB |
Output is correct |
74 |
Correct |
1362 ms |
12624 KB |
Output is correct |
75 |
Correct |
1761 ms |
26780 KB |
Output is correct |
76 |
Correct |
1257 ms |
13984 KB |
Output is correct |
77 |
Correct |
622 ms |
16524 KB |
Output is correct |
78 |
Correct |
804 ms |
24172 KB |
Output is correct |
79 |
Correct |
596 ms |
11988 KB |
Output is correct |
80 |
Correct |
311 ms |
28892 KB |
Output is correct |
81 |
Correct |
707 ms |
21340 KB |
Output is correct |
82 |
Correct |
522 ms |
15784 KB |
Output is correct |
83 |
Correct |
529 ms |
27764 KB |
Output is correct |
84 |
Correct |
746 ms |
22252 KB |
Output is correct |
85 |
Correct |
1790 ms |
20092 KB |
Output is correct |
86 |
Correct |
1810 ms |
19724 KB |
Output is correct |
87 |
Correct |
1842 ms |
19756 KB |
Output is correct |
88 |
Correct |
1826 ms |
19676 KB |
Output is correct |
89 |
Correct |
384 ms |
9744 KB |
Output is correct |
90 |
Correct |
421 ms |
9732 KB |
Output is correct |
91 |
Correct |
389 ms |
9968 KB |
Output is correct |
92 |
Correct |
398 ms |
9724 KB |
Output is correct |
93 |
Correct |
1430 ms |
16508 KB |
Output is correct |
94 |
Correct |
1355 ms |
11524 KB |
Output is correct |
95 |
Correct |
2097 ms |
21940 KB |
Output is correct |
96 |
Correct |
1272 ms |
11380 KB |
Output is correct |
97 |
Correct |
781 ms |
21536 KB |
Output is correct |
98 |
Correct |
650 ms |
27108 KB |
Output is correct |
99 |
Correct |
414 ms |
28476 KB |
Output is correct |
100 |
Correct |
613 ms |
27152 KB |
Output is correct |
101 |
Correct |
510 ms |
13340 KB |
Output is correct |
102 |
Correct |
491 ms |
12508 KB |
Output is correct |
103 |
Correct |
725 ms |
22368 KB |
Output is correct |
104 |
Correct |
676 ms |
19164 KB |
Output is correct |
105 |
Correct |
1850 ms |
19748 KB |
Output is correct |
106 |
Correct |
1874 ms |
19732 KB |
Output is correct |
107 |
Correct |
1801 ms |
19752 KB |
Output is correct |
108 |
Correct |
1838 ms |
20176 KB |
Output is correct |
109 |
Correct |
614 ms |
14484 KB |
Output is correct |
110 |
Correct |
787 ms |
19132 KB |
Output is correct |
111 |
Correct |
223 ms |
29480 KB |
Output is correct |
112 |
Correct |
445 ms |
28456 KB |
Output is correct |
113 |
Correct |
402 ms |
9768 KB |
Output is correct |
114 |
Correct |
394 ms |
9792 KB |
Output is correct |
115 |
Correct |
402 ms |
9724 KB |
Output is correct |
116 |
Correct |
394 ms |
9764 KB |
Output is correct |
117 |
Correct |
752 ms |
18532 KB |
Output is correct |
118 |
Correct |
628 ms |
14272 KB |
Output is correct |
119 |
Correct |
600 ms |
12332 KB |
Output is correct |
120 |
Correct |
705 ms |
18920 KB |
Output is correct |
121 |
Correct |
741 ms |
22504 KB |
Output is correct |
122 |
Correct |
748 ms |
22872 KB |
Output is correct |
123 |
Correct |
549 ms |
16804 KB |
Output is correct |
124 |
Correct |
496 ms |
12228 KB |
Output is correct |
125 |
Correct |
1133 ms |
10612 KB |
Output is correct |
126 |
Correct |
1141 ms |
10244 KB |
Output is correct |
127 |
Correct |
1165 ms |
10652 KB |
Output is correct |
128 |
Correct |
1143 ms |
10672 KB |
Output is correct |
129 |
Correct |
1142 ms |
10404 KB |
Output is correct |
130 |
Correct |
1141 ms |
10892 KB |
Output is correct |
131 |
Correct |
3672 ms |
14368 KB |
Output is correct |
132 |
Execution timed out |
5039 ms |
31084 KB |
Time limit exceeded |
133 |
Halted |
0 ms |
0 KB |
- |