// incorrect/felix-radewoosh-plus-jumps.cpp
#include "hieroglyphs.h"
#include<bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using ii = pair<int, int>;
const int ALPHABET_SIZE = 200'001;
bool verify_jump(const vi& a, const vi& b, const vi& c) {
if (c == vi({-1})) return false;
if (c == vi()) return true;
int n = a.size();
int m = b.size();
int l = c.size();
vi occ_a(ALPHABET_SIZE, 0);
vi occ_b(ALPHABET_SIZE, 0);
vi occ_c(ALPHABET_SIZE, 0);
vvi pos_a(ALPHABET_SIZE);
vvi pos_b(ALPHABET_SIZE);
vvi pos_c(ALPHABET_SIZE);
for (int i=0; i < n; ++i) {
occ_a[a[i]]++;
pos_a[a[i]].push_back(i);
}
for (int i=0; i < m; ++i) {
occ_b[b[i]]++;
pos_b[b[i]].push_back(i);
}
for (int i=0; i < l; ++i) {
occ_c[c[i]]++;
pos_c[c[i]].push_back(i);
}
vi pos_c_idx(ALPHABET_SIZE);
vi jump_left(l);
for (int i=0; i < l; ++i) jump_left[i] = i;
int c_idx = 0;
for (int j=0; j < m; ++j) {
int idx = pos_c_idx[b[j]];
if (idx < occ_c[b[j]]) {
jump_left[pos_c[b[j]][idx]] = min(jump_left[pos_c[b[j]][idx]], c_idx);
pos_c_idx[b[j]]++;
}
if (b[j] == c[c_idx]) {
c_idx++;
if (c_idx == l) break;
}
}
vi jump_right(l);
for (int i=0; i < l; ++i) jump_right[i] = i;
c_idx--;
for (int i=n-1; i > -1; --i) {
int idx = pos_c_idx[a[i]]-1;
if (idx > -1) {
jump_right[pos_c[a[i]][idx]] = max(jump_right[pos_c[a[i]][idx]], c_idx);
pos_c_idx[a[i]]--;
}
if (a[i] == c[c_idx]) {
//pos_c_idx[a[i]]--;
c_idx--;
if (c_idx < 0) break;
}
}
vector<ii> stack_jump;
for (int k=0; k < l; ++k) {
while (!stack_jump.empty() && stack_jump.back().second < k) {
stack_jump.pop_back();
}
if (!stack_jump.empty() && stack_jump.back().first >= jump_left[k]) {
return false;
}
while (!stack_jump.empty() && stack_jump.back().second < jump_right[k]) {
stack_jump.pop_back();
}
stack_jump.emplace_back(k, jump_right[k]);
}
return true;
}
bool verify(const vi& a, const vi& b, const vi& c) {
return verify_jump(a, b, c) && verify_jump(b, a, c);
}
using pii=pair<int, int>;
const int nax=1007*1000;
int n, m;
int ilea[nax];
int ileb[nax];
int potrzebuje[nax];
vi pozy[nax];
int potrzebujewa[nax];
int potrzebujewb[nax];
vi licz_harde(vi a, vi b)
{
n=a.size();
m=b.size();
for (int i=0; i<nax; i++)
ilea[i]=ileb[i]=0;
for (int i : a)
ilea[i]++;
for (int i : b)
ileb[i]++;
vector<pii> za, zb;
for (int i=0; i<n; i++)
if (ilea[a[i]]<=ileb[a[i]])
za.push_back({a[i], i});
for (int i=0; i<m; i++)
if (ilea[b[i]]>ileb[b[i]])
zb.push_back({b[i], i});
{
potrzebujewa[zb.size()]=n;
int wsk=zb.size();
for (int i=n-1; i>=0; i--)
{
if (wsk && zb[wsk-1].first==a[i])
{
wsk--;
potrzebujewa[wsk]=i;
}
}
}
{
potrzebujewb[za.size()]=m;
int wsk=za.size();
for (int i=m-1; i>=0; i--)
{
if (wsk && za[wsk-1].first==b[i])
{
wsk--;
potrzebujewb[wsk]=i;
}
}
}
vi ret;
int wska=0;
int wskb=0;
int gdz=0;
for (int i : a)
{
if (wska<(int)za.size() && i==za[wska].first)
{
while(gdz<m && b[gdz]!=i)
gdz++;
if (gdz==m)
return {-1};
gdz++;
ret.push_back(i);
wska++;
}
if (wskb<(int)zb.size() && i==zb[wskb].first && gdz<=zb[wskb].second && potrzebujewb[wska]>zb[wskb].second)
{
ret.push_back(i);
gdz=zb[wskb].second+1;
wskb++;
}
}
if ((int)ret.size()<(int)za.size()+(int)zb.size())
return {-1};
return ret;
}
vi licz_proste(vi a, vi b, int numwy)
{
n=a.size();
m=b.size();
for (int i=0; i<nax; i++)
ilea[i]=ileb[i]=0;
for (int i : a)
ilea[i]++;
for (int i : b)
ileb[i]++;
vector<pii> za;
for (int i=0; i<n; i++)
if (ilea[a[i]]<=ileb[a[i]]-numwy)
za.push_back({a[i], i});
{
potrzebuje[za.size()]=m;
int wsk=za.size();
for (int i=m-1; i>=0; i--)
{
if (wsk && za[wsk-1].first==b[i])
{
wsk--;
potrzebuje[wsk]=i;
}
}
if (wsk)
return {-1};
}
for (int i=0; i<nax; i++)
pozy[i].clear();
for (int i=m-1; i>=0; i--)
pozy[b[i]].push_back(i);
vi ret;
int wsk=0;
int gdz=0;
for (int i : a)
{
if (wsk<(int)za.size() && i==za[wsk].first)
{
while(gdz<m && b[gdz]!=i)
gdz++;
assert(gdz<m);
gdz++;
ret.push_back(i);
wsk++;
}
else
{
while(!pozy[i].empty() && pozy[i].back()<gdz)
pozy[i].pop_back();
if (!pozy[i].empty() && potrzebuje[wsk]>pozy[i].back())
{
ret.push_back(i);
gdz=pozy[i].back()+1;
}
}
}
return ret;
}
vi prosty(vi a, vi b)
{
n=a.size();
m=b.size();
for (int i=0; i<nax; i++)
pozy[i].clear();
for (int i=m-1; i>=0; i--)
pozy[b[i]].push_back(i);
int gdz=0;
vi ret;
for (int i : a)
{
while(!pozy[i].empty() && pozy[i].back()<gdz)
pozy[i].pop_back();
if (!pozy[i].empty())
{
ret.push_back(i);
gdz=pozy[i].back()+1;
}
}
return ret;
}
int zawiera(vi kto, vi kogo)
{
int wsk=0;
for (int i : kto)
if (wsk<(int)kogo.size() && i==kogo[wsk])
wsk++;
return wsk==(int)kogo.size();
}
vi ucs_radewoosh(vi a, vi b)
{
vi odp=licz_harde(a, b);
vi raz=licz_proste(a, b, 0);
vi dwa=licz_proste(b, a, 1);
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
vi trz=licz_proste(a, b, 0);
vi czt=licz_proste(b, a, 1);
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
reverse(trz.begin(), trz.end());
reverse(czt.begin(), czt.end());
vi x=prosty(a, b);
vi y=prosty(b, a);
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
vi z=prosty(a, b);
vi w=prosty(b, a);
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
reverse(z.begin(), z.end());
reverse(w.begin(), w.end());
if (zawiera(odp, raz) && zawiera(odp, dwa) && zawiera(odp, trz) && zawiera(odp, czt) && zawiera(odp, x) && zawiera(odp, y) && zawiera(odp, z) && zawiera(odp, w))
return odp;
return {-1};
}
vi ucs_radewoosh_plus_prefix_suffix(vi a, vi b) {
vi cpref;
vi csuf;
while (!a.empty() && !b.empty() && a.back() == b.back()) {
csuf.push_back(a.back());
a.pop_back();
b.pop_back();
}
reverse(csuf.begin(), csuf.end());
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
while (!a.empty() && !b.empty() && a.back() == b.back()) {
cpref.push_back(a.back());
a.pop_back();
b.pop_back();
}
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
vi rc = ucs_radewoosh(a, b);
if (rc == vi({-1})) return rc;
vi c;
for (int x : cpref) c.push_back(x);
for (int x : rc) c.push_back(x);
for (int x : csuf) c.push_back(x);
return c;
}
vector<int> ucs(vector<int> a, vector<int> b) {
vi c = ucs_radewoosh_plus_prefix_suffix(a, b);
if (!verify(a, b, c)) return {-1};
return c;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
54620 KB |
Output is correct |
2 |
Correct |
17 ms |
37464 KB |
Output is correct |
3 |
Correct |
13 ms |
37468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
54620 KB |
Output is correct |
2 |
Correct |
11 ms |
37468 KB |
Output is correct |
3 |
Correct |
23 ms |
54668 KB |
Output is correct |
4 |
Correct |
11 ms |
37468 KB |
Output is correct |
5 |
Correct |
101 ms |
66704 KB |
Output is correct |
6 |
Correct |
44 ms |
48148 KB |
Output is correct |
7 |
Correct |
25 ms |
40148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
54620 KB |
Output is correct |
2 |
Correct |
11 ms |
37468 KB |
Output is correct |
3 |
Correct |
23 ms |
54668 KB |
Output is correct |
4 |
Correct |
11 ms |
37468 KB |
Output is correct |
5 |
Correct |
101 ms |
66704 KB |
Output is correct |
6 |
Correct |
44 ms |
48148 KB |
Output is correct |
7 |
Correct |
25 ms |
40148 KB |
Output is correct |
8 |
Correct |
112 ms |
64296 KB |
Output is correct |
9 |
Correct |
126 ms |
64416 KB |
Output is correct |
10 |
Correct |
130 ms |
64324 KB |
Output is correct |
11 |
Correct |
127 ms |
64416 KB |
Output is correct |
12 |
Correct |
129 ms |
64348 KB |
Output is correct |
13 |
Correct |
139 ms |
64336 KB |
Output is correct |
14 |
Correct |
125 ms |
64472 KB |
Output is correct |
15 |
Correct |
133 ms |
64480 KB |
Output is correct |
16 |
Correct |
127 ms |
64340 KB |
Output is correct |
17 |
Correct |
127 ms |
64464 KB |
Output is correct |
18 |
Correct |
25 ms |
54620 KB |
Output is correct |
19 |
Correct |
24 ms |
54636 KB |
Output is correct |
20 |
Correct |
31 ms |
54608 KB |
Output is correct |
21 |
Correct |
27 ms |
54876 KB |
Output is correct |
22 |
Correct |
79 ms |
61340 KB |
Output is correct |
23 |
Correct |
128 ms |
65672 KB |
Output is correct |
24 |
Correct |
128 ms |
65652 KB |
Output is correct |
25 |
Correct |
131 ms |
65704 KB |
Output is correct |
26 |
Correct |
98 ms |
62460 KB |
Output is correct |
27 |
Correct |
126 ms |
64420 KB |
Output is correct |
28 |
Correct |
129 ms |
64416 KB |
Output is correct |
29 |
Correct |
65 ms |
46364 KB |
Output is correct |
30 |
Correct |
67 ms |
46136 KB |
Output is correct |
31 |
Correct |
116 ms |
64324 KB |
Output is correct |
32 |
Correct |
66 ms |
45800 KB |
Output is correct |
33 |
Correct |
119 ms |
64340 KB |
Output is correct |
34 |
Correct |
98 ms |
63596 KB |
Output is correct |
35 |
Correct |
68 ms |
46624 KB |
Output is correct |
36 |
Correct |
60 ms |
46584 KB |
Output is correct |
37 |
Correct |
59 ms |
46132 KB |
Output is correct |
38 |
Correct |
109 ms |
64332 KB |
Output is correct |
39 |
Correct |
58 ms |
46644 KB |
Output is correct |
40 |
Correct |
59 ms |
46136 KB |
Output is correct |
41 |
Correct |
111 ms |
64332 KB |
Output is correct |
42 |
Correct |
61 ms |
46388 KB |
Output is correct |
43 |
Correct |
60 ms |
46132 KB |
Output is correct |
44 |
Correct |
87 ms |
46132 KB |
Output is correct |
45 |
Correct |
62 ms |
46132 KB |
Output is correct |
46 |
Correct |
93 ms |
64444 KB |
Output is correct |
47 |
Correct |
67 ms |
46396 KB |
Output is correct |
48 |
Correct |
88 ms |
46300 KB |
Output is correct |
49 |
Correct |
70 ms |
46392 KB |
Output is correct |
50 |
Correct |
118 ms |
64476 KB |
Output is correct |
51 |
Correct |
142 ms |
64432 KB |
Output is correct |
52 |
Correct |
91 ms |
46100 KB |
Output is correct |
53 |
Correct |
60 ms |
45876 KB |
Output is correct |
54 |
Correct |
61 ms |
46132 KB |
Output is correct |
55 |
Correct |
59 ms |
46136 KB |
Output is correct |
56 |
Correct |
117 ms |
64368 KB |
Output is correct |
57 |
Correct |
85 ms |
64348 KB |
Output is correct |
58 |
Correct |
60 ms |
46388 KB |
Output is correct |
59 |
Correct |
60 ms |
46392 KB |
Output is correct |
60 |
Correct |
58 ms |
46388 KB |
Output is correct |
61 |
Correct |
63 ms |
46132 KB |
Output is correct |
62 |
Correct |
58 ms |
46132 KB |
Output is correct |
63 |
Correct |
63 ms |
46460 KB |
Output is correct |
64 |
Correct |
65 ms |
46132 KB |
Output is correct |
65 |
Correct |
65 ms |
46132 KB |
Output is correct |
66 |
Correct |
122 ms |
64468 KB |
Output is correct |
67 |
Correct |
127 ms |
64380 KB |
Output is correct |
68 |
Correct |
67 ms |
46132 KB |
Output is correct |
69 |
Correct |
15 ms |
37468 KB |
Output is correct |
70 |
Correct |
13 ms |
37468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
51 ms |
58964 KB |
Output is correct |
2 |
Correct |
57 ms |
59088 KB |
Output is correct |
3 |
Correct |
57 ms |
61256 KB |
Output is correct |
4 |
Correct |
61 ms |
61004 KB |
Output is correct |
5 |
Correct |
72 ms |
61664 KB |
Output is correct |
6 |
Correct |
40 ms |
56936 KB |
Output is correct |
7 |
Correct |
21 ms |
54616 KB |
Output is correct |
8 |
Correct |
21 ms |
54616 KB |
Output is correct |
9 |
Correct |
21 ms |
54620 KB |
Output is correct |
10 |
Correct |
23 ms |
54616 KB |
Output is correct |
11 |
Correct |
22 ms |
54620 KB |
Output is correct |
12 |
Correct |
12 ms |
37468 KB |
Output is correct |
13 |
Correct |
12 ms |
37488 KB |
Output is correct |
14 |
Correct |
12 ms |
37464 KB |
Output is correct |
15 |
Correct |
13 ms |
37464 KB |
Output is correct |
16 |
Correct |
54 ms |
59752 KB |
Output is correct |
17 |
Correct |
32 ms |
45768 KB |
Output is correct |
18 |
Correct |
39 ms |
57772 KB |
Output is correct |
19 |
Correct |
24 ms |
40948 KB |
Output is correct |
20 |
Correct |
50 ms |
58348 KB |
Output is correct |
21 |
Correct |
28 ms |
41924 KB |
Output is correct |
22 |
Correct |
33 ms |
46760 KB |
Output is correct |
23 |
Correct |
36 ms |
49740 KB |
Output is correct |
24 |
Correct |
40 ms |
50860 KB |
Output is correct |
25 |
Correct |
31 ms |
46092 KB |
Output is correct |
26 |
Correct |
46 ms |
51624 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
112 ms |
64296 KB |
Output is correct |
2 |
Correct |
126 ms |
64416 KB |
Output is correct |
3 |
Correct |
130 ms |
64324 KB |
Output is correct |
4 |
Correct |
127 ms |
64416 KB |
Output is correct |
5 |
Correct |
129 ms |
64348 KB |
Output is correct |
6 |
Correct |
139 ms |
64336 KB |
Output is correct |
7 |
Correct |
125 ms |
64472 KB |
Output is correct |
8 |
Correct |
133 ms |
64480 KB |
Output is correct |
9 |
Correct |
127 ms |
64340 KB |
Output is correct |
10 |
Correct |
127 ms |
64464 KB |
Output is correct |
11 |
Correct |
25 ms |
54620 KB |
Output is correct |
12 |
Correct |
24 ms |
54636 KB |
Output is correct |
13 |
Correct |
31 ms |
54608 KB |
Output is correct |
14 |
Correct |
27 ms |
54876 KB |
Output is correct |
15 |
Correct |
79 ms |
61340 KB |
Output is correct |
16 |
Correct |
128 ms |
65672 KB |
Output is correct |
17 |
Correct |
128 ms |
65652 KB |
Output is correct |
18 |
Correct |
131 ms |
65704 KB |
Output is correct |
19 |
Correct |
98 ms |
62460 KB |
Output is correct |
20 |
Correct |
51 ms |
58964 KB |
Output is correct |
21 |
Correct |
57 ms |
59088 KB |
Output is correct |
22 |
Correct |
57 ms |
61256 KB |
Output is correct |
23 |
Correct |
61 ms |
61004 KB |
Output is correct |
24 |
Correct |
72 ms |
61664 KB |
Output is correct |
25 |
Correct |
40 ms |
56936 KB |
Output is correct |
26 |
Correct |
27 ms |
54876 KB |
Output is correct |
27 |
Correct |
28 ms |
54872 KB |
Output is correct |
28 |
Correct |
24 ms |
54876 KB |
Output is correct |
29 |
Correct |
28 ms |
54800 KB |
Output is correct |
30 |
Correct |
24 ms |
54836 KB |
Output is correct |
31 |
Correct |
27 ms |
54804 KB |
Output is correct |
32 |
Correct |
26 ms |
54796 KB |
Output is correct |
33 |
Correct |
31 ms |
54872 KB |
Output is correct |
34 |
Correct |
37 ms |
56012 KB |
Output is correct |
35 |
Correct |
67 ms |
61500 KB |
Output is correct |
36 |
Correct |
90 ms |
62176 KB |
Output is correct |
37 |
Correct |
73 ms |
62136 KB |
Output is correct |
38 |
Correct |
76 ms |
61760 KB |
Output is correct |
39 |
Correct |
71 ms |
61960 KB |
Output is correct |
40 |
Correct |
117 ms |
65176 KB |
Output is correct |
41 |
Correct |
110 ms |
61232 KB |
Output is correct |
42 |
Correct |
85 ms |
58612 KB |
Output is correct |
43 |
Correct |
53 ms |
58320 KB |
Output is correct |
44 |
Correct |
53 ms |
58660 KB |
Output is correct |
45 |
Correct |
53 ms |
58692 KB |
Output is correct |
46 |
Correct |
116 ms |
61620 KB |
Output is correct |
47 |
Correct |
111 ms |
61504 KB |
Output is correct |
48 |
Correct |
104 ms |
61472 KB |
Output is correct |
49 |
Correct |
106 ms |
60944 KB |
Output is correct |
50 |
Correct |
101 ms |
60880 KB |
Output is correct |
51 |
Correct |
105 ms |
60944 KB |
Output is correct |
52 |
Correct |
101 ms |
61304 KB |
Output is correct |
53 |
Correct |
102 ms |
61160 KB |
Output is correct |
54 |
Correct |
113 ms |
61264 KB |
Output is correct |
55 |
Correct |
41 ms |
56508 KB |
Output is correct |
56 |
Correct |
88 ms |
61932 KB |
Output is correct |
57 |
Correct |
75 ms |
61900 KB |
Output is correct |
58 |
Correct |
86 ms |
62112 KB |
Output is correct |
59 |
Correct |
78 ms |
62076 KB |
Output is correct |
60 |
Correct |
121 ms |
60372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
21 ms |
54616 KB |
Output is correct |
2 |
Correct |
21 ms |
54616 KB |
Output is correct |
3 |
Correct |
21 ms |
54620 KB |
Output is correct |
4 |
Correct |
23 ms |
54616 KB |
Output is correct |
5 |
Correct |
22 ms |
54620 KB |
Output is correct |
6 |
Correct |
12 ms |
37468 KB |
Output is correct |
7 |
Correct |
12 ms |
37488 KB |
Output is correct |
8 |
Correct |
12 ms |
37464 KB |
Output is correct |
9 |
Correct |
13 ms |
37464 KB |
Output is correct |
10 |
Correct |
27 ms |
54876 KB |
Output is correct |
11 |
Correct |
28 ms |
54872 KB |
Output is correct |
12 |
Correct |
24 ms |
54876 KB |
Output is correct |
13 |
Correct |
28 ms |
54800 KB |
Output is correct |
14 |
Correct |
24 ms |
54836 KB |
Output is correct |
15 |
Correct |
27 ms |
54804 KB |
Output is correct |
16 |
Correct |
26 ms |
54796 KB |
Output is correct |
17 |
Correct |
31 ms |
54872 KB |
Output is correct |
18 |
Correct |
23 ms |
54844 KB |
Output is correct |
19 |
Correct |
23 ms |
54876 KB |
Output is correct |
20 |
Correct |
23 ms |
54876 KB |
Output is correct |
21 |
Correct |
24 ms |
54876 KB |
Output is correct |
22 |
Correct |
16 ms |
37724 KB |
Output is correct |
23 |
Correct |
13 ms |
37724 KB |
Output is correct |
24 |
Correct |
25 ms |
54876 KB |
Output is correct |
25 |
Correct |
25 ms |
54972 KB |
Output is correct |
26 |
Correct |
14 ms |
37724 KB |
Output is correct |
27 |
Correct |
23 ms |
54780 KB |
Output is correct |
28 |
Correct |
27 ms |
54824 KB |
Output is correct |
29 |
Correct |
25 ms |
54972 KB |
Output is correct |
30 |
Correct |
23 ms |
54988 KB |
Output is correct |
31 |
Correct |
24 ms |
54972 KB |
Output is correct |
32 |
Correct |
24 ms |
54736 KB |
Output is correct |
33 |
Incorrect |
24 ms |
54616 KB |
Output isn't correct |
34 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
54620 KB |
Output is correct |
2 |
Correct |
17 ms |
37464 KB |
Output is correct |
3 |
Correct |
13 ms |
37468 KB |
Output is correct |
4 |
Correct |
21 ms |
54620 KB |
Output is correct |
5 |
Correct |
11 ms |
37468 KB |
Output is correct |
6 |
Correct |
23 ms |
54668 KB |
Output is correct |
7 |
Correct |
11 ms |
37468 KB |
Output is correct |
8 |
Correct |
101 ms |
66704 KB |
Output is correct |
9 |
Correct |
44 ms |
48148 KB |
Output is correct |
10 |
Correct |
25 ms |
40148 KB |
Output is correct |
11 |
Correct |
112 ms |
64296 KB |
Output is correct |
12 |
Correct |
126 ms |
64416 KB |
Output is correct |
13 |
Correct |
130 ms |
64324 KB |
Output is correct |
14 |
Correct |
127 ms |
64416 KB |
Output is correct |
15 |
Correct |
129 ms |
64348 KB |
Output is correct |
16 |
Correct |
139 ms |
64336 KB |
Output is correct |
17 |
Correct |
125 ms |
64472 KB |
Output is correct |
18 |
Correct |
133 ms |
64480 KB |
Output is correct |
19 |
Correct |
127 ms |
64340 KB |
Output is correct |
20 |
Correct |
127 ms |
64464 KB |
Output is correct |
21 |
Correct |
25 ms |
54620 KB |
Output is correct |
22 |
Correct |
24 ms |
54636 KB |
Output is correct |
23 |
Correct |
31 ms |
54608 KB |
Output is correct |
24 |
Correct |
27 ms |
54876 KB |
Output is correct |
25 |
Correct |
79 ms |
61340 KB |
Output is correct |
26 |
Correct |
128 ms |
65672 KB |
Output is correct |
27 |
Correct |
128 ms |
65652 KB |
Output is correct |
28 |
Correct |
131 ms |
65704 KB |
Output is correct |
29 |
Correct |
98 ms |
62460 KB |
Output is correct |
30 |
Correct |
126 ms |
64420 KB |
Output is correct |
31 |
Correct |
129 ms |
64416 KB |
Output is correct |
32 |
Correct |
65 ms |
46364 KB |
Output is correct |
33 |
Correct |
67 ms |
46136 KB |
Output is correct |
34 |
Correct |
116 ms |
64324 KB |
Output is correct |
35 |
Correct |
66 ms |
45800 KB |
Output is correct |
36 |
Correct |
119 ms |
64340 KB |
Output is correct |
37 |
Correct |
98 ms |
63596 KB |
Output is correct |
38 |
Correct |
68 ms |
46624 KB |
Output is correct |
39 |
Correct |
60 ms |
46584 KB |
Output is correct |
40 |
Correct |
59 ms |
46132 KB |
Output is correct |
41 |
Correct |
109 ms |
64332 KB |
Output is correct |
42 |
Correct |
58 ms |
46644 KB |
Output is correct |
43 |
Correct |
59 ms |
46136 KB |
Output is correct |
44 |
Correct |
111 ms |
64332 KB |
Output is correct |
45 |
Correct |
61 ms |
46388 KB |
Output is correct |
46 |
Correct |
60 ms |
46132 KB |
Output is correct |
47 |
Correct |
87 ms |
46132 KB |
Output is correct |
48 |
Correct |
62 ms |
46132 KB |
Output is correct |
49 |
Correct |
93 ms |
64444 KB |
Output is correct |
50 |
Correct |
67 ms |
46396 KB |
Output is correct |
51 |
Correct |
88 ms |
46300 KB |
Output is correct |
52 |
Correct |
70 ms |
46392 KB |
Output is correct |
53 |
Correct |
118 ms |
64476 KB |
Output is correct |
54 |
Correct |
142 ms |
64432 KB |
Output is correct |
55 |
Correct |
91 ms |
46100 KB |
Output is correct |
56 |
Correct |
60 ms |
45876 KB |
Output is correct |
57 |
Correct |
61 ms |
46132 KB |
Output is correct |
58 |
Correct |
59 ms |
46136 KB |
Output is correct |
59 |
Correct |
117 ms |
64368 KB |
Output is correct |
60 |
Correct |
85 ms |
64348 KB |
Output is correct |
61 |
Correct |
60 ms |
46388 KB |
Output is correct |
62 |
Correct |
60 ms |
46392 KB |
Output is correct |
63 |
Correct |
58 ms |
46388 KB |
Output is correct |
64 |
Correct |
63 ms |
46132 KB |
Output is correct |
65 |
Correct |
58 ms |
46132 KB |
Output is correct |
66 |
Correct |
63 ms |
46460 KB |
Output is correct |
67 |
Correct |
65 ms |
46132 KB |
Output is correct |
68 |
Correct |
65 ms |
46132 KB |
Output is correct |
69 |
Correct |
122 ms |
64468 KB |
Output is correct |
70 |
Correct |
127 ms |
64380 KB |
Output is correct |
71 |
Correct |
67 ms |
46132 KB |
Output is correct |
72 |
Correct |
15 ms |
37468 KB |
Output is correct |
73 |
Correct |
13 ms |
37468 KB |
Output is correct |
74 |
Correct |
51 ms |
58964 KB |
Output is correct |
75 |
Correct |
57 ms |
59088 KB |
Output is correct |
76 |
Correct |
57 ms |
61256 KB |
Output is correct |
77 |
Correct |
61 ms |
61004 KB |
Output is correct |
78 |
Correct |
72 ms |
61664 KB |
Output is correct |
79 |
Correct |
40 ms |
56936 KB |
Output is correct |
80 |
Correct |
21 ms |
54616 KB |
Output is correct |
81 |
Correct |
21 ms |
54616 KB |
Output is correct |
82 |
Correct |
21 ms |
54620 KB |
Output is correct |
83 |
Correct |
23 ms |
54616 KB |
Output is correct |
84 |
Correct |
22 ms |
54620 KB |
Output is correct |
85 |
Correct |
12 ms |
37468 KB |
Output is correct |
86 |
Correct |
12 ms |
37488 KB |
Output is correct |
87 |
Correct |
12 ms |
37464 KB |
Output is correct |
88 |
Correct |
13 ms |
37464 KB |
Output is correct |
89 |
Correct |
54 ms |
59752 KB |
Output is correct |
90 |
Correct |
32 ms |
45768 KB |
Output is correct |
91 |
Correct |
39 ms |
57772 KB |
Output is correct |
92 |
Correct |
24 ms |
40948 KB |
Output is correct |
93 |
Correct |
50 ms |
58348 KB |
Output is correct |
94 |
Correct |
28 ms |
41924 KB |
Output is correct |
95 |
Correct |
33 ms |
46760 KB |
Output is correct |
96 |
Correct |
36 ms |
49740 KB |
Output is correct |
97 |
Correct |
40 ms |
50860 KB |
Output is correct |
98 |
Correct |
31 ms |
46092 KB |
Output is correct |
99 |
Correct |
46 ms |
51624 KB |
Output is correct |
100 |
Correct |
27 ms |
54876 KB |
Output is correct |
101 |
Correct |
28 ms |
54872 KB |
Output is correct |
102 |
Correct |
24 ms |
54876 KB |
Output is correct |
103 |
Correct |
28 ms |
54800 KB |
Output is correct |
104 |
Correct |
24 ms |
54836 KB |
Output is correct |
105 |
Correct |
27 ms |
54804 KB |
Output is correct |
106 |
Correct |
26 ms |
54796 KB |
Output is correct |
107 |
Correct |
31 ms |
54872 KB |
Output is correct |
108 |
Correct |
37 ms |
56012 KB |
Output is correct |
109 |
Correct |
67 ms |
61500 KB |
Output is correct |
110 |
Correct |
90 ms |
62176 KB |
Output is correct |
111 |
Correct |
73 ms |
62136 KB |
Output is correct |
112 |
Correct |
76 ms |
61760 KB |
Output is correct |
113 |
Correct |
71 ms |
61960 KB |
Output is correct |
114 |
Correct |
117 ms |
65176 KB |
Output is correct |
115 |
Correct |
110 ms |
61232 KB |
Output is correct |
116 |
Correct |
85 ms |
58612 KB |
Output is correct |
117 |
Correct |
53 ms |
58320 KB |
Output is correct |
118 |
Correct |
53 ms |
58660 KB |
Output is correct |
119 |
Correct |
53 ms |
58692 KB |
Output is correct |
120 |
Correct |
116 ms |
61620 KB |
Output is correct |
121 |
Correct |
111 ms |
61504 KB |
Output is correct |
122 |
Correct |
104 ms |
61472 KB |
Output is correct |
123 |
Correct |
106 ms |
60944 KB |
Output is correct |
124 |
Correct |
101 ms |
60880 KB |
Output is correct |
125 |
Correct |
105 ms |
60944 KB |
Output is correct |
126 |
Correct |
101 ms |
61304 KB |
Output is correct |
127 |
Correct |
102 ms |
61160 KB |
Output is correct |
128 |
Correct |
113 ms |
61264 KB |
Output is correct |
129 |
Correct |
41 ms |
56508 KB |
Output is correct |
130 |
Correct |
88 ms |
61932 KB |
Output is correct |
131 |
Correct |
75 ms |
61900 KB |
Output is correct |
132 |
Correct |
86 ms |
62112 KB |
Output is correct |
133 |
Correct |
78 ms |
62076 KB |
Output is correct |
134 |
Correct |
121 ms |
60372 KB |
Output is correct |
135 |
Correct |
23 ms |
54844 KB |
Output is correct |
136 |
Correct |
23 ms |
54876 KB |
Output is correct |
137 |
Correct |
23 ms |
54876 KB |
Output is correct |
138 |
Correct |
24 ms |
54876 KB |
Output is correct |
139 |
Correct |
16 ms |
37724 KB |
Output is correct |
140 |
Correct |
13 ms |
37724 KB |
Output is correct |
141 |
Correct |
25 ms |
54876 KB |
Output is correct |
142 |
Correct |
25 ms |
54972 KB |
Output is correct |
143 |
Correct |
14 ms |
37724 KB |
Output is correct |
144 |
Correct |
23 ms |
54780 KB |
Output is correct |
145 |
Correct |
27 ms |
54824 KB |
Output is correct |
146 |
Correct |
25 ms |
54972 KB |
Output is correct |
147 |
Correct |
23 ms |
54988 KB |
Output is correct |
148 |
Correct |
24 ms |
54972 KB |
Output is correct |
149 |
Correct |
24 ms |
54736 KB |
Output is correct |
150 |
Incorrect |
24 ms |
54616 KB |
Output isn't correct |
151 |
Halted |
0 ms |
0 KB |
- |