#include<bits/stdc++.h>
using namespace std;
#include "paint.h"
#define mp make_pair
#define INF 10000000
#define MOD 1000000007
#define MID ((l+r)/2)
#define HASHMOD 2305843009213693951
#define ll long long
#define ull unsigned long long
#define F first
#define S second
typedef pair<ll, ll> ii;
typedef pair<ii, int> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef map<int, int> mii;
#define EPS 1e-6
#define FOR(i,n) for(int i=0;i<((int)(n));i++)
#define FORi(i,a,b) for(int i=((int)(a));i<((int)(b));i++)
#define FOA(v, a) for(auto v : a)
int M, N;
vi c;
map<set<int>, int> mm;
vector<set<int> > mmr(1, set<int>());
int sc=1;
struct myset{
set<int> val;
void insert(int x){
val.insert(x);
}
int i(){
if(mm.count(val)==0){
mmr.push_back(val);
mm[val] = sc++;
}
return mm[val];
}
myset(int x){
val = mmr[x];
}
myset(set<int> v){
val = v;
if(mm.count(val)==0){
mmr.push_back(val);
mm[val] = sc++;
}
}
myset(){}
};
map<int, vector<int>> f;
struct seg{
int val;
seg *L, *R;
int merge(int a, int as, int b){
myset ans;
myset aa=myset(a), bb=myset(b);
FOA(v,aa.val){
if(bb.val.count((v + as)%M)) ans.insert(v);
}
return ans.i();
}
void build(int l=0, int r=N-1){
if(l==r){
set<int> cc;
FOA(v, f[c[l]]){
cc.insert(v);
}
val = myset(cc).i();
}
else{
L = new seg;
R = new seg;
L->build(l,MID);
R->build(MID+1,r);
val = merge(L->val, MID-l+1, R->val);
}
}
int query(int rl, int rr, int l=0, int r=N-1){
if(rl<=l && r<=rr) return val;
else if(rr<l || r<rl) return 0;
else{
int sl = L->query(rl,rr,l,MID);
int sr = R->query(rl,rr,MID+1,r);
if(rr<=MID){
/*
cout<<"Return left "<<l<<" "<<r<<": ";
FOA(v,sl) cout<<v<<" ";
cout<<endl;*/
return sl;
}
if(rl>MID){
/*
cout<<"Return right "<<l<<" "<<r<<": ";
FOA(v,sr) cout<<v<<" ";
cout<<endl;*/
return sr;
}
//cout<<"merge "<<l<<" "<<r<<": ";
int qq;
qq = merge(sl, MID-max(l, rl)+1, sr);
/*
FOA(v, sl) cout<<v<<" ";
cout<<" | ";
FOA(v, sr) cout<<v<<" ";
cout<<" | ";
FOA(v, qq) cout<<v<<" ";
cout<<endl;*/
return qq;
}
}
/*
void print(int l=0, int r=N-1){
cout<<l<<" "<<r<<": ";
FOA(v, val) cout<<v<<" ";
cout<<endl;
if(l!=r){
L->print(l, MID);
R->print(MID+1,r);
}
}*/
};
int minimumInstructions(int n, int m, int K, std::vector<int> C,
vector<int> A, vector<std::vector<int>> B) {
mm[{}] = 0;
M = m;
N = n;
c = C;
FOR(i,M){
FOA(v, B[i]){
f[v].push_back(i);
}
}
seg s;
s.build();
if(s.query(0, M-1)==0) return -1;
int p=0;
int cp=M;
int ans = 1;
while(cp<N){
//cout<<p<<" "<<cp<<endl;
while(s.query(cp, cp+M-1)==0) cp--;
if(cp<=p) return -1;
p = cp;
cp+=M;
ans++;
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
296 KB |
Output is correct |
3 |
Correct |
1 ms |
296 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
300 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
468 KB |
Output is correct |
14 |
Correct |
1 ms |
432 KB |
Output is correct |
15 |
Correct |
1 ms |
432 KB |
Output is correct |
16 |
Correct |
1 ms |
468 KB |
Output is correct |
17 |
Correct |
1 ms |
428 KB |
Output is correct |
18 |
Correct |
1 ms |
468 KB |
Output is correct |
19 |
Correct |
1 ms |
468 KB |
Output is correct |
20 |
Correct |
1 ms |
468 KB |
Output is correct |
21 |
Correct |
1 ms |
468 KB |
Output is correct |
22 |
Correct |
49 ms |
12700 KB |
Output is correct |
23 |
Correct |
55 ms |
12652 KB |
Output is correct |
24 |
Correct |
66 ms |
12596 KB |
Output is correct |
25 |
Correct |
12 ms |
1820 KB |
Output is correct |
26 |
Correct |
11 ms |
1784 KB |
Output is correct |
27 |
Correct |
8 ms |
1824 KB |
Output is correct |
28 |
Correct |
9 ms |
1708 KB |
Output is correct |
29 |
Correct |
8 ms |
1748 KB |
Output is correct |
30 |
Correct |
10 ms |
1716 KB |
Output is correct |
31 |
Correct |
28 ms |
4892 KB |
Output is correct |
32 |
Correct |
27 ms |
4956 KB |
Output is correct |
33 |
Correct |
31 ms |
4940 KB |
Output is correct |
34 |
Correct |
43 ms |
4892 KB |
Output is correct |
35 |
Correct |
31 ms |
4844 KB |
Output is correct |
36 |
Correct |
38 ms |
4956 KB |
Output is correct |
37 |
Correct |
99 ms |
14820 KB |
Output is correct |
38 |
Correct |
90 ms |
14768 KB |
Output is correct |
39 |
Correct |
92 ms |
14792 KB |
Output is correct |
40 |
Correct |
55 ms |
7116 KB |
Output is correct |
41 |
Correct |
33 ms |
4576 KB |
Output is correct |
42 |
Correct |
42 ms |
7748 KB |
Output is correct |
43 |
Correct |
26 ms |
5236 KB |
Output is correct |
44 |
Correct |
25 ms |
4796 KB |
Output is correct |
45 |
Correct |
41 ms |
7876 KB |
Output is correct |
46 |
Correct |
215 ms |
34408 KB |
Output is correct |
47 |
Correct |
119 ms |
19740 KB |
Output is correct |
48 |
Correct |
140 ms |
27356 KB |
Output is correct |
49 |
Correct |
205 ms |
26008 KB |
Output is correct |
50 |
Correct |
218 ms |
26412 KB |
Output is correct |
51 |
Correct |
167 ms |
20872 KB |
Output is correct |
52 |
Correct |
55 ms |
7884 KB |
Output is correct |
53 |
Correct |
70 ms |
7836 KB |
Output is correct |
54 |
Correct |
40 ms |
7888 KB |
Output is correct |
55 |
Correct |
41 ms |
7892 KB |
Output is correct |
56 |
Correct |
53 ms |
7844 KB |
Output is correct |
57 |
Correct |
40 ms |
7884 KB |
Output is correct |
58 |
Correct |
247 ms |
37576 KB |
Output is correct |
59 |
Correct |
267 ms |
37576 KB |
Output is correct |
60 |
Correct |
245 ms |
37600 KB |
Output is correct |
61 |
Correct |
245 ms |
37432 KB |
Output is correct |
62 |
Correct |
233 ms |
37436 KB |
Output is correct |
63 |
Correct |
244 ms |
37528 KB |
Output is correct |
64 |
Correct |
318 ms |
33484 KB |
Output is correct |
65 |
Correct |
304 ms |
33416 KB |
Output is correct |
66 |
Correct |
290 ms |
33356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
296 KB |
Output is correct |
3 |
Correct |
1 ms |
296 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
300 KB |
Output is correct |
8 |
Correct |
1 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
468 KB |
Output is correct |
14 |
Correct |
1 ms |
432 KB |
Output is correct |
15 |
Correct |
1 ms |
432 KB |
Output is correct |
16 |
Correct |
1 ms |
468 KB |
Output is correct |
17 |
Correct |
1 ms |
428 KB |
Output is correct |
18 |
Correct |
1 ms |
468 KB |
Output is correct |
19 |
Correct |
1 ms |
468 KB |
Output is correct |
20 |
Correct |
1 ms |
468 KB |
Output is correct |
21 |
Correct |
1 ms |
468 KB |
Output is correct |
22 |
Correct |
1 ms |
212 KB |
Output is correct |
23 |
Correct |
1 ms |
212 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
1 ms |
300 KB |
Output is correct |
26 |
Correct |
1 ms |
212 KB |
Output is correct |
27 |
Correct |
1 ms |
212 KB |
Output is correct |
28 |
Correct |
4 ms |
340 KB |
Output is correct |
29 |
Correct |
3 ms |
296 KB |
Output is correct |
30 |
Correct |
2 ms |
340 KB |
Output is correct |
31 |
Correct |
2 ms |
212 KB |
Output is correct |
32 |
Correct |
2 ms |
340 KB |
Output is correct |
33 |
Correct |
1 ms |
340 KB |
Output is correct |
34 |
Correct |
1 ms |
432 KB |
Output is correct |
35 |
Correct |
1 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
1 ms |
428 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
468 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
340 KB |
Output is correct |
44 |
Correct |
1 ms |
212 KB |
Output is correct |
45 |
Correct |
7 ms |
340 KB |
Output is correct |
46 |
Correct |
4 ms |
304 KB |
Output is correct |
47 |
Correct |
3 ms |
296 KB |
Output is correct |
48 |
Correct |
2 ms |
340 KB |
Output is correct |
49 |
Correct |
3 ms |
340 KB |
Output is correct |
50 |
Correct |
1 ms |
468 KB |
Output is correct |
51 |
Correct |
1 ms |
468 KB |
Output is correct |
52 |
Correct |
1 ms |
468 KB |
Output is correct |
53 |
Correct |
1 ms |
468 KB |
Output is correct |
54 |
Correct |
2 ms |
468 KB |
Output is correct |
55 |
Correct |
1 ms |
468 KB |
Output is correct |
56 |
Correct |
1 ms |
436 KB |
Output is correct |
57 |
Correct |
2 ms |
552 KB |
Output is correct |
58 |
Correct |
1 ms |
468 KB |
Output is correct |
59 |
Correct |
1 ms |
432 KB |
Output is correct |
60 |
Correct |
1 ms |
468 KB |
Output is correct |
61 |
Correct |
2 ms |
468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
296 KB |
Output is correct |
5 |
Correct |
1 ms |
296 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
300 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
468 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
1 ms |
432 KB |
Output is correct |
18 |
Correct |
1 ms |
468 KB |
Output is correct |
19 |
Correct |
1 ms |
428 KB |
Output is correct |
20 |
Correct |
1 ms |
468 KB |
Output is correct |
21 |
Correct |
1 ms |
468 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
468 KB |
Output is correct |
24 |
Correct |
49 ms |
12700 KB |
Output is correct |
25 |
Correct |
55 ms |
12652 KB |
Output is correct |
26 |
Correct |
66 ms |
12596 KB |
Output is correct |
27 |
Correct |
0 ms |
212 KB |
Output is correct |
28 |
Correct |
1 ms |
300 KB |
Output is correct |
29 |
Correct |
1 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
4 ms |
340 KB |
Output is correct |
32 |
Correct |
3 ms |
296 KB |
Output is correct |
33 |
Correct |
2 ms |
340 KB |
Output is correct |
34 |
Correct |
2 ms |
212 KB |
Output is correct |
35 |
Correct |
2 ms |
340 KB |
Output is correct |
36 |
Correct |
1 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
432 KB |
Output is correct |
38 |
Correct |
1 ms |
340 KB |
Output is correct |
39 |
Correct |
1 ms |
340 KB |
Output is correct |
40 |
Correct |
1 ms |
340 KB |
Output is correct |
41 |
Correct |
1 ms |
428 KB |
Output is correct |
42 |
Correct |
1 ms |
340 KB |
Output is correct |
43 |
Correct |
1 ms |
468 KB |
Output is correct |
44 |
Correct |
1 ms |
340 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
1 ms |
340 KB |
Output is correct |
47 |
Correct |
1 ms |
212 KB |
Output is correct |
48 |
Correct |
7 ms |
340 KB |
Output is correct |
49 |
Correct |
4 ms |
304 KB |
Output is correct |
50 |
Correct |
3 ms |
296 KB |
Output is correct |
51 |
Correct |
2 ms |
340 KB |
Output is correct |
52 |
Correct |
3 ms |
340 KB |
Output is correct |
53 |
Correct |
1 ms |
468 KB |
Output is correct |
54 |
Correct |
1 ms |
468 KB |
Output is correct |
55 |
Correct |
1 ms |
468 KB |
Output is correct |
56 |
Correct |
1 ms |
468 KB |
Output is correct |
57 |
Correct |
2 ms |
468 KB |
Output is correct |
58 |
Correct |
1 ms |
468 KB |
Output is correct |
59 |
Correct |
1 ms |
436 KB |
Output is correct |
60 |
Correct |
2 ms |
552 KB |
Output is correct |
61 |
Correct |
1 ms |
468 KB |
Output is correct |
62 |
Correct |
1 ms |
432 KB |
Output is correct |
63 |
Correct |
1 ms |
468 KB |
Output is correct |
64 |
Correct |
2 ms |
468 KB |
Output is correct |
65 |
Correct |
20 ms |
468 KB |
Output is correct |
66 |
Correct |
7 ms |
340 KB |
Output is correct |
67 |
Correct |
22 ms |
368 KB |
Output is correct |
68 |
Correct |
13 ms |
340 KB |
Output is correct |
69 |
Correct |
22 ms |
384 KB |
Output is correct |
70 |
Correct |
7 ms |
1636 KB |
Output is correct |
71 |
Correct |
8 ms |
1748 KB |
Output is correct |
72 |
Correct |
7 ms |
1592 KB |
Output is correct |
73 |
Correct |
4 ms |
468 KB |
Output is correct |
74 |
Correct |
8 ms |
1592 KB |
Output is correct |
75 |
Correct |
5 ms |
1336 KB |
Output is correct |
76 |
Correct |
43 ms |
8024 KB |
Output is correct |
77 |
Correct |
33 ms |
9276 KB |
Output is correct |
78 |
Correct |
45 ms |
10564 KB |
Output is correct |
79 |
Correct |
39 ms |
384 KB |
Output is correct |
80 |
Correct |
38 ms |
392 KB |
Output is correct |
81 |
Correct |
38 ms |
340 KB |
Output is correct |
82 |
Correct |
40 ms |
304 KB |
Output is correct |
83 |
Correct |
42 ms |
396 KB |
Output is correct |
84 |
Correct |
10 ms |
2004 KB |
Output is correct |
85 |
Correct |
9 ms |
2016 KB |
Output is correct |
86 |
Correct |
12 ms |
2132 KB |
Output is correct |
87 |
Correct |
9 ms |
1960 KB |
Output is correct |
88 |
Correct |
9 ms |
1928 KB |
Output is correct |
89 |
Correct |
11 ms |
1984 KB |
Output is correct |
90 |
Correct |
70 ms |
11200 KB |
Output is correct |
91 |
Correct |
83 ms |
11180 KB |
Output is correct |
92 |
Correct |
73 ms |
11308 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
296 KB |
Output is correct |
5 |
Correct |
1 ms |
296 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
300 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
468 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
1 ms |
432 KB |
Output is correct |
18 |
Correct |
1 ms |
468 KB |
Output is correct |
19 |
Correct |
1 ms |
428 KB |
Output is correct |
20 |
Correct |
1 ms |
468 KB |
Output is correct |
21 |
Correct |
1 ms |
468 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
468 KB |
Output is correct |
24 |
Correct |
49 ms |
12700 KB |
Output is correct |
25 |
Correct |
55 ms |
12652 KB |
Output is correct |
26 |
Correct |
66 ms |
12596 KB |
Output is correct |
27 |
Correct |
12 ms |
1820 KB |
Output is correct |
28 |
Correct |
11 ms |
1784 KB |
Output is correct |
29 |
Correct |
8 ms |
1824 KB |
Output is correct |
30 |
Correct |
9 ms |
1708 KB |
Output is correct |
31 |
Correct |
8 ms |
1748 KB |
Output is correct |
32 |
Correct |
10 ms |
1716 KB |
Output is correct |
33 |
Correct |
28 ms |
4892 KB |
Output is correct |
34 |
Correct |
27 ms |
4956 KB |
Output is correct |
35 |
Correct |
31 ms |
4940 KB |
Output is correct |
36 |
Correct |
43 ms |
4892 KB |
Output is correct |
37 |
Correct |
31 ms |
4844 KB |
Output is correct |
38 |
Correct |
38 ms |
4956 KB |
Output is correct |
39 |
Correct |
99 ms |
14820 KB |
Output is correct |
40 |
Correct |
90 ms |
14768 KB |
Output is correct |
41 |
Correct |
92 ms |
14792 KB |
Output is correct |
42 |
Correct |
0 ms |
212 KB |
Output is correct |
43 |
Correct |
1 ms |
300 KB |
Output is correct |
44 |
Correct |
1 ms |
212 KB |
Output is correct |
45 |
Correct |
1 ms |
212 KB |
Output is correct |
46 |
Correct |
4 ms |
340 KB |
Output is correct |
47 |
Correct |
3 ms |
296 KB |
Output is correct |
48 |
Correct |
2 ms |
340 KB |
Output is correct |
49 |
Correct |
2 ms |
212 KB |
Output is correct |
50 |
Correct |
2 ms |
340 KB |
Output is correct |
51 |
Correct |
1 ms |
340 KB |
Output is correct |
52 |
Correct |
1 ms |
432 KB |
Output is correct |
53 |
Correct |
1 ms |
340 KB |
Output is correct |
54 |
Correct |
1 ms |
340 KB |
Output is correct |
55 |
Correct |
1 ms |
340 KB |
Output is correct |
56 |
Correct |
1 ms |
428 KB |
Output is correct |
57 |
Correct |
1 ms |
340 KB |
Output is correct |
58 |
Correct |
1 ms |
468 KB |
Output is correct |
59 |
Correct |
1 ms |
340 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
340 KB |
Output is correct |
62 |
Correct |
1 ms |
212 KB |
Output is correct |
63 |
Correct |
7 ms |
340 KB |
Output is correct |
64 |
Correct |
4 ms |
304 KB |
Output is correct |
65 |
Correct |
3 ms |
296 KB |
Output is correct |
66 |
Correct |
2 ms |
340 KB |
Output is correct |
67 |
Correct |
3 ms |
340 KB |
Output is correct |
68 |
Correct |
1 ms |
468 KB |
Output is correct |
69 |
Correct |
1 ms |
468 KB |
Output is correct |
70 |
Correct |
1 ms |
468 KB |
Output is correct |
71 |
Correct |
1 ms |
468 KB |
Output is correct |
72 |
Correct |
2 ms |
468 KB |
Output is correct |
73 |
Correct |
1 ms |
468 KB |
Output is correct |
74 |
Correct |
1 ms |
436 KB |
Output is correct |
75 |
Correct |
2 ms |
552 KB |
Output is correct |
76 |
Correct |
1 ms |
468 KB |
Output is correct |
77 |
Correct |
1 ms |
432 KB |
Output is correct |
78 |
Correct |
1 ms |
468 KB |
Output is correct |
79 |
Correct |
2 ms |
468 KB |
Output is correct |
80 |
Correct |
20 ms |
468 KB |
Output is correct |
81 |
Correct |
7 ms |
340 KB |
Output is correct |
82 |
Correct |
22 ms |
368 KB |
Output is correct |
83 |
Correct |
13 ms |
340 KB |
Output is correct |
84 |
Correct |
22 ms |
384 KB |
Output is correct |
85 |
Correct |
7 ms |
1636 KB |
Output is correct |
86 |
Correct |
8 ms |
1748 KB |
Output is correct |
87 |
Correct |
7 ms |
1592 KB |
Output is correct |
88 |
Correct |
4 ms |
468 KB |
Output is correct |
89 |
Correct |
8 ms |
1592 KB |
Output is correct |
90 |
Correct |
5 ms |
1336 KB |
Output is correct |
91 |
Correct |
43 ms |
8024 KB |
Output is correct |
92 |
Correct |
33 ms |
9276 KB |
Output is correct |
93 |
Correct |
45 ms |
10564 KB |
Output is correct |
94 |
Correct |
39 ms |
384 KB |
Output is correct |
95 |
Correct |
38 ms |
392 KB |
Output is correct |
96 |
Correct |
38 ms |
340 KB |
Output is correct |
97 |
Correct |
40 ms |
304 KB |
Output is correct |
98 |
Correct |
42 ms |
396 KB |
Output is correct |
99 |
Correct |
10 ms |
2004 KB |
Output is correct |
100 |
Correct |
9 ms |
2016 KB |
Output is correct |
101 |
Correct |
12 ms |
2132 KB |
Output is correct |
102 |
Correct |
9 ms |
1960 KB |
Output is correct |
103 |
Correct |
9 ms |
1928 KB |
Output is correct |
104 |
Correct |
11 ms |
1984 KB |
Output is correct |
105 |
Correct |
70 ms |
11200 KB |
Output is correct |
106 |
Correct |
83 ms |
11180 KB |
Output is correct |
107 |
Correct |
73 ms |
11308 KB |
Output is correct |
108 |
Correct |
15 ms |
1796 KB |
Output is correct |
109 |
Execution timed out |
1567 ms |
1124 KB |
Time limit exceeded |
110 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
296 KB |
Output is correct |
5 |
Correct |
1 ms |
296 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
300 KB |
Output is correct |
10 |
Correct |
1 ms |
340 KB |
Output is correct |
11 |
Correct |
1 ms |
340 KB |
Output is correct |
12 |
Correct |
1 ms |
340 KB |
Output is correct |
13 |
Correct |
1 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
468 KB |
Output is correct |
16 |
Correct |
1 ms |
432 KB |
Output is correct |
17 |
Correct |
1 ms |
432 KB |
Output is correct |
18 |
Correct |
1 ms |
468 KB |
Output is correct |
19 |
Correct |
1 ms |
428 KB |
Output is correct |
20 |
Correct |
1 ms |
468 KB |
Output is correct |
21 |
Correct |
1 ms |
468 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
468 KB |
Output is correct |
24 |
Correct |
49 ms |
12700 KB |
Output is correct |
25 |
Correct |
55 ms |
12652 KB |
Output is correct |
26 |
Correct |
66 ms |
12596 KB |
Output is correct |
27 |
Correct |
12 ms |
1820 KB |
Output is correct |
28 |
Correct |
11 ms |
1784 KB |
Output is correct |
29 |
Correct |
8 ms |
1824 KB |
Output is correct |
30 |
Correct |
9 ms |
1708 KB |
Output is correct |
31 |
Correct |
8 ms |
1748 KB |
Output is correct |
32 |
Correct |
10 ms |
1716 KB |
Output is correct |
33 |
Correct |
28 ms |
4892 KB |
Output is correct |
34 |
Correct |
27 ms |
4956 KB |
Output is correct |
35 |
Correct |
31 ms |
4940 KB |
Output is correct |
36 |
Correct |
43 ms |
4892 KB |
Output is correct |
37 |
Correct |
31 ms |
4844 KB |
Output is correct |
38 |
Correct |
38 ms |
4956 KB |
Output is correct |
39 |
Correct |
99 ms |
14820 KB |
Output is correct |
40 |
Correct |
90 ms |
14768 KB |
Output is correct |
41 |
Correct |
92 ms |
14792 KB |
Output is correct |
42 |
Correct |
55 ms |
7116 KB |
Output is correct |
43 |
Correct |
33 ms |
4576 KB |
Output is correct |
44 |
Correct |
42 ms |
7748 KB |
Output is correct |
45 |
Correct |
26 ms |
5236 KB |
Output is correct |
46 |
Correct |
25 ms |
4796 KB |
Output is correct |
47 |
Correct |
41 ms |
7876 KB |
Output is correct |
48 |
Correct |
215 ms |
34408 KB |
Output is correct |
49 |
Correct |
119 ms |
19740 KB |
Output is correct |
50 |
Correct |
140 ms |
27356 KB |
Output is correct |
51 |
Correct |
205 ms |
26008 KB |
Output is correct |
52 |
Correct |
218 ms |
26412 KB |
Output is correct |
53 |
Correct |
167 ms |
20872 KB |
Output is correct |
54 |
Correct |
55 ms |
7884 KB |
Output is correct |
55 |
Correct |
70 ms |
7836 KB |
Output is correct |
56 |
Correct |
40 ms |
7888 KB |
Output is correct |
57 |
Correct |
41 ms |
7892 KB |
Output is correct |
58 |
Correct |
53 ms |
7844 KB |
Output is correct |
59 |
Correct |
40 ms |
7884 KB |
Output is correct |
60 |
Correct |
247 ms |
37576 KB |
Output is correct |
61 |
Correct |
267 ms |
37576 KB |
Output is correct |
62 |
Correct |
245 ms |
37600 KB |
Output is correct |
63 |
Correct |
245 ms |
37432 KB |
Output is correct |
64 |
Correct |
233 ms |
37436 KB |
Output is correct |
65 |
Correct |
244 ms |
37528 KB |
Output is correct |
66 |
Correct |
318 ms |
33484 KB |
Output is correct |
67 |
Correct |
304 ms |
33416 KB |
Output is correct |
68 |
Correct |
290 ms |
33356 KB |
Output is correct |
69 |
Correct |
0 ms |
212 KB |
Output is correct |
70 |
Correct |
1 ms |
300 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
212 KB |
Output is correct |
73 |
Correct |
4 ms |
340 KB |
Output is correct |
74 |
Correct |
3 ms |
296 KB |
Output is correct |
75 |
Correct |
2 ms |
340 KB |
Output is correct |
76 |
Correct |
2 ms |
212 KB |
Output is correct |
77 |
Correct |
2 ms |
340 KB |
Output is correct |
78 |
Correct |
1 ms |
340 KB |
Output is correct |
79 |
Correct |
1 ms |
432 KB |
Output is correct |
80 |
Correct |
1 ms |
340 KB |
Output is correct |
81 |
Correct |
1 ms |
340 KB |
Output is correct |
82 |
Correct |
1 ms |
340 KB |
Output is correct |
83 |
Correct |
1 ms |
428 KB |
Output is correct |
84 |
Correct |
1 ms |
340 KB |
Output is correct |
85 |
Correct |
1 ms |
468 KB |
Output is correct |
86 |
Correct |
1 ms |
340 KB |
Output is correct |
87 |
Correct |
1 ms |
340 KB |
Output is correct |
88 |
Correct |
1 ms |
340 KB |
Output is correct |
89 |
Correct |
1 ms |
212 KB |
Output is correct |
90 |
Correct |
7 ms |
340 KB |
Output is correct |
91 |
Correct |
4 ms |
304 KB |
Output is correct |
92 |
Correct |
3 ms |
296 KB |
Output is correct |
93 |
Correct |
2 ms |
340 KB |
Output is correct |
94 |
Correct |
3 ms |
340 KB |
Output is correct |
95 |
Correct |
1 ms |
468 KB |
Output is correct |
96 |
Correct |
1 ms |
468 KB |
Output is correct |
97 |
Correct |
1 ms |
468 KB |
Output is correct |
98 |
Correct |
1 ms |
468 KB |
Output is correct |
99 |
Correct |
2 ms |
468 KB |
Output is correct |
100 |
Correct |
1 ms |
468 KB |
Output is correct |
101 |
Correct |
1 ms |
436 KB |
Output is correct |
102 |
Correct |
2 ms |
552 KB |
Output is correct |
103 |
Correct |
1 ms |
468 KB |
Output is correct |
104 |
Correct |
1 ms |
432 KB |
Output is correct |
105 |
Correct |
1 ms |
468 KB |
Output is correct |
106 |
Correct |
2 ms |
468 KB |
Output is correct |
107 |
Correct |
20 ms |
468 KB |
Output is correct |
108 |
Correct |
7 ms |
340 KB |
Output is correct |
109 |
Correct |
22 ms |
368 KB |
Output is correct |
110 |
Correct |
13 ms |
340 KB |
Output is correct |
111 |
Correct |
22 ms |
384 KB |
Output is correct |
112 |
Correct |
7 ms |
1636 KB |
Output is correct |
113 |
Correct |
8 ms |
1748 KB |
Output is correct |
114 |
Correct |
7 ms |
1592 KB |
Output is correct |
115 |
Correct |
4 ms |
468 KB |
Output is correct |
116 |
Correct |
8 ms |
1592 KB |
Output is correct |
117 |
Correct |
5 ms |
1336 KB |
Output is correct |
118 |
Correct |
43 ms |
8024 KB |
Output is correct |
119 |
Correct |
33 ms |
9276 KB |
Output is correct |
120 |
Correct |
45 ms |
10564 KB |
Output is correct |
121 |
Correct |
39 ms |
384 KB |
Output is correct |
122 |
Correct |
38 ms |
392 KB |
Output is correct |
123 |
Correct |
38 ms |
340 KB |
Output is correct |
124 |
Correct |
40 ms |
304 KB |
Output is correct |
125 |
Correct |
42 ms |
396 KB |
Output is correct |
126 |
Correct |
10 ms |
2004 KB |
Output is correct |
127 |
Correct |
9 ms |
2016 KB |
Output is correct |
128 |
Correct |
12 ms |
2132 KB |
Output is correct |
129 |
Correct |
9 ms |
1960 KB |
Output is correct |
130 |
Correct |
9 ms |
1928 KB |
Output is correct |
131 |
Correct |
11 ms |
1984 KB |
Output is correct |
132 |
Correct |
70 ms |
11200 KB |
Output is correct |
133 |
Correct |
83 ms |
11180 KB |
Output is correct |
134 |
Correct |
73 ms |
11308 KB |
Output is correct |
135 |
Correct |
15 ms |
1796 KB |
Output is correct |
136 |
Execution timed out |
1567 ms |
1124 KB |
Time limit exceeded |
137 |
Halted |
0 ms |
0 KB |
- |