//#include "paint.h"
#include <bits/stdc++.h>
#define pair<int,int>
using namespace std;
const int NN=1e5+100;
bool freq[NN];
vector<int> like[NN];
vector<int> c;
vector<int> a;
int mp2[NN];
int mp3[NN];
vector<int> vis;
vector<int> vis2;
int n,m,k;
map<int,bool> mp[NN];
bool ok(int x,int y)
{
for(int l=0;l<m;l++){
if(mp[(x+l)%m][c[y+l]]==0){
return 0;
}
}
return 1;
}
int minimumInstructions(
int N, int M, int K, std::vector<int> C,
std::vector<int> A, std::vector<std::vector<int>> B)
{
a=A;
c=C;
n=N;
m=M;
k=K;
int maxx=0;
// cout<<5<<endl;
for(int i=0;i<m;i++){
for(auto x:B[i]){
mp[i][x]=1;
like[x].push_back(i);
}
}
for(int i=0;i<k;i++){
maxx=max(maxx,(int)like[i].size());
}
// cout<<5<<endl;
int idx=-1;
int cnt=0;
if(maxx<=1){
for(int i=0;i<n;i++){
int v=c[i];
if(like[v].empty())return -1;
if(like[v][0]==idx){
cnt++;
}
else{
cnt=1;
idx=like[v][0];
}
if(cnt>=m){
freq[i-m+1]=1;
}
idx++;
idx%=m;
}
}
else if(n<=-1){
for(int j=0;j<=n-m;j++){
for(auto i:like[c[j]]){
if(ok(i,j)){
freq[j]=1;
break;
}
}
}
}
else{
for(int i=0;i<n;i++){
int mox=0;
for(auto x:like[c[i]]){
mp2[x]=mp3[(x-1+m)%m]+1;
mox=max(mox,mp2[x]);
vis.push_back(x);
}
if(mox>=m){
freq[i-m+1]=1;
}
for(auto x:vis2){
mp3[x]=0;
}
for(auto x:vis){
mp3[x]=mp2[x];
mp2[x]=0;
}
vis2.clear();
vis2=vis;
vis.clear();
}
}
int mx=0;
int ans=0;
int i=0;
// cout<<5<<endl;
while(mx<n){
int v=mx;
// cout<<mx<<endl;
ans++;
while(i<=mx){
if(freq[i]){
v=max(v,i+m);
}
i++;
}
if(v==mx)break;
mx=v;
}
if(mx<n)return -1;
return ans;
}
/*
int main() {
int N, M, K;
assert(3 == scanf("%d %d %d", &N, &M, &K));
std::vector<int> C(N);
for (int i = 0; i < N; ++i) {
assert(1 == scanf("%d", &C[i]));
}
std::vector<int> A(M);
std::vector<std::vector<int>> B(M);
for (int i = 0; i < M; ++i) {
assert(1 == scanf("%d", &A[i]));
B[i].resize(A[i]);
for (int j = 0; j < A[i]; ++j) {
assert(1 == scanf("%d", &B[i][j]));
}
}
int minimum_instructions = minimumInstructions(N, M, K, C, A, B);
printf("%d\n", minimum_instructions);
return 0;
}
*/
/*
8 3 5
3 3 1 3 4 4 2 2
3 0 1 2
2 2 3
2 3 4
*/
Compilation message
paint.cpp:3:9: warning: ISO C++11 requires whitespace after the macro name
3 | #define pair<int,int>
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7248 KB |
Output is correct |
2 |
Correct |
5 ms |
7336 KB |
Output is correct |
3 |
Correct |
5 ms |
7244 KB |
Output is correct |
4 |
Correct |
5 ms |
7244 KB |
Output is correct |
5 |
Correct |
5 ms |
7244 KB |
Output is correct |
6 |
Correct |
5 ms |
7352 KB |
Output is correct |
7 |
Correct |
5 ms |
7244 KB |
Output is correct |
8 |
Correct |
5 ms |
7388 KB |
Output is correct |
9 |
Correct |
5 ms |
7372 KB |
Output is correct |
10 |
Correct |
5 ms |
7372 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
5 ms |
7244 KB |
Output is correct |
13 |
Correct |
5 ms |
7372 KB |
Output is correct |
14 |
Correct |
5 ms |
7372 KB |
Output is correct |
15 |
Correct |
5 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7360 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
5 ms |
7372 KB |
Output is correct |
19 |
Correct |
5 ms |
7372 KB |
Output is correct |
20 |
Correct |
5 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7372 KB |
Output is correct |
22 |
Correct |
40 ms |
15972 KB |
Output is correct |
23 |
Correct |
41 ms |
15948 KB |
Output is correct |
24 |
Correct |
44 ms |
15908 KB |
Output is correct |
25 |
Correct |
7 ms |
7500 KB |
Output is correct |
26 |
Correct |
8 ms |
7500 KB |
Output is correct |
27 |
Correct |
7 ms |
7504 KB |
Output is correct |
28 |
Correct |
9 ms |
7500 KB |
Output is correct |
29 |
Correct |
7 ms |
7500 KB |
Output is correct |
30 |
Correct |
7 ms |
7500 KB |
Output is correct |
31 |
Correct |
15 ms |
9484 KB |
Output is correct |
32 |
Correct |
15 ms |
9420 KB |
Output is correct |
33 |
Correct |
15 ms |
9420 KB |
Output is correct |
34 |
Correct |
16 ms |
9548 KB |
Output is correct |
35 |
Correct |
16 ms |
9356 KB |
Output is correct |
36 |
Correct |
16 ms |
9356 KB |
Output is correct |
37 |
Correct |
47 ms |
16352 KB |
Output is correct |
38 |
Correct |
49 ms |
16356 KB |
Output is correct |
39 |
Correct |
46 ms |
16356 KB |
Output is correct |
40 |
Correct |
16 ms |
8480 KB |
Output is correct |
41 |
Correct |
11 ms |
7984 KB |
Output is correct |
42 |
Correct |
16 ms |
8524 KB |
Output is correct |
43 |
Correct |
12 ms |
8140 KB |
Output is correct |
44 |
Correct |
11 ms |
8140 KB |
Output is correct |
45 |
Correct |
15 ms |
8524 KB |
Output is correct |
46 |
Correct |
60 ms |
21016 KB |
Output is correct |
47 |
Correct |
48 ms |
15300 KB |
Output is correct |
48 |
Correct |
43 ms |
17888 KB |
Output is correct |
49 |
Correct |
53 ms |
19364 KB |
Output is correct |
50 |
Correct |
56 ms |
19064 KB |
Output is correct |
51 |
Correct |
44 ms |
16068 KB |
Output is correct |
52 |
Correct |
16 ms |
8536 KB |
Output is correct |
53 |
Correct |
16 ms |
8532 KB |
Output is correct |
54 |
Correct |
17 ms |
8532 KB |
Output is correct |
55 |
Correct |
17 ms |
8536 KB |
Output is correct |
56 |
Correct |
16 ms |
8652 KB |
Output is correct |
57 |
Correct |
16 ms |
8528 KB |
Output is correct |
58 |
Correct |
66 ms |
22464 KB |
Output is correct |
59 |
Correct |
65 ms |
22472 KB |
Output is correct |
60 |
Correct |
67 ms |
22448 KB |
Output is correct |
61 |
Correct |
67 ms |
22368 KB |
Output is correct |
62 |
Correct |
69 ms |
22348 KB |
Output is correct |
63 |
Correct |
66 ms |
22420 KB |
Output is correct |
64 |
Correct |
67 ms |
21588 KB |
Output is correct |
65 |
Correct |
68 ms |
21580 KB |
Output is correct |
66 |
Correct |
67 ms |
21584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7248 KB |
Output is correct |
2 |
Correct |
5 ms |
7336 KB |
Output is correct |
3 |
Correct |
5 ms |
7244 KB |
Output is correct |
4 |
Correct |
5 ms |
7244 KB |
Output is correct |
5 |
Correct |
5 ms |
7244 KB |
Output is correct |
6 |
Correct |
5 ms |
7352 KB |
Output is correct |
7 |
Correct |
5 ms |
7244 KB |
Output is correct |
8 |
Correct |
5 ms |
7388 KB |
Output is correct |
9 |
Correct |
5 ms |
7372 KB |
Output is correct |
10 |
Correct |
5 ms |
7372 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
5 ms |
7244 KB |
Output is correct |
13 |
Correct |
5 ms |
7372 KB |
Output is correct |
14 |
Correct |
5 ms |
7372 KB |
Output is correct |
15 |
Correct |
5 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7360 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
5 ms |
7372 KB |
Output is correct |
19 |
Correct |
5 ms |
7372 KB |
Output is correct |
20 |
Correct |
5 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7372 KB |
Output is correct |
22 |
Correct |
5 ms |
7368 KB |
Output is correct |
23 |
Correct |
5 ms |
7244 KB |
Output is correct |
24 |
Correct |
5 ms |
7372 KB |
Output is correct |
25 |
Correct |
5 ms |
7372 KB |
Output is correct |
26 |
Correct |
5 ms |
7364 KB |
Output is correct |
27 |
Correct |
5 ms |
7372 KB |
Output is correct |
28 |
Correct |
6 ms |
7372 KB |
Output is correct |
29 |
Correct |
5 ms |
7364 KB |
Output is correct |
30 |
Correct |
6 ms |
7372 KB |
Output is correct |
31 |
Correct |
6 ms |
7364 KB |
Output is correct |
32 |
Correct |
5 ms |
7372 KB |
Output is correct |
33 |
Correct |
5 ms |
7372 KB |
Output is correct |
34 |
Correct |
5 ms |
7372 KB |
Output is correct |
35 |
Correct |
5 ms |
7360 KB |
Output is correct |
36 |
Correct |
5 ms |
7372 KB |
Output is correct |
37 |
Correct |
5 ms |
7368 KB |
Output is correct |
38 |
Correct |
5 ms |
7372 KB |
Output is correct |
39 |
Correct |
5 ms |
7364 KB |
Output is correct |
40 |
Correct |
6 ms |
7372 KB |
Output is correct |
41 |
Correct |
5 ms |
7372 KB |
Output is correct |
42 |
Correct |
6 ms |
7372 KB |
Output is correct |
43 |
Correct |
5 ms |
7372 KB |
Output is correct |
44 |
Correct |
5 ms |
7372 KB |
Output is correct |
45 |
Correct |
5 ms |
7372 KB |
Output is correct |
46 |
Correct |
5 ms |
7364 KB |
Output is correct |
47 |
Correct |
5 ms |
7372 KB |
Output is correct |
48 |
Correct |
5 ms |
7372 KB |
Output is correct |
49 |
Correct |
5 ms |
7372 KB |
Output is correct |
50 |
Correct |
5 ms |
7368 KB |
Output is correct |
51 |
Correct |
5 ms |
7376 KB |
Output is correct |
52 |
Correct |
5 ms |
7372 KB |
Output is correct |
53 |
Correct |
5 ms |
7372 KB |
Output is correct |
54 |
Correct |
6 ms |
7372 KB |
Output is correct |
55 |
Correct |
5 ms |
7372 KB |
Output is correct |
56 |
Correct |
5 ms |
7368 KB |
Output is correct |
57 |
Correct |
6 ms |
7372 KB |
Output is correct |
58 |
Correct |
6 ms |
7372 KB |
Output is correct |
59 |
Correct |
6 ms |
7372 KB |
Output is correct |
60 |
Correct |
6 ms |
7372 KB |
Output is correct |
61 |
Correct |
5 ms |
7372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
7368 KB |
Output is correct |
2 |
Correct |
5 ms |
7244 KB |
Output is correct |
3 |
Correct |
4 ms |
7248 KB |
Output is correct |
4 |
Correct |
5 ms |
7336 KB |
Output is correct |
5 |
Correct |
5 ms |
7244 KB |
Output is correct |
6 |
Correct |
5 ms |
7244 KB |
Output is correct |
7 |
Correct |
5 ms |
7244 KB |
Output is correct |
8 |
Correct |
5 ms |
7352 KB |
Output is correct |
9 |
Correct |
5 ms |
7244 KB |
Output is correct |
10 |
Correct |
5 ms |
7388 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
5 ms |
7372 KB |
Output is correct |
13 |
Correct |
5 ms |
7372 KB |
Output is correct |
14 |
Correct |
5 ms |
7244 KB |
Output is correct |
15 |
Correct |
5 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7372 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
5 ms |
7360 KB |
Output is correct |
19 |
Correct |
5 ms |
7372 KB |
Output is correct |
20 |
Correct |
5 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7372 KB |
Output is correct |
22 |
Correct |
5 ms |
7372 KB |
Output is correct |
23 |
Correct |
5 ms |
7372 KB |
Output is correct |
24 |
Correct |
40 ms |
15972 KB |
Output is correct |
25 |
Correct |
41 ms |
15948 KB |
Output is correct |
26 |
Correct |
44 ms |
15908 KB |
Output is correct |
27 |
Correct |
5 ms |
7372 KB |
Output is correct |
28 |
Correct |
5 ms |
7372 KB |
Output is correct |
29 |
Correct |
5 ms |
7364 KB |
Output is correct |
30 |
Correct |
5 ms |
7372 KB |
Output is correct |
31 |
Correct |
6 ms |
7372 KB |
Output is correct |
32 |
Correct |
5 ms |
7364 KB |
Output is correct |
33 |
Correct |
6 ms |
7372 KB |
Output is correct |
34 |
Correct |
6 ms |
7364 KB |
Output is correct |
35 |
Correct |
5 ms |
7372 KB |
Output is correct |
36 |
Correct |
5 ms |
7372 KB |
Output is correct |
37 |
Correct |
5 ms |
7372 KB |
Output is correct |
38 |
Correct |
5 ms |
7360 KB |
Output is correct |
39 |
Correct |
5 ms |
7372 KB |
Output is correct |
40 |
Correct |
5 ms |
7368 KB |
Output is correct |
41 |
Correct |
5 ms |
7372 KB |
Output is correct |
42 |
Correct |
5 ms |
7364 KB |
Output is correct |
43 |
Correct |
6 ms |
7372 KB |
Output is correct |
44 |
Correct |
5 ms |
7372 KB |
Output is correct |
45 |
Correct |
6 ms |
7372 KB |
Output is correct |
46 |
Correct |
5 ms |
7372 KB |
Output is correct |
47 |
Correct |
5 ms |
7372 KB |
Output is correct |
48 |
Correct |
5 ms |
7372 KB |
Output is correct |
49 |
Correct |
5 ms |
7364 KB |
Output is correct |
50 |
Correct |
5 ms |
7372 KB |
Output is correct |
51 |
Correct |
5 ms |
7372 KB |
Output is correct |
52 |
Correct |
5 ms |
7372 KB |
Output is correct |
53 |
Correct |
5 ms |
7368 KB |
Output is correct |
54 |
Correct |
5 ms |
7376 KB |
Output is correct |
55 |
Correct |
5 ms |
7372 KB |
Output is correct |
56 |
Correct |
5 ms |
7372 KB |
Output is correct |
57 |
Correct |
6 ms |
7372 KB |
Output is correct |
58 |
Correct |
5 ms |
7372 KB |
Output is correct |
59 |
Correct |
5 ms |
7368 KB |
Output is correct |
60 |
Correct |
6 ms |
7372 KB |
Output is correct |
61 |
Correct |
6 ms |
7372 KB |
Output is correct |
62 |
Correct |
6 ms |
7372 KB |
Output is correct |
63 |
Correct |
6 ms |
7372 KB |
Output is correct |
64 |
Correct |
5 ms |
7372 KB |
Output is correct |
65 |
Correct |
5 ms |
7364 KB |
Output is correct |
66 |
Correct |
5 ms |
7372 KB |
Output is correct |
67 |
Correct |
6 ms |
7372 KB |
Output is correct |
68 |
Correct |
5 ms |
7360 KB |
Output is correct |
69 |
Correct |
6 ms |
7360 KB |
Output is correct |
70 |
Correct |
8 ms |
8012 KB |
Output is correct |
71 |
Correct |
8 ms |
8140 KB |
Output is correct |
72 |
Correct |
9 ms |
8116 KB |
Output is correct |
73 |
Correct |
7 ms |
7756 KB |
Output is correct |
74 |
Correct |
8 ms |
8012 KB |
Output is correct |
75 |
Correct |
8 ms |
7884 KB |
Output is correct |
76 |
Correct |
47 ms |
15644 KB |
Output is correct |
77 |
Correct |
50 ms |
16564 KB |
Output is correct |
78 |
Correct |
59 ms |
17988 KB |
Output is correct |
79 |
Correct |
6 ms |
7368 KB |
Output is correct |
80 |
Correct |
6 ms |
7372 KB |
Output is correct |
81 |
Correct |
6 ms |
7368 KB |
Output is correct |
82 |
Correct |
7 ms |
7372 KB |
Output is correct |
83 |
Correct |
7 ms |
7372 KB |
Output is correct |
84 |
Correct |
9 ms |
8268 KB |
Output is correct |
85 |
Correct |
11 ms |
8268 KB |
Output is correct |
86 |
Correct |
9 ms |
8268 KB |
Output is correct |
87 |
Correct |
9 ms |
8336 KB |
Output is correct |
88 |
Correct |
9 ms |
8268 KB |
Output is correct |
89 |
Correct |
9 ms |
8276 KB |
Output is correct |
90 |
Correct |
74 ms |
18920 KB |
Output is correct |
91 |
Correct |
68 ms |
18716 KB |
Output is correct |
92 |
Correct |
66 ms |
18780 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
7368 KB |
Output is correct |
2 |
Correct |
5 ms |
7244 KB |
Output is correct |
3 |
Correct |
4 ms |
7248 KB |
Output is correct |
4 |
Correct |
5 ms |
7336 KB |
Output is correct |
5 |
Correct |
5 ms |
7244 KB |
Output is correct |
6 |
Correct |
5 ms |
7244 KB |
Output is correct |
7 |
Correct |
5 ms |
7244 KB |
Output is correct |
8 |
Correct |
5 ms |
7352 KB |
Output is correct |
9 |
Correct |
5 ms |
7244 KB |
Output is correct |
10 |
Correct |
5 ms |
7388 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
5 ms |
7372 KB |
Output is correct |
13 |
Correct |
5 ms |
7372 KB |
Output is correct |
14 |
Correct |
5 ms |
7244 KB |
Output is correct |
15 |
Correct |
5 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7372 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
5 ms |
7360 KB |
Output is correct |
19 |
Correct |
5 ms |
7372 KB |
Output is correct |
20 |
Correct |
5 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7372 KB |
Output is correct |
22 |
Correct |
5 ms |
7372 KB |
Output is correct |
23 |
Correct |
5 ms |
7372 KB |
Output is correct |
24 |
Correct |
40 ms |
15972 KB |
Output is correct |
25 |
Correct |
41 ms |
15948 KB |
Output is correct |
26 |
Correct |
44 ms |
15908 KB |
Output is correct |
27 |
Correct |
7 ms |
7500 KB |
Output is correct |
28 |
Correct |
8 ms |
7500 KB |
Output is correct |
29 |
Correct |
7 ms |
7504 KB |
Output is correct |
30 |
Correct |
9 ms |
7500 KB |
Output is correct |
31 |
Correct |
7 ms |
7500 KB |
Output is correct |
32 |
Correct |
7 ms |
7500 KB |
Output is correct |
33 |
Correct |
15 ms |
9484 KB |
Output is correct |
34 |
Correct |
15 ms |
9420 KB |
Output is correct |
35 |
Correct |
15 ms |
9420 KB |
Output is correct |
36 |
Correct |
16 ms |
9548 KB |
Output is correct |
37 |
Correct |
16 ms |
9356 KB |
Output is correct |
38 |
Correct |
16 ms |
9356 KB |
Output is correct |
39 |
Correct |
47 ms |
16352 KB |
Output is correct |
40 |
Correct |
49 ms |
16356 KB |
Output is correct |
41 |
Correct |
46 ms |
16356 KB |
Output is correct |
42 |
Correct |
5 ms |
7372 KB |
Output is correct |
43 |
Correct |
5 ms |
7372 KB |
Output is correct |
44 |
Correct |
5 ms |
7364 KB |
Output is correct |
45 |
Correct |
5 ms |
7372 KB |
Output is correct |
46 |
Correct |
6 ms |
7372 KB |
Output is correct |
47 |
Correct |
5 ms |
7364 KB |
Output is correct |
48 |
Correct |
6 ms |
7372 KB |
Output is correct |
49 |
Correct |
6 ms |
7364 KB |
Output is correct |
50 |
Correct |
5 ms |
7372 KB |
Output is correct |
51 |
Correct |
5 ms |
7372 KB |
Output is correct |
52 |
Correct |
5 ms |
7372 KB |
Output is correct |
53 |
Correct |
5 ms |
7360 KB |
Output is correct |
54 |
Correct |
5 ms |
7372 KB |
Output is correct |
55 |
Correct |
5 ms |
7368 KB |
Output is correct |
56 |
Correct |
5 ms |
7372 KB |
Output is correct |
57 |
Correct |
5 ms |
7364 KB |
Output is correct |
58 |
Correct |
6 ms |
7372 KB |
Output is correct |
59 |
Correct |
5 ms |
7372 KB |
Output is correct |
60 |
Correct |
6 ms |
7372 KB |
Output is correct |
61 |
Correct |
5 ms |
7372 KB |
Output is correct |
62 |
Correct |
5 ms |
7372 KB |
Output is correct |
63 |
Correct |
5 ms |
7372 KB |
Output is correct |
64 |
Correct |
5 ms |
7364 KB |
Output is correct |
65 |
Correct |
5 ms |
7372 KB |
Output is correct |
66 |
Correct |
5 ms |
7372 KB |
Output is correct |
67 |
Correct |
5 ms |
7372 KB |
Output is correct |
68 |
Correct |
5 ms |
7368 KB |
Output is correct |
69 |
Correct |
5 ms |
7376 KB |
Output is correct |
70 |
Correct |
5 ms |
7372 KB |
Output is correct |
71 |
Correct |
5 ms |
7372 KB |
Output is correct |
72 |
Correct |
6 ms |
7372 KB |
Output is correct |
73 |
Correct |
5 ms |
7372 KB |
Output is correct |
74 |
Correct |
5 ms |
7368 KB |
Output is correct |
75 |
Correct |
6 ms |
7372 KB |
Output is correct |
76 |
Correct |
6 ms |
7372 KB |
Output is correct |
77 |
Correct |
6 ms |
7372 KB |
Output is correct |
78 |
Correct |
6 ms |
7372 KB |
Output is correct |
79 |
Correct |
5 ms |
7372 KB |
Output is correct |
80 |
Correct |
5 ms |
7364 KB |
Output is correct |
81 |
Correct |
5 ms |
7372 KB |
Output is correct |
82 |
Correct |
6 ms |
7372 KB |
Output is correct |
83 |
Correct |
5 ms |
7360 KB |
Output is correct |
84 |
Correct |
6 ms |
7360 KB |
Output is correct |
85 |
Correct |
8 ms |
8012 KB |
Output is correct |
86 |
Correct |
8 ms |
8140 KB |
Output is correct |
87 |
Correct |
9 ms |
8116 KB |
Output is correct |
88 |
Correct |
7 ms |
7756 KB |
Output is correct |
89 |
Correct |
8 ms |
8012 KB |
Output is correct |
90 |
Correct |
8 ms |
7884 KB |
Output is correct |
91 |
Correct |
47 ms |
15644 KB |
Output is correct |
92 |
Correct |
50 ms |
16564 KB |
Output is correct |
93 |
Correct |
59 ms |
17988 KB |
Output is correct |
94 |
Correct |
6 ms |
7368 KB |
Output is correct |
95 |
Correct |
6 ms |
7372 KB |
Output is correct |
96 |
Correct |
6 ms |
7368 KB |
Output is correct |
97 |
Correct |
7 ms |
7372 KB |
Output is correct |
98 |
Correct |
7 ms |
7372 KB |
Output is correct |
99 |
Correct |
9 ms |
8268 KB |
Output is correct |
100 |
Correct |
11 ms |
8268 KB |
Output is correct |
101 |
Correct |
9 ms |
8268 KB |
Output is correct |
102 |
Correct |
9 ms |
8336 KB |
Output is correct |
103 |
Correct |
9 ms |
8268 KB |
Output is correct |
104 |
Correct |
9 ms |
8276 KB |
Output is correct |
105 |
Correct |
74 ms |
18920 KB |
Output is correct |
106 |
Correct |
68 ms |
18716 KB |
Output is correct |
107 |
Correct |
66 ms |
18780 KB |
Output is correct |
108 |
Correct |
7 ms |
7624 KB |
Output is correct |
109 |
Correct |
111 ms |
7680 KB |
Output is correct |
110 |
Correct |
63 ms |
7628 KB |
Output is correct |
111 |
Correct |
52 ms |
7636 KB |
Output is correct |
112 |
Correct |
54 ms |
7632 KB |
Output is correct |
113 |
Correct |
39 ms |
7628 KB |
Output is correct |
114 |
Correct |
29 ms |
11852 KB |
Output is correct |
115 |
Correct |
28 ms |
11808 KB |
Output is correct |
116 |
Correct |
34 ms |
12484 KB |
Output is correct |
117 |
Correct |
27 ms |
11720 KB |
Output is correct |
118 |
Correct |
39 ms |
12196 KB |
Output is correct |
119 |
Correct |
30 ms |
10708 KB |
Output is correct |
120 |
Correct |
48 ms |
14488 KB |
Output is correct |
121 |
Correct |
12 ms |
8652 KB |
Output is correct |
122 |
Correct |
51 ms |
15840 KB |
Output is correct |
123 |
Correct |
11 ms |
8524 KB |
Output is correct |
124 |
Correct |
58 ms |
16760 KB |
Output is correct |
125 |
Correct |
15 ms |
9164 KB |
Output is correct |
126 |
Correct |
15 ms |
9424 KB |
Output is correct |
127 |
Correct |
25 ms |
10064 KB |
Output is correct |
128 |
Correct |
20 ms |
9184 KB |
Output is correct |
129 |
Correct |
19 ms |
9332 KB |
Output is correct |
130 |
Correct |
8 ms |
7576 KB |
Output is correct |
131 |
Correct |
153 ms |
7756 KB |
Output is correct |
132 |
Correct |
110 ms |
7764 KB |
Output is correct |
133 |
Correct |
93 ms |
7756 KB |
Output is correct |
134 |
Correct |
82 ms |
7828 KB |
Output is correct |
135 |
Correct |
73 ms |
7864 KB |
Output is correct |
136 |
Correct |
37 ms |
13308 KB |
Output is correct |
137 |
Correct |
36 ms |
13384 KB |
Output is correct |
138 |
Correct |
38 ms |
13296 KB |
Output is correct |
139 |
Correct |
37 ms |
13288 KB |
Output is correct |
140 |
Correct |
39 ms |
13508 KB |
Output is correct |
141 |
Correct |
36 ms |
13380 KB |
Output is correct |
142 |
Correct |
75 ms |
19840 KB |
Output is correct |
143 |
Correct |
17 ms |
9492 KB |
Output is correct |
144 |
Correct |
74 ms |
19716 KB |
Output is correct |
145 |
Correct |
16 ms |
9420 KB |
Output is correct |
146 |
Correct |
71 ms |
19780 KB |
Output is correct |
147 |
Correct |
16 ms |
9420 KB |
Output is correct |
148 |
Correct |
22 ms |
10316 KB |
Output is correct |
149 |
Correct |
21 ms |
10280 KB |
Output is correct |
150 |
Correct |
20 ms |
10188 KB |
Output is correct |
151 |
Correct |
19 ms |
10060 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
7368 KB |
Output is correct |
2 |
Correct |
5 ms |
7244 KB |
Output is correct |
3 |
Correct |
4 ms |
7248 KB |
Output is correct |
4 |
Correct |
5 ms |
7336 KB |
Output is correct |
5 |
Correct |
5 ms |
7244 KB |
Output is correct |
6 |
Correct |
5 ms |
7244 KB |
Output is correct |
7 |
Correct |
5 ms |
7244 KB |
Output is correct |
8 |
Correct |
5 ms |
7352 KB |
Output is correct |
9 |
Correct |
5 ms |
7244 KB |
Output is correct |
10 |
Correct |
5 ms |
7388 KB |
Output is correct |
11 |
Correct |
5 ms |
7372 KB |
Output is correct |
12 |
Correct |
5 ms |
7372 KB |
Output is correct |
13 |
Correct |
5 ms |
7372 KB |
Output is correct |
14 |
Correct |
5 ms |
7244 KB |
Output is correct |
15 |
Correct |
5 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7372 KB |
Output is correct |
17 |
Correct |
5 ms |
7372 KB |
Output is correct |
18 |
Correct |
5 ms |
7360 KB |
Output is correct |
19 |
Correct |
5 ms |
7372 KB |
Output is correct |
20 |
Correct |
5 ms |
7372 KB |
Output is correct |
21 |
Correct |
5 ms |
7372 KB |
Output is correct |
22 |
Correct |
5 ms |
7372 KB |
Output is correct |
23 |
Correct |
5 ms |
7372 KB |
Output is correct |
24 |
Correct |
40 ms |
15972 KB |
Output is correct |
25 |
Correct |
41 ms |
15948 KB |
Output is correct |
26 |
Correct |
44 ms |
15908 KB |
Output is correct |
27 |
Correct |
7 ms |
7500 KB |
Output is correct |
28 |
Correct |
8 ms |
7500 KB |
Output is correct |
29 |
Correct |
7 ms |
7504 KB |
Output is correct |
30 |
Correct |
9 ms |
7500 KB |
Output is correct |
31 |
Correct |
7 ms |
7500 KB |
Output is correct |
32 |
Correct |
7 ms |
7500 KB |
Output is correct |
33 |
Correct |
15 ms |
9484 KB |
Output is correct |
34 |
Correct |
15 ms |
9420 KB |
Output is correct |
35 |
Correct |
15 ms |
9420 KB |
Output is correct |
36 |
Correct |
16 ms |
9548 KB |
Output is correct |
37 |
Correct |
16 ms |
9356 KB |
Output is correct |
38 |
Correct |
16 ms |
9356 KB |
Output is correct |
39 |
Correct |
47 ms |
16352 KB |
Output is correct |
40 |
Correct |
49 ms |
16356 KB |
Output is correct |
41 |
Correct |
46 ms |
16356 KB |
Output is correct |
42 |
Correct |
16 ms |
8480 KB |
Output is correct |
43 |
Correct |
11 ms |
7984 KB |
Output is correct |
44 |
Correct |
16 ms |
8524 KB |
Output is correct |
45 |
Correct |
12 ms |
8140 KB |
Output is correct |
46 |
Correct |
11 ms |
8140 KB |
Output is correct |
47 |
Correct |
15 ms |
8524 KB |
Output is correct |
48 |
Correct |
60 ms |
21016 KB |
Output is correct |
49 |
Correct |
48 ms |
15300 KB |
Output is correct |
50 |
Correct |
43 ms |
17888 KB |
Output is correct |
51 |
Correct |
53 ms |
19364 KB |
Output is correct |
52 |
Correct |
56 ms |
19064 KB |
Output is correct |
53 |
Correct |
44 ms |
16068 KB |
Output is correct |
54 |
Correct |
16 ms |
8536 KB |
Output is correct |
55 |
Correct |
16 ms |
8532 KB |
Output is correct |
56 |
Correct |
17 ms |
8532 KB |
Output is correct |
57 |
Correct |
17 ms |
8536 KB |
Output is correct |
58 |
Correct |
16 ms |
8652 KB |
Output is correct |
59 |
Correct |
16 ms |
8528 KB |
Output is correct |
60 |
Correct |
66 ms |
22464 KB |
Output is correct |
61 |
Correct |
65 ms |
22472 KB |
Output is correct |
62 |
Correct |
67 ms |
22448 KB |
Output is correct |
63 |
Correct |
67 ms |
22368 KB |
Output is correct |
64 |
Correct |
69 ms |
22348 KB |
Output is correct |
65 |
Correct |
66 ms |
22420 KB |
Output is correct |
66 |
Correct |
67 ms |
21588 KB |
Output is correct |
67 |
Correct |
68 ms |
21580 KB |
Output is correct |
68 |
Correct |
67 ms |
21584 KB |
Output is correct |
69 |
Correct |
5 ms |
7372 KB |
Output is correct |
70 |
Correct |
5 ms |
7372 KB |
Output is correct |
71 |
Correct |
5 ms |
7364 KB |
Output is correct |
72 |
Correct |
5 ms |
7372 KB |
Output is correct |
73 |
Correct |
6 ms |
7372 KB |
Output is correct |
74 |
Correct |
5 ms |
7364 KB |
Output is correct |
75 |
Correct |
6 ms |
7372 KB |
Output is correct |
76 |
Correct |
6 ms |
7364 KB |
Output is correct |
77 |
Correct |
5 ms |
7372 KB |
Output is correct |
78 |
Correct |
5 ms |
7372 KB |
Output is correct |
79 |
Correct |
5 ms |
7372 KB |
Output is correct |
80 |
Correct |
5 ms |
7360 KB |
Output is correct |
81 |
Correct |
5 ms |
7372 KB |
Output is correct |
82 |
Correct |
5 ms |
7368 KB |
Output is correct |
83 |
Correct |
5 ms |
7372 KB |
Output is correct |
84 |
Correct |
5 ms |
7364 KB |
Output is correct |
85 |
Correct |
6 ms |
7372 KB |
Output is correct |
86 |
Correct |
5 ms |
7372 KB |
Output is correct |
87 |
Correct |
6 ms |
7372 KB |
Output is correct |
88 |
Correct |
5 ms |
7372 KB |
Output is correct |
89 |
Correct |
5 ms |
7372 KB |
Output is correct |
90 |
Correct |
5 ms |
7372 KB |
Output is correct |
91 |
Correct |
5 ms |
7364 KB |
Output is correct |
92 |
Correct |
5 ms |
7372 KB |
Output is correct |
93 |
Correct |
5 ms |
7372 KB |
Output is correct |
94 |
Correct |
5 ms |
7372 KB |
Output is correct |
95 |
Correct |
5 ms |
7368 KB |
Output is correct |
96 |
Correct |
5 ms |
7376 KB |
Output is correct |
97 |
Correct |
5 ms |
7372 KB |
Output is correct |
98 |
Correct |
5 ms |
7372 KB |
Output is correct |
99 |
Correct |
6 ms |
7372 KB |
Output is correct |
100 |
Correct |
5 ms |
7372 KB |
Output is correct |
101 |
Correct |
5 ms |
7368 KB |
Output is correct |
102 |
Correct |
6 ms |
7372 KB |
Output is correct |
103 |
Correct |
6 ms |
7372 KB |
Output is correct |
104 |
Correct |
6 ms |
7372 KB |
Output is correct |
105 |
Correct |
6 ms |
7372 KB |
Output is correct |
106 |
Correct |
5 ms |
7372 KB |
Output is correct |
107 |
Correct |
5 ms |
7364 KB |
Output is correct |
108 |
Correct |
5 ms |
7372 KB |
Output is correct |
109 |
Correct |
6 ms |
7372 KB |
Output is correct |
110 |
Correct |
5 ms |
7360 KB |
Output is correct |
111 |
Correct |
6 ms |
7360 KB |
Output is correct |
112 |
Correct |
8 ms |
8012 KB |
Output is correct |
113 |
Correct |
8 ms |
8140 KB |
Output is correct |
114 |
Correct |
9 ms |
8116 KB |
Output is correct |
115 |
Correct |
7 ms |
7756 KB |
Output is correct |
116 |
Correct |
8 ms |
8012 KB |
Output is correct |
117 |
Correct |
8 ms |
7884 KB |
Output is correct |
118 |
Correct |
47 ms |
15644 KB |
Output is correct |
119 |
Correct |
50 ms |
16564 KB |
Output is correct |
120 |
Correct |
59 ms |
17988 KB |
Output is correct |
121 |
Correct |
6 ms |
7368 KB |
Output is correct |
122 |
Correct |
6 ms |
7372 KB |
Output is correct |
123 |
Correct |
6 ms |
7368 KB |
Output is correct |
124 |
Correct |
7 ms |
7372 KB |
Output is correct |
125 |
Correct |
7 ms |
7372 KB |
Output is correct |
126 |
Correct |
9 ms |
8268 KB |
Output is correct |
127 |
Correct |
11 ms |
8268 KB |
Output is correct |
128 |
Correct |
9 ms |
8268 KB |
Output is correct |
129 |
Correct |
9 ms |
8336 KB |
Output is correct |
130 |
Correct |
9 ms |
8268 KB |
Output is correct |
131 |
Correct |
9 ms |
8276 KB |
Output is correct |
132 |
Correct |
74 ms |
18920 KB |
Output is correct |
133 |
Correct |
68 ms |
18716 KB |
Output is correct |
134 |
Correct |
66 ms |
18780 KB |
Output is correct |
135 |
Correct |
7 ms |
7624 KB |
Output is correct |
136 |
Correct |
111 ms |
7680 KB |
Output is correct |
137 |
Correct |
63 ms |
7628 KB |
Output is correct |
138 |
Correct |
52 ms |
7636 KB |
Output is correct |
139 |
Correct |
54 ms |
7632 KB |
Output is correct |
140 |
Correct |
39 ms |
7628 KB |
Output is correct |
141 |
Correct |
29 ms |
11852 KB |
Output is correct |
142 |
Correct |
28 ms |
11808 KB |
Output is correct |
143 |
Correct |
34 ms |
12484 KB |
Output is correct |
144 |
Correct |
27 ms |
11720 KB |
Output is correct |
145 |
Correct |
39 ms |
12196 KB |
Output is correct |
146 |
Correct |
30 ms |
10708 KB |
Output is correct |
147 |
Correct |
48 ms |
14488 KB |
Output is correct |
148 |
Correct |
12 ms |
8652 KB |
Output is correct |
149 |
Correct |
51 ms |
15840 KB |
Output is correct |
150 |
Correct |
11 ms |
8524 KB |
Output is correct |
151 |
Correct |
58 ms |
16760 KB |
Output is correct |
152 |
Correct |
15 ms |
9164 KB |
Output is correct |
153 |
Correct |
15 ms |
9424 KB |
Output is correct |
154 |
Correct |
25 ms |
10064 KB |
Output is correct |
155 |
Correct |
20 ms |
9184 KB |
Output is correct |
156 |
Correct |
19 ms |
9332 KB |
Output is correct |
157 |
Correct |
8 ms |
7576 KB |
Output is correct |
158 |
Correct |
153 ms |
7756 KB |
Output is correct |
159 |
Correct |
110 ms |
7764 KB |
Output is correct |
160 |
Correct |
93 ms |
7756 KB |
Output is correct |
161 |
Correct |
82 ms |
7828 KB |
Output is correct |
162 |
Correct |
73 ms |
7864 KB |
Output is correct |
163 |
Correct |
37 ms |
13308 KB |
Output is correct |
164 |
Correct |
36 ms |
13384 KB |
Output is correct |
165 |
Correct |
38 ms |
13296 KB |
Output is correct |
166 |
Correct |
37 ms |
13288 KB |
Output is correct |
167 |
Correct |
39 ms |
13508 KB |
Output is correct |
168 |
Correct |
36 ms |
13380 KB |
Output is correct |
169 |
Correct |
75 ms |
19840 KB |
Output is correct |
170 |
Correct |
17 ms |
9492 KB |
Output is correct |
171 |
Correct |
74 ms |
19716 KB |
Output is correct |
172 |
Correct |
16 ms |
9420 KB |
Output is correct |
173 |
Correct |
71 ms |
19780 KB |
Output is correct |
174 |
Correct |
16 ms |
9420 KB |
Output is correct |
175 |
Correct |
22 ms |
10316 KB |
Output is correct |
176 |
Correct |
21 ms |
10280 KB |
Output is correct |
177 |
Correct |
20 ms |
10188 KB |
Output is correct |
178 |
Correct |
19 ms |
10060 KB |
Output is correct |
179 |
Correct |
14 ms |
8268 KB |
Output is correct |
180 |
Correct |
303 ms |
8204 KB |
Output is correct |
181 |
Correct |
337 ms |
8524 KB |
Output is correct |
182 |
Correct |
425 ms |
8908 KB |
Output is correct |
183 |
Correct |
217 ms |
8516 KB |
Output is correct |
184 |
Correct |
179 ms |
8432 KB |
Output is correct |
185 |
Correct |
58 ms |
16708 KB |
Output is correct |
186 |
Correct |
46 ms |
16488 KB |
Output is correct |
187 |
Correct |
66 ms |
18416 KB |
Output is correct |
188 |
Correct |
62 ms |
16992 KB |
Output is correct |
189 |
Correct |
60 ms |
16196 KB |
Output is correct |
190 |
Correct |
80 ms |
18884 KB |
Output is correct |
191 |
Correct |
54 ms |
16700 KB |
Output is correct |
192 |
Correct |
52 ms |
15696 KB |
Output is correct |
193 |
Correct |
43 ms |
13892 KB |
Output is correct |
194 |
Correct |
19 ms |
8728 KB |
Output is correct |
195 |
Correct |
742 ms |
9136 KB |
Output is correct |
196 |
Correct |
533 ms |
8908 KB |
Output is correct |
197 |
Correct |
436 ms |
8952 KB |
Output is correct |
198 |
Correct |
386 ms |
8988 KB |
Output is correct |
199 |
Correct |
347 ms |
8908 KB |
Output is correct |
200 |
Correct |
116 ms |
29376 KB |
Output is correct |
201 |
Correct |
118 ms |
29424 KB |
Output is correct |
202 |
Correct |
113 ms |
29344 KB |
Output is correct |
203 |
Correct |
107 ms |
29376 KB |
Output is correct |
204 |
Correct |
113 ms |
29380 KB |
Output is correct |
205 |
Correct |
113 ms |
29364 KB |
Output is correct |
206 |
Correct |
101 ms |
26280 KB |
Output is correct |
207 |
Correct |
77 ms |
22980 KB |
Output is correct |
208 |
Correct |
98 ms |
26092 KB |
Output is correct |
209 |
Correct |
78 ms |
22972 KB |
Output is correct |
210 |
Correct |
103 ms |
26180 KB |
Output is correct |
211 |
Correct |
80 ms |
22864 KB |
Output is correct |
212 |
Correct |
92 ms |
26704 KB |
Output is correct |
213 |
Correct |
93 ms |
23364 KB |
Output is correct |
214 |
Correct |
92 ms |
22884 KB |
Output is correct |
215 |
Correct |
98 ms |
23236 KB |
Output is correct |