#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);cerr.tie(0)
#define mp make_pair
#define xx first
#define yy second
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define all(x) x.begin(),x.end()
#define ff(i,a,b) for (int i = a; i < b; i++)
#define fff(i,a,b) for (int i = a; i <= b; i++)
#define bff(i,a,b) for (int i = b-1; i >= a; i--)
#define bfff(i,a,b) for (int i = b; i >= a; i--)
using namespace std;
long double typedef ld;
unsigned int typedef ui;
long long int typedef li;
pair<int,int> typedef pii;
pair<li,li> typedef pli;
pair<ld,ld> typedef pld;
vector<vector<int>> typedef graph;
unsigned long long int typedef ull;
//const int mod = 998244353;
const int mod = 1000000007;
//Note to self: Check for overflow
#include "paint.h"
int root[50004]; //implicitno segmento za svakog (kontraktor - index) ((ono moje))
const int N=25'000'007;
int val[N],L[N],R[N];
int idx=0;
void add(int p, int l, int r, int s, int x)
{
val[p]+=x;
if (l==r) return;
int mid=(l+r)/2;
if (s<=mid)
{
if (!L[p]) L[p]=++idx;
add(L[p],l,mid,s,x);
}
else
{
if (!R[p]) R[p]=++idx;
add(R[p],mid+1,r,s,x);
}
}
int sum(int p, int l, int r, int ll, int rr)
{
if (!p || ll>r || rr<l) return 0;
if (ll<=l && rr>=r) return val[p];
int mid=(l+r)/2;
return sum(L[p],l,mid,ll,rr)+sum(R[p],mid+1,r,ll,rr);
}
void ispisi(int p, int l, int r)
{
if (!val[p]) return;
if (l==r)
{
cout<<l<<" ";
return;
}
int mid=(l+r)/2;
ispisi(L[p],l,mid);
ispisi(R[p],mid+1,r);
}
int upizdi(int i, int n) //retard funkcija
{
i%=n;
if (i<0) i+=n;
return i;
}
vector<int> koji[100005]; //koji kontraktori sadrze ovu boju, svkk su indexirani
bool chiba[100005]; //da li siba, na osnovu toga racuna minimalan broj poteza
int minimumInstructions(int n, int m, int k, vector<int> c, vector<int> a, vector<vector<int>> b)
{
ff(i,0,m) for (auto it : b[i]) koji[it].pb(i);
ff(i,0,m) root[i]=++idx;
ff(i,0,n) for (auto kont : koji[c[i]]) add(root[upizdi(kont-i,m)],0,n-1,i,1);
//ff(i,0,m) cout<<i<<": ",ispisi(root[i],0,n-1),cout<<endl;
/*ff(i,0,k)
{
cout<<i<<": ";
for (auto it : koji[i]) cout<<it<<" "; cout<<endl;
} cout<<endl;*/
fff(i,0,n-m) for (auto kont : koji[c[i]]) if (sum(root[upizdi(kont-i,m)],0,n-1,i,i+m-1)==m) chiba[i]=1;
int poslednji=-mod,snaga=0,ans=0;
ff(i,0,n)
{
if (chiba[i]) poslednji=i;
if (snaga<=0)
{
if (i>=poslednji+m) return -1;
snaga=poslednji+m-i,ans++;
}
snaga--;
}
return ans;
}
//Note to self: Check for overflow
/*
8 3 5
3 3 1 3 4 4 2 2
3 0 1 2
2 2 3
2 3 4
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2644 KB |
Output is correct |
2 |
Correct |
1 ms |
2644 KB |
Output is correct |
3 |
Correct |
2 ms |
2644 KB |
Output is correct |
4 |
Correct |
1 ms |
2644 KB |
Output is correct |
5 |
Correct |
2 ms |
2664 KB |
Output is correct |
6 |
Correct |
2 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
2 ms |
2644 KB |
Output is correct |
9 |
Correct |
2 ms |
2664 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2644 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2644 KB |
Output is correct |
14 |
Correct |
2 ms |
2668 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2772 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2676 KB |
Output is correct |
22 |
Correct |
26 ms |
7124 KB |
Output is correct |
23 |
Correct |
22 ms |
7140 KB |
Output is correct |
24 |
Correct |
21 ms |
7176 KB |
Output is correct |
25 |
Correct |
8 ms |
3356 KB |
Output is correct |
26 |
Correct |
7 ms |
3284 KB |
Output is correct |
27 |
Correct |
8 ms |
3540 KB |
Output is correct |
28 |
Correct |
7 ms |
3540 KB |
Output is correct |
29 |
Correct |
8 ms |
3676 KB |
Output is correct |
30 |
Correct |
8 ms |
3788 KB |
Output is correct |
31 |
Correct |
15 ms |
4392 KB |
Output is correct |
32 |
Correct |
23 ms |
4488 KB |
Output is correct |
33 |
Correct |
17 ms |
4492 KB |
Output is correct |
34 |
Correct |
17 ms |
4488 KB |
Output is correct |
35 |
Correct |
17 ms |
4408 KB |
Output is correct |
36 |
Correct |
14 ms |
4428 KB |
Output is correct |
37 |
Correct |
36 ms |
10448 KB |
Output is correct |
38 |
Correct |
34 ms |
10320 KB |
Output is correct |
39 |
Correct |
31 ms |
10396 KB |
Output is correct |
40 |
Correct |
29 ms |
5736 KB |
Output is correct |
41 |
Correct |
20 ms |
4556 KB |
Output is correct |
42 |
Correct |
43 ms |
6800 KB |
Output is correct |
43 |
Correct |
22 ms |
5736 KB |
Output is correct |
44 |
Correct |
21 ms |
5776 KB |
Output is correct |
45 |
Correct |
33 ms |
8160 KB |
Output is correct |
46 |
Correct |
56 ms |
15052 KB |
Output is correct |
47 |
Correct |
37 ms |
9760 KB |
Output is correct |
48 |
Correct |
37 ms |
12412 KB |
Output is correct |
49 |
Correct |
67 ms |
22768 KB |
Output is correct |
50 |
Correct |
70 ms |
24048 KB |
Output is correct |
51 |
Correct |
74 ms |
21756 KB |
Output is correct |
52 |
Correct |
31 ms |
6004 KB |
Output is correct |
53 |
Correct |
31 ms |
5996 KB |
Output is correct |
54 |
Correct |
32 ms |
6912 KB |
Output is correct |
55 |
Correct |
32 ms |
7392 KB |
Output is correct |
56 |
Correct |
33 ms |
7904 KB |
Output is correct |
57 |
Correct |
33 ms |
8204 KB |
Output is correct |
58 |
Correct |
70 ms |
16232 KB |
Output is correct |
59 |
Correct |
69 ms |
16268 KB |
Output is correct |
60 |
Correct |
64 ms |
16224 KB |
Output is correct |
61 |
Correct |
67 ms |
16284 KB |
Output is correct |
62 |
Correct |
77 ms |
16208 KB |
Output is correct |
63 |
Correct |
63 ms |
16204 KB |
Output is correct |
64 |
Correct |
95 ms |
32100 KB |
Output is correct |
65 |
Correct |
124 ms |
32212 KB |
Output is correct |
66 |
Correct |
118 ms |
32016 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2644 KB |
Output is correct |
2 |
Correct |
1 ms |
2644 KB |
Output is correct |
3 |
Correct |
2 ms |
2644 KB |
Output is correct |
4 |
Correct |
1 ms |
2644 KB |
Output is correct |
5 |
Correct |
2 ms |
2664 KB |
Output is correct |
6 |
Correct |
2 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
2 ms |
2644 KB |
Output is correct |
9 |
Correct |
2 ms |
2664 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2644 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2644 KB |
Output is correct |
14 |
Correct |
2 ms |
2668 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2772 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2676 KB |
Output is correct |
22 |
Correct |
2 ms |
2772 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
2668 KB |
Output is correct |
25 |
Correct |
2 ms |
2644 KB |
Output is correct |
26 |
Correct |
2 ms |
2604 KB |
Output is correct |
27 |
Correct |
2 ms |
2644 KB |
Output is correct |
28 |
Correct |
3 ms |
2900 KB |
Output is correct |
29 |
Correct |
2 ms |
2772 KB |
Output is correct |
30 |
Correct |
2 ms |
2804 KB |
Output is correct |
31 |
Correct |
3 ms |
2772 KB |
Output is correct |
32 |
Correct |
2 ms |
2772 KB |
Output is correct |
33 |
Correct |
2 ms |
2644 KB |
Output is correct |
34 |
Correct |
3 ms |
2644 KB |
Output is correct |
35 |
Correct |
2 ms |
2644 KB |
Output is correct |
36 |
Correct |
2 ms |
2644 KB |
Output is correct |
37 |
Correct |
2 ms |
2644 KB |
Output is correct |
38 |
Correct |
2 ms |
2644 KB |
Output is correct |
39 |
Correct |
2 ms |
2644 KB |
Output is correct |
40 |
Correct |
2 ms |
2676 KB |
Output is correct |
41 |
Correct |
2 ms |
2772 KB |
Output is correct |
42 |
Correct |
2 ms |
2644 KB |
Output is correct |
43 |
Correct |
2 ms |
2644 KB |
Output is correct |
44 |
Correct |
2 ms |
2640 KB |
Output is correct |
45 |
Correct |
3 ms |
3028 KB |
Output is correct |
46 |
Correct |
4 ms |
3028 KB |
Output is correct |
47 |
Correct |
3 ms |
3028 KB |
Output is correct |
48 |
Correct |
3 ms |
2900 KB |
Output is correct |
49 |
Correct |
3 ms |
2924 KB |
Output is correct |
50 |
Correct |
2 ms |
2644 KB |
Output is correct |
51 |
Correct |
2 ms |
2644 KB |
Output is correct |
52 |
Correct |
2 ms |
2644 KB |
Output is correct |
53 |
Correct |
2 ms |
2644 KB |
Output is correct |
54 |
Correct |
2 ms |
2668 KB |
Output is correct |
55 |
Correct |
2 ms |
2668 KB |
Output is correct |
56 |
Correct |
2 ms |
2772 KB |
Output is correct |
57 |
Correct |
2 ms |
2672 KB |
Output is correct |
58 |
Correct |
2 ms |
2676 KB |
Output is correct |
59 |
Correct |
2 ms |
2772 KB |
Output is correct |
60 |
Correct |
2 ms |
2644 KB |
Output is correct |
61 |
Correct |
2 ms |
2772 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
2 ms |
2644 KB |
Output is correct |
3 |
Correct |
2 ms |
2644 KB |
Output is correct |
4 |
Correct |
1 ms |
2644 KB |
Output is correct |
5 |
Correct |
2 ms |
2644 KB |
Output is correct |
6 |
Correct |
1 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2664 KB |
Output is correct |
8 |
Correct |
2 ms |
2644 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2664 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2644 KB |
Output is correct |
14 |
Correct |
2 ms |
2644 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2668 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2772 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2676 KB |
Output is correct |
24 |
Correct |
26 ms |
7124 KB |
Output is correct |
25 |
Correct |
22 ms |
7140 KB |
Output is correct |
26 |
Correct |
21 ms |
7176 KB |
Output is correct |
27 |
Correct |
2 ms |
2668 KB |
Output is correct |
28 |
Correct |
2 ms |
2644 KB |
Output is correct |
29 |
Correct |
2 ms |
2604 KB |
Output is correct |
30 |
Correct |
2 ms |
2644 KB |
Output is correct |
31 |
Correct |
3 ms |
2900 KB |
Output is correct |
32 |
Correct |
2 ms |
2772 KB |
Output is correct |
33 |
Correct |
2 ms |
2804 KB |
Output is correct |
34 |
Correct |
3 ms |
2772 KB |
Output is correct |
35 |
Correct |
2 ms |
2772 KB |
Output is correct |
36 |
Correct |
2 ms |
2644 KB |
Output is correct |
37 |
Correct |
3 ms |
2644 KB |
Output is correct |
38 |
Correct |
2 ms |
2644 KB |
Output is correct |
39 |
Correct |
2 ms |
2644 KB |
Output is correct |
40 |
Correct |
2 ms |
2644 KB |
Output is correct |
41 |
Correct |
2 ms |
2644 KB |
Output is correct |
42 |
Correct |
2 ms |
2644 KB |
Output is correct |
43 |
Correct |
2 ms |
2676 KB |
Output is correct |
44 |
Correct |
2 ms |
2772 KB |
Output is correct |
45 |
Correct |
2 ms |
2644 KB |
Output is correct |
46 |
Correct |
2 ms |
2644 KB |
Output is correct |
47 |
Correct |
2 ms |
2640 KB |
Output is correct |
48 |
Correct |
3 ms |
3028 KB |
Output is correct |
49 |
Correct |
4 ms |
3028 KB |
Output is correct |
50 |
Correct |
3 ms |
3028 KB |
Output is correct |
51 |
Correct |
3 ms |
2900 KB |
Output is correct |
52 |
Correct |
3 ms |
2924 KB |
Output is correct |
53 |
Correct |
2 ms |
2644 KB |
Output is correct |
54 |
Correct |
2 ms |
2644 KB |
Output is correct |
55 |
Correct |
2 ms |
2644 KB |
Output is correct |
56 |
Correct |
2 ms |
2644 KB |
Output is correct |
57 |
Correct |
2 ms |
2668 KB |
Output is correct |
58 |
Correct |
2 ms |
2668 KB |
Output is correct |
59 |
Correct |
2 ms |
2772 KB |
Output is correct |
60 |
Correct |
2 ms |
2672 KB |
Output is correct |
61 |
Correct |
2 ms |
2676 KB |
Output is correct |
62 |
Correct |
2 ms |
2772 KB |
Output is correct |
63 |
Correct |
2 ms |
2644 KB |
Output is correct |
64 |
Correct |
2 ms |
2772 KB |
Output is correct |
65 |
Correct |
4 ms |
3796 KB |
Output is correct |
66 |
Correct |
4 ms |
3028 KB |
Output is correct |
67 |
Correct |
9 ms |
4132 KB |
Output is correct |
68 |
Correct |
6 ms |
3540 KB |
Output is correct |
69 |
Correct |
7 ms |
3924 KB |
Output is correct |
70 |
Correct |
4 ms |
3156 KB |
Output is correct |
71 |
Correct |
5 ms |
3200 KB |
Output is correct |
72 |
Correct |
4 ms |
3156 KB |
Output is correct |
73 |
Correct |
4 ms |
2980 KB |
Output is correct |
74 |
Correct |
5 ms |
3284 KB |
Output is correct |
75 |
Correct |
4 ms |
3112 KB |
Output is correct |
76 |
Correct |
20 ms |
6028 KB |
Output is correct |
77 |
Correct |
18 ms |
6392 KB |
Output is correct |
78 |
Correct |
24 ms |
6996 KB |
Output is correct |
79 |
Correct |
11 ms |
4968 KB |
Output is correct |
80 |
Correct |
11 ms |
5076 KB |
Output is correct |
81 |
Correct |
11 ms |
4948 KB |
Output is correct |
82 |
Correct |
11 ms |
4972 KB |
Output is correct |
83 |
Correct |
12 ms |
4972 KB |
Output is correct |
84 |
Correct |
5 ms |
3284 KB |
Output is correct |
85 |
Correct |
5 ms |
3284 KB |
Output is correct |
86 |
Correct |
5 ms |
3284 KB |
Output is correct |
87 |
Correct |
4 ms |
3280 KB |
Output is correct |
88 |
Correct |
5 ms |
3252 KB |
Output is correct |
89 |
Correct |
6 ms |
3276 KB |
Output is correct |
90 |
Correct |
27 ms |
7404 KB |
Output is correct |
91 |
Correct |
30 ms |
7372 KB |
Output is correct |
92 |
Correct |
30 ms |
7420 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
2 ms |
2644 KB |
Output is correct |
3 |
Correct |
2 ms |
2644 KB |
Output is correct |
4 |
Correct |
1 ms |
2644 KB |
Output is correct |
5 |
Correct |
2 ms |
2644 KB |
Output is correct |
6 |
Correct |
1 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2664 KB |
Output is correct |
8 |
Correct |
2 ms |
2644 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2664 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2644 KB |
Output is correct |
14 |
Correct |
2 ms |
2644 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2668 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2772 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2676 KB |
Output is correct |
24 |
Correct |
26 ms |
7124 KB |
Output is correct |
25 |
Correct |
22 ms |
7140 KB |
Output is correct |
26 |
Correct |
21 ms |
7176 KB |
Output is correct |
27 |
Correct |
8 ms |
3356 KB |
Output is correct |
28 |
Correct |
7 ms |
3284 KB |
Output is correct |
29 |
Correct |
8 ms |
3540 KB |
Output is correct |
30 |
Correct |
7 ms |
3540 KB |
Output is correct |
31 |
Correct |
8 ms |
3676 KB |
Output is correct |
32 |
Correct |
8 ms |
3788 KB |
Output is correct |
33 |
Correct |
15 ms |
4392 KB |
Output is correct |
34 |
Correct |
23 ms |
4488 KB |
Output is correct |
35 |
Correct |
17 ms |
4492 KB |
Output is correct |
36 |
Correct |
17 ms |
4488 KB |
Output is correct |
37 |
Correct |
17 ms |
4408 KB |
Output is correct |
38 |
Correct |
14 ms |
4428 KB |
Output is correct |
39 |
Correct |
36 ms |
10448 KB |
Output is correct |
40 |
Correct |
34 ms |
10320 KB |
Output is correct |
41 |
Correct |
31 ms |
10396 KB |
Output is correct |
42 |
Correct |
2 ms |
2668 KB |
Output is correct |
43 |
Correct |
2 ms |
2644 KB |
Output is correct |
44 |
Correct |
2 ms |
2604 KB |
Output is correct |
45 |
Correct |
2 ms |
2644 KB |
Output is correct |
46 |
Correct |
3 ms |
2900 KB |
Output is correct |
47 |
Correct |
2 ms |
2772 KB |
Output is correct |
48 |
Correct |
2 ms |
2804 KB |
Output is correct |
49 |
Correct |
3 ms |
2772 KB |
Output is correct |
50 |
Correct |
2 ms |
2772 KB |
Output is correct |
51 |
Correct |
2 ms |
2644 KB |
Output is correct |
52 |
Correct |
3 ms |
2644 KB |
Output is correct |
53 |
Correct |
2 ms |
2644 KB |
Output is correct |
54 |
Correct |
2 ms |
2644 KB |
Output is correct |
55 |
Correct |
2 ms |
2644 KB |
Output is correct |
56 |
Correct |
2 ms |
2644 KB |
Output is correct |
57 |
Correct |
2 ms |
2644 KB |
Output is correct |
58 |
Correct |
2 ms |
2676 KB |
Output is correct |
59 |
Correct |
2 ms |
2772 KB |
Output is correct |
60 |
Correct |
2 ms |
2644 KB |
Output is correct |
61 |
Correct |
2 ms |
2644 KB |
Output is correct |
62 |
Correct |
2 ms |
2640 KB |
Output is correct |
63 |
Correct |
3 ms |
3028 KB |
Output is correct |
64 |
Correct |
4 ms |
3028 KB |
Output is correct |
65 |
Correct |
3 ms |
3028 KB |
Output is correct |
66 |
Correct |
3 ms |
2900 KB |
Output is correct |
67 |
Correct |
3 ms |
2924 KB |
Output is correct |
68 |
Correct |
2 ms |
2644 KB |
Output is correct |
69 |
Correct |
2 ms |
2644 KB |
Output is correct |
70 |
Correct |
2 ms |
2644 KB |
Output is correct |
71 |
Correct |
2 ms |
2644 KB |
Output is correct |
72 |
Correct |
2 ms |
2668 KB |
Output is correct |
73 |
Correct |
2 ms |
2668 KB |
Output is correct |
74 |
Correct |
2 ms |
2772 KB |
Output is correct |
75 |
Correct |
2 ms |
2672 KB |
Output is correct |
76 |
Correct |
2 ms |
2676 KB |
Output is correct |
77 |
Correct |
2 ms |
2772 KB |
Output is correct |
78 |
Correct |
2 ms |
2644 KB |
Output is correct |
79 |
Correct |
2 ms |
2772 KB |
Output is correct |
80 |
Correct |
4 ms |
3796 KB |
Output is correct |
81 |
Correct |
4 ms |
3028 KB |
Output is correct |
82 |
Correct |
9 ms |
4132 KB |
Output is correct |
83 |
Correct |
6 ms |
3540 KB |
Output is correct |
84 |
Correct |
7 ms |
3924 KB |
Output is correct |
85 |
Correct |
4 ms |
3156 KB |
Output is correct |
86 |
Correct |
5 ms |
3200 KB |
Output is correct |
87 |
Correct |
4 ms |
3156 KB |
Output is correct |
88 |
Correct |
4 ms |
2980 KB |
Output is correct |
89 |
Correct |
5 ms |
3284 KB |
Output is correct |
90 |
Correct |
4 ms |
3112 KB |
Output is correct |
91 |
Correct |
20 ms |
6028 KB |
Output is correct |
92 |
Correct |
18 ms |
6392 KB |
Output is correct |
93 |
Correct |
24 ms |
6996 KB |
Output is correct |
94 |
Correct |
11 ms |
4968 KB |
Output is correct |
95 |
Correct |
11 ms |
5076 KB |
Output is correct |
96 |
Correct |
11 ms |
4948 KB |
Output is correct |
97 |
Correct |
11 ms |
4972 KB |
Output is correct |
98 |
Correct |
12 ms |
4972 KB |
Output is correct |
99 |
Correct |
5 ms |
3284 KB |
Output is correct |
100 |
Correct |
5 ms |
3284 KB |
Output is correct |
101 |
Correct |
5 ms |
3284 KB |
Output is correct |
102 |
Correct |
4 ms |
3280 KB |
Output is correct |
103 |
Correct |
5 ms |
3252 KB |
Output is correct |
104 |
Correct |
6 ms |
3276 KB |
Output is correct |
105 |
Correct |
27 ms |
7404 KB |
Output is correct |
106 |
Correct |
30 ms |
7372 KB |
Output is correct |
107 |
Correct |
30 ms |
7420 KB |
Output is correct |
108 |
Correct |
15 ms |
3820 KB |
Output is correct |
109 |
Execution timed out |
1585 ms |
209816 KB |
Time limit exceeded |
110 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
2772 KB |
Output is correct |
2 |
Correct |
2 ms |
2644 KB |
Output is correct |
3 |
Correct |
2 ms |
2644 KB |
Output is correct |
4 |
Correct |
1 ms |
2644 KB |
Output is correct |
5 |
Correct |
2 ms |
2644 KB |
Output is correct |
6 |
Correct |
1 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2664 KB |
Output is correct |
8 |
Correct |
2 ms |
2644 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2664 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2644 KB |
Output is correct |
14 |
Correct |
2 ms |
2644 KB |
Output is correct |
15 |
Correct |
2 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2668 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2772 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2676 KB |
Output is correct |
24 |
Correct |
26 ms |
7124 KB |
Output is correct |
25 |
Correct |
22 ms |
7140 KB |
Output is correct |
26 |
Correct |
21 ms |
7176 KB |
Output is correct |
27 |
Correct |
8 ms |
3356 KB |
Output is correct |
28 |
Correct |
7 ms |
3284 KB |
Output is correct |
29 |
Correct |
8 ms |
3540 KB |
Output is correct |
30 |
Correct |
7 ms |
3540 KB |
Output is correct |
31 |
Correct |
8 ms |
3676 KB |
Output is correct |
32 |
Correct |
8 ms |
3788 KB |
Output is correct |
33 |
Correct |
15 ms |
4392 KB |
Output is correct |
34 |
Correct |
23 ms |
4488 KB |
Output is correct |
35 |
Correct |
17 ms |
4492 KB |
Output is correct |
36 |
Correct |
17 ms |
4488 KB |
Output is correct |
37 |
Correct |
17 ms |
4408 KB |
Output is correct |
38 |
Correct |
14 ms |
4428 KB |
Output is correct |
39 |
Correct |
36 ms |
10448 KB |
Output is correct |
40 |
Correct |
34 ms |
10320 KB |
Output is correct |
41 |
Correct |
31 ms |
10396 KB |
Output is correct |
42 |
Correct |
29 ms |
5736 KB |
Output is correct |
43 |
Correct |
20 ms |
4556 KB |
Output is correct |
44 |
Correct |
43 ms |
6800 KB |
Output is correct |
45 |
Correct |
22 ms |
5736 KB |
Output is correct |
46 |
Correct |
21 ms |
5776 KB |
Output is correct |
47 |
Correct |
33 ms |
8160 KB |
Output is correct |
48 |
Correct |
56 ms |
15052 KB |
Output is correct |
49 |
Correct |
37 ms |
9760 KB |
Output is correct |
50 |
Correct |
37 ms |
12412 KB |
Output is correct |
51 |
Correct |
67 ms |
22768 KB |
Output is correct |
52 |
Correct |
70 ms |
24048 KB |
Output is correct |
53 |
Correct |
74 ms |
21756 KB |
Output is correct |
54 |
Correct |
31 ms |
6004 KB |
Output is correct |
55 |
Correct |
31 ms |
5996 KB |
Output is correct |
56 |
Correct |
32 ms |
6912 KB |
Output is correct |
57 |
Correct |
32 ms |
7392 KB |
Output is correct |
58 |
Correct |
33 ms |
7904 KB |
Output is correct |
59 |
Correct |
33 ms |
8204 KB |
Output is correct |
60 |
Correct |
70 ms |
16232 KB |
Output is correct |
61 |
Correct |
69 ms |
16268 KB |
Output is correct |
62 |
Correct |
64 ms |
16224 KB |
Output is correct |
63 |
Correct |
67 ms |
16284 KB |
Output is correct |
64 |
Correct |
77 ms |
16208 KB |
Output is correct |
65 |
Correct |
63 ms |
16204 KB |
Output is correct |
66 |
Correct |
95 ms |
32100 KB |
Output is correct |
67 |
Correct |
124 ms |
32212 KB |
Output is correct |
68 |
Correct |
118 ms |
32016 KB |
Output is correct |
69 |
Correct |
2 ms |
2668 KB |
Output is correct |
70 |
Correct |
2 ms |
2644 KB |
Output is correct |
71 |
Correct |
2 ms |
2604 KB |
Output is correct |
72 |
Correct |
2 ms |
2644 KB |
Output is correct |
73 |
Correct |
3 ms |
2900 KB |
Output is correct |
74 |
Correct |
2 ms |
2772 KB |
Output is correct |
75 |
Correct |
2 ms |
2804 KB |
Output is correct |
76 |
Correct |
3 ms |
2772 KB |
Output is correct |
77 |
Correct |
2 ms |
2772 KB |
Output is correct |
78 |
Correct |
2 ms |
2644 KB |
Output is correct |
79 |
Correct |
3 ms |
2644 KB |
Output is correct |
80 |
Correct |
2 ms |
2644 KB |
Output is correct |
81 |
Correct |
2 ms |
2644 KB |
Output is correct |
82 |
Correct |
2 ms |
2644 KB |
Output is correct |
83 |
Correct |
2 ms |
2644 KB |
Output is correct |
84 |
Correct |
2 ms |
2644 KB |
Output is correct |
85 |
Correct |
2 ms |
2676 KB |
Output is correct |
86 |
Correct |
2 ms |
2772 KB |
Output is correct |
87 |
Correct |
2 ms |
2644 KB |
Output is correct |
88 |
Correct |
2 ms |
2644 KB |
Output is correct |
89 |
Correct |
2 ms |
2640 KB |
Output is correct |
90 |
Correct |
3 ms |
3028 KB |
Output is correct |
91 |
Correct |
4 ms |
3028 KB |
Output is correct |
92 |
Correct |
3 ms |
3028 KB |
Output is correct |
93 |
Correct |
3 ms |
2900 KB |
Output is correct |
94 |
Correct |
3 ms |
2924 KB |
Output is correct |
95 |
Correct |
2 ms |
2644 KB |
Output is correct |
96 |
Correct |
2 ms |
2644 KB |
Output is correct |
97 |
Correct |
2 ms |
2644 KB |
Output is correct |
98 |
Correct |
2 ms |
2644 KB |
Output is correct |
99 |
Correct |
2 ms |
2668 KB |
Output is correct |
100 |
Correct |
2 ms |
2668 KB |
Output is correct |
101 |
Correct |
2 ms |
2772 KB |
Output is correct |
102 |
Correct |
2 ms |
2672 KB |
Output is correct |
103 |
Correct |
2 ms |
2676 KB |
Output is correct |
104 |
Correct |
2 ms |
2772 KB |
Output is correct |
105 |
Correct |
2 ms |
2644 KB |
Output is correct |
106 |
Correct |
2 ms |
2772 KB |
Output is correct |
107 |
Correct |
4 ms |
3796 KB |
Output is correct |
108 |
Correct |
4 ms |
3028 KB |
Output is correct |
109 |
Correct |
9 ms |
4132 KB |
Output is correct |
110 |
Correct |
6 ms |
3540 KB |
Output is correct |
111 |
Correct |
7 ms |
3924 KB |
Output is correct |
112 |
Correct |
4 ms |
3156 KB |
Output is correct |
113 |
Correct |
5 ms |
3200 KB |
Output is correct |
114 |
Correct |
4 ms |
3156 KB |
Output is correct |
115 |
Correct |
4 ms |
2980 KB |
Output is correct |
116 |
Correct |
5 ms |
3284 KB |
Output is correct |
117 |
Correct |
4 ms |
3112 KB |
Output is correct |
118 |
Correct |
20 ms |
6028 KB |
Output is correct |
119 |
Correct |
18 ms |
6392 KB |
Output is correct |
120 |
Correct |
24 ms |
6996 KB |
Output is correct |
121 |
Correct |
11 ms |
4968 KB |
Output is correct |
122 |
Correct |
11 ms |
5076 KB |
Output is correct |
123 |
Correct |
11 ms |
4948 KB |
Output is correct |
124 |
Correct |
11 ms |
4972 KB |
Output is correct |
125 |
Correct |
12 ms |
4972 KB |
Output is correct |
126 |
Correct |
5 ms |
3284 KB |
Output is correct |
127 |
Correct |
5 ms |
3284 KB |
Output is correct |
128 |
Correct |
5 ms |
3284 KB |
Output is correct |
129 |
Correct |
4 ms |
3280 KB |
Output is correct |
130 |
Correct |
5 ms |
3252 KB |
Output is correct |
131 |
Correct |
6 ms |
3276 KB |
Output is correct |
132 |
Correct |
27 ms |
7404 KB |
Output is correct |
133 |
Correct |
30 ms |
7372 KB |
Output is correct |
134 |
Correct |
30 ms |
7420 KB |
Output is correct |
135 |
Correct |
15 ms |
3820 KB |
Output is correct |
136 |
Execution timed out |
1585 ms |
209816 KB |
Time limit exceeded |
137 |
Halted |
0 ms |
0 KB |
- |