답안 #1088799

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1088799 2024-09-15T06:12:10 Z modwwe 벽 칠하기 (APIO20_paint) C++17
100 / 100
424 ms 287624 KB
#pragma GCC optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>
//#define int long long
//#define ll long long
#define down cout<<'\n';
#define debug cout<<" cucuucucuuu",down
#define NHP     ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);
#define modwwe  int t;cin>>t; while(t--)
#define bit(i,j) (i>>j&1)
#define sobit(a) __builtin_popcountll(a)
#define task "test"
#define fin(x) freopen(x".inp","r",stdin)
#define fou(x) freopen(x".ans","w",stdout)
#define pb push_back
#define checktime   cerr << (double)clock() / CLOCKS_PER_SEC * 1000  << " ms";
using namespace std;
#define getchar_unlocked getchar

inline int scan()
{
    char c = getchar_unlocked();
    int x = 0;
    while(c<'0'||c>'9')
    {
        c=getchar_unlocked();
    }
    while(c>='0'&&c<='9')
    {
        x=(x<<1)+(x<<3)+c-'0';
        c=getchar_unlocked();
    }
    return x;
}

void phongbeo();
const int inf=1e9;
const int mod2=1e9+9;
const int  mod1=998244353;
struct icd
{
    long double a;
    int b;
};
struct ib
{
    int a;
    int b;
};
struct ic
{
    int a,b,c;
};
struct id
{
    int a,b,c,d;
};
struct ie
{
    int a,b,c,d,e;

};

int n,m,s1,s2,s4,s3,sf,k,s5,s6,mx,s7,s8,s9,mx2,res,dem2=0,dem=0,s33,dem3,dem4,l,r,mid,l2,r2,center;
int  i,s10,s12;
int kk;
int el=29;

vector<int> v[100001];
int dp[100001][701];
int a[100001];
bool b[100001];
int c[100001];
vector<int> v2;
int minimumInstructions(int _n, int _m, int _K, vector<int> _C, vector<int> _A, vector<vector<int>> _B)
{
    n=_n;
    m=_m;
    k=_K;
    for(int i=1; i<=n; i++)
        a[i]=_C[i-1];
    for(int j=1; j<=m; j++)
    {
        l=_A[j-1];
        for(int i=1; i<=l; i++)
        {
            r=_B[j-1][i-1];
            v[r].pb(j);
        }
    }
    for(int i=1; i<=n; i++)
    {
        l=0;
        dem=0;
 if(v[a[i]].size()==0){return -1; }
        for(auto x:v[a[i]])
        {
            dp[i][dem]=i;
            if(i!=1)
            {
                s10=v[a[i-1]].size();
                while(l<s10&&v[a[i-1]][l]<x)
                {
                    l++;
                }
                if(l>=1)
                    if(v[a[i-1]][l-1]==x-1)
                        dp[i][dem]=min(dp[i][dem],dp[i-1][l-1]);
                s8=v[a[i-1]].size()-1;
                if(x==1&&v[a[i-1]].back()==m)dp[i][dem]=min(dp[i][dem],dp[i-1][s8]);
            }
            if(dp[i][dem]<=i-m+1)
                b[i-m+1]=1;
            dem++;
        }

    }
    s5=-m;
    s4=0;
    for(int i=1; i<=n; i++)
    {
        c[i]+=c[i-1];
        if(b[i])s5=i;
        if(c[i]==0&&s5+m<=i)
        {
            return -1;
        }
        else if(c[i]==0) s4++,c[i]=1,c[s5+m]--;
    }
    return s4;
}
/*
main()
{
cout<<minimumInstructions(8, 3, 5, {3, 3, 1, 3, 4, 4, 2, 2}, {3, 2, 2}, {{0, 1, 2}, {2, 3}, {3, 4}});
}*/
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 2 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2648 KB Output is correct
7 Correct 2 ms 3932 KB Output is correct
8 Correct 2 ms 4188 KB Output is correct
9 Correct 2 ms 4188 KB Output is correct
10 Correct 2 ms 4184 KB Output is correct
11 Correct 2 ms 4188 KB Output is correct
12 Correct 2 ms 3932 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 4188 KB Output is correct
15 Correct 2 ms 4188 KB Output is correct
16 Correct 2 ms 4188 KB Output is correct
17 Correct 2 ms 4188 KB Output is correct
18 Correct 2 ms 4184 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 15 ms 7996 KB Output is correct
23 Correct 13 ms 8028 KB Output is correct
24 Correct 13 ms 8028 KB Output is correct
25 Correct 22 ms 57948 KB Output is correct
26 Correct 22 ms 57892 KB Output is correct
27 Correct 24 ms 57872 KB Output is correct
28 Correct 20 ms 57692 KB Output is correct
29 Correct 20 ms 57692 KB Output is correct
30 Correct 19 ms 57868 KB Output is correct
31 Correct 27 ms 58852 KB Output is correct
32 Correct 36 ms 58780 KB Output is correct
33 Correct 25 ms 58904 KB Output is correct
34 Correct 24 ms 58704 KB Output is correct
35 Correct 36 ms 58708 KB Output is correct
36 Correct 27 ms 58712 KB Output is correct
37 Correct 38 ms 61780 KB Output is correct
38 Correct 41 ms 61780 KB Output is correct
39 Correct 35 ms 61788 KB Output is correct
40 Correct 98 ms 253240 KB Output is correct
41 Correct 53 ms 159348 KB Output is correct
42 Correct 95 ms 274004 KB Output is correct
43 Correct 68 ms 182864 KB Output is correct
44 Correct 53 ms 166468 KB Output is correct
45 Correct 97 ms 277724 KB Output is correct
46 Correct 105 ms 249120 KB Output is correct
47 Correct 68 ms 160336 KB Output is correct
48 Correct 72 ms 163156 KB Output is correct
49 Correct 79 ms 176908 KB Output is correct
50 Correct 104 ms 202088 KB Output is correct
51 Correct 89 ms 210496 KB Output is correct
52 Correct 105 ms 278632 KB Output is correct
53 Correct 113 ms 278608 KB Output is correct
54 Correct 94 ms 278352 KB Output is correct
55 Correct 99 ms 278400 KB Output is correct
56 Correct 99 ms 278352 KB Output is correct
57 Correct 98 ms 278240 KB Output is correct
58 Correct 152 ms 287540 KB Output is correct
59 Correct 132 ms 287572 KB Output is correct
60 Correct 123 ms 287572 KB Output is correct
61 Correct 118 ms 287568 KB Output is correct
62 Correct 121 ms 287572 KB Output is correct
63 Correct 121 ms 287568 KB Output is correct
64 Correct 151 ms 286324 KB Output is correct
65 Correct 115 ms 286504 KB Output is correct
66 Correct 116 ms 286292 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 2652 KB Output is correct
2 Correct 2 ms 2652 KB Output is correct
3 Correct 1 ms 2652 KB Output is correct
4 Correct 1 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2648 KB Output is correct
7 Correct 2 ms 3932 KB Output is correct
8 Correct 2 ms 4188 KB Output is correct
9 Correct 2 ms 4188 KB Output is correct
10 Correct 2 ms 4184 KB Output is correct
11 Correct 2 ms 4188 KB Output is correct
12 Correct 2 ms 3932 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 4188 KB Output is correct
15 Correct 2 ms 4188 KB Output is correct
16 Correct 2 ms 4188 KB Output is correct
17 Correct 2 ms 4188 KB Output is correct
18 Correct 2 ms 4184 KB Output is correct
19 Correct 2 ms 2652 KB Output is correct
20 Correct 2 ms 2652 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 1 ms 2648 KB Output is correct
23 Correct 1 ms 2648 KB Output is correct
24 Correct 2 ms 2652 KB Output is correct
25 Correct 2 ms 2652 KB Output is correct
26 Correct 1 ms 2652 KB Output is correct
27 Correct 2 ms 3420 KB Output is correct
28 Correct 2 ms 3676 KB Output is correct
29 Correct 1 ms 3520 KB Output is correct
30 Correct 3 ms 3676 KB Output is correct
31 Correct 2 ms 3932 KB Output is correct
32 Correct 2 ms 3672 KB Output is correct
33 Correct 2 ms 3932 KB Output is correct
34 Correct 2 ms 3932 KB Output is correct
35 Correct 2 ms 3420 KB Output is correct
36 Correct 2 ms 3676 KB Output is correct
37 Correct 2 ms 3676 KB Output is correct
38 Correct 1 ms 2652 KB Output is correct
39 Correct 2 ms 3420 KB Output is correct
40 Correct 3 ms 2904 KB Output is correct
41 Correct 2 ms 3676 KB Output is correct
42 Correct 3 ms 2652 KB Output is correct
43 Correct 2 ms 3676 KB Output is correct
44 Correct 2 ms 4188 KB Output is correct
45 Correct 2 ms 4188 KB Output is correct
46 Correct 3 ms 3932 KB Output is correct
47 Correct 2 ms 4188 KB Output is correct
48 Correct 2 ms 4188 KB Output is correct
49 Correct 2 ms 4188 KB Output is correct
50 Correct 2 ms 4048 KB Output is correct
51 Correct 2 ms 4188 KB Output is correct
52 Correct 2 ms 4188 KB Output is correct
53 Correct 2 ms 4188 KB Output is correct
54 Correct 3 ms 4188 KB Output is correct
55 Correct 3 ms 4188 KB Output is correct
56 Correct 2 ms 2652 KB Output is correct
57 Correct 2 ms 4188 KB Output is correct
58 Correct 2 ms 2652 KB Output is correct
59 Correct 2 ms 4188 KB Output is correct
60 Correct 2 ms 2652 KB Output is correct
61 Correct 2 ms 4188 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2648 KB Output is correct
3 Correct 2 ms 2652 KB Output is correct
4 Correct 2 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2648 KB Output is correct
9 Correct 2 ms 3932 KB Output is correct
10 Correct 2 ms 4188 KB Output is correct
11 Correct 2 ms 4188 KB Output is correct
12 Correct 2 ms 4184 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 3932 KB Output is correct
15 Correct 2 ms 4188 KB Output is correct
16 Correct 2 ms 4188 KB Output is correct
17 Correct 2 ms 4188 KB Output is correct
18 Correct 2 ms 4188 KB Output is correct
19 Correct 2 ms 4188 KB Output is correct
20 Correct 2 ms 4184 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 15 ms 7996 KB Output is correct
25 Correct 13 ms 8028 KB Output is correct
26 Correct 13 ms 8028 KB Output is correct
27 Correct 2 ms 2652 KB Output is correct
28 Correct 2 ms 2652 KB Output is correct
29 Correct 1 ms 2652 KB Output is correct
30 Correct 2 ms 3420 KB Output is correct
31 Correct 2 ms 3676 KB Output is correct
32 Correct 1 ms 3520 KB Output is correct
33 Correct 3 ms 3676 KB Output is correct
34 Correct 2 ms 3932 KB Output is correct
35 Correct 2 ms 3672 KB Output is correct
36 Correct 2 ms 3932 KB Output is correct
37 Correct 2 ms 3932 KB Output is correct
38 Correct 2 ms 3420 KB Output is correct
39 Correct 2 ms 3676 KB Output is correct
40 Correct 2 ms 3676 KB Output is correct
41 Correct 1 ms 2652 KB Output is correct
42 Correct 2 ms 3420 KB Output is correct
43 Correct 3 ms 2904 KB Output is correct
44 Correct 2 ms 3676 KB Output is correct
45 Correct 3 ms 2652 KB Output is correct
46 Correct 2 ms 3676 KB Output is correct
47 Correct 2 ms 4188 KB Output is correct
48 Correct 2 ms 4188 KB Output is correct
49 Correct 3 ms 3932 KB Output is correct
50 Correct 2 ms 4188 KB Output is correct
51 Correct 2 ms 4188 KB Output is correct
52 Correct 2 ms 4188 KB Output is correct
53 Correct 2 ms 4048 KB Output is correct
54 Correct 2 ms 4188 KB Output is correct
55 Correct 2 ms 4188 KB Output is correct
56 Correct 2 ms 4188 KB Output is correct
57 Correct 3 ms 4188 KB Output is correct
58 Correct 3 ms 4188 KB Output is correct
59 Correct 2 ms 2652 KB Output is correct
60 Correct 2 ms 4188 KB Output is correct
61 Correct 2 ms 2652 KB Output is correct
62 Correct 2 ms 4188 KB Output is correct
63 Correct 2 ms 2652 KB Output is correct
64 Correct 2 ms 4188 KB Output is correct
65 Correct 3 ms 3500 KB Output is correct
66 Correct 2 ms 3932 KB Output is correct
67 Correct 2 ms 3932 KB Output is correct
68 Correct 2 ms 4040 KB Output is correct
69 Correct 2 ms 3932 KB Output is correct
70 Correct 3 ms 3932 KB Output is correct
71 Correct 3 ms 3932 KB Output is correct
72 Correct 3 ms 3932 KB Output is correct
73 Correct 4 ms 3932 KB Output is correct
74 Correct 3 ms 3676 KB Output is correct
75 Correct 3 ms 3676 KB Output is correct
76 Correct 14 ms 5468 KB Output is correct
77 Correct 13 ms 5724 KB Output is correct
78 Correct 18 ms 6236 KB Output is correct
79 Correct 2 ms 4188 KB Output is correct
80 Correct 4 ms 4212 KB Output is correct
81 Correct 2 ms 4188 KB Output is correct
82 Correct 4 ms 4188 KB Output is correct
83 Correct 2 ms 4188 KB Output is correct
84 Correct 3 ms 4188 KB Output is correct
85 Correct 3 ms 4188 KB Output is correct
86 Correct 3 ms 4188 KB Output is correct
87 Correct 3 ms 4196 KB Output is correct
88 Correct 6 ms 4196 KB Output is correct
89 Correct 3 ms 4196 KB Output is correct
90 Correct 18 ms 6500 KB Output is correct
91 Correct 19 ms 6500 KB Output is correct
92 Correct 22 ms 6476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2648 KB Output is correct
3 Correct 2 ms 2652 KB Output is correct
4 Correct 2 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2648 KB Output is correct
9 Correct 2 ms 3932 KB Output is correct
10 Correct 2 ms 4188 KB Output is correct
11 Correct 2 ms 4188 KB Output is correct
12 Correct 2 ms 4184 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 3932 KB Output is correct
15 Correct 2 ms 4188 KB Output is correct
16 Correct 2 ms 4188 KB Output is correct
17 Correct 2 ms 4188 KB Output is correct
18 Correct 2 ms 4188 KB Output is correct
19 Correct 2 ms 4188 KB Output is correct
20 Correct 2 ms 4184 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 15 ms 7996 KB Output is correct
25 Correct 13 ms 8028 KB Output is correct
26 Correct 13 ms 8028 KB Output is correct
27 Correct 22 ms 57948 KB Output is correct
28 Correct 22 ms 57892 KB Output is correct
29 Correct 24 ms 57872 KB Output is correct
30 Correct 20 ms 57692 KB Output is correct
31 Correct 20 ms 57692 KB Output is correct
32 Correct 19 ms 57868 KB Output is correct
33 Correct 27 ms 58852 KB Output is correct
34 Correct 36 ms 58780 KB Output is correct
35 Correct 25 ms 58904 KB Output is correct
36 Correct 24 ms 58704 KB Output is correct
37 Correct 36 ms 58708 KB Output is correct
38 Correct 27 ms 58712 KB Output is correct
39 Correct 38 ms 61780 KB Output is correct
40 Correct 41 ms 61780 KB Output is correct
41 Correct 35 ms 61788 KB Output is correct
42 Correct 2 ms 2652 KB Output is correct
43 Correct 2 ms 2652 KB Output is correct
44 Correct 1 ms 2652 KB Output is correct
45 Correct 2 ms 3420 KB Output is correct
46 Correct 2 ms 3676 KB Output is correct
47 Correct 1 ms 3520 KB Output is correct
48 Correct 3 ms 3676 KB Output is correct
49 Correct 2 ms 3932 KB Output is correct
50 Correct 2 ms 3672 KB Output is correct
51 Correct 2 ms 3932 KB Output is correct
52 Correct 2 ms 3932 KB Output is correct
53 Correct 2 ms 3420 KB Output is correct
54 Correct 2 ms 3676 KB Output is correct
55 Correct 2 ms 3676 KB Output is correct
56 Correct 1 ms 2652 KB Output is correct
57 Correct 2 ms 3420 KB Output is correct
58 Correct 3 ms 2904 KB Output is correct
59 Correct 2 ms 3676 KB Output is correct
60 Correct 3 ms 2652 KB Output is correct
61 Correct 2 ms 3676 KB Output is correct
62 Correct 2 ms 4188 KB Output is correct
63 Correct 2 ms 4188 KB Output is correct
64 Correct 3 ms 3932 KB Output is correct
65 Correct 2 ms 4188 KB Output is correct
66 Correct 2 ms 4188 KB Output is correct
67 Correct 2 ms 4188 KB Output is correct
68 Correct 2 ms 4048 KB Output is correct
69 Correct 2 ms 4188 KB Output is correct
70 Correct 2 ms 4188 KB Output is correct
71 Correct 2 ms 4188 KB Output is correct
72 Correct 3 ms 4188 KB Output is correct
73 Correct 3 ms 4188 KB Output is correct
74 Correct 2 ms 2652 KB Output is correct
75 Correct 2 ms 4188 KB Output is correct
76 Correct 2 ms 2652 KB Output is correct
77 Correct 2 ms 4188 KB Output is correct
78 Correct 2 ms 2652 KB Output is correct
79 Correct 2 ms 4188 KB Output is correct
80 Correct 3 ms 3500 KB Output is correct
81 Correct 2 ms 3932 KB Output is correct
82 Correct 2 ms 3932 KB Output is correct
83 Correct 2 ms 4040 KB Output is correct
84 Correct 2 ms 3932 KB Output is correct
85 Correct 3 ms 3932 KB Output is correct
86 Correct 3 ms 3932 KB Output is correct
87 Correct 3 ms 3932 KB Output is correct
88 Correct 4 ms 3932 KB Output is correct
89 Correct 3 ms 3676 KB Output is correct
90 Correct 3 ms 3676 KB Output is correct
91 Correct 14 ms 5468 KB Output is correct
92 Correct 13 ms 5724 KB Output is correct
93 Correct 18 ms 6236 KB Output is correct
94 Correct 2 ms 4188 KB Output is correct
95 Correct 4 ms 4212 KB Output is correct
96 Correct 2 ms 4188 KB Output is correct
97 Correct 4 ms 4188 KB Output is correct
98 Correct 2 ms 4188 KB Output is correct
99 Correct 3 ms 4188 KB Output is correct
100 Correct 3 ms 4188 KB Output is correct
101 Correct 3 ms 4188 KB Output is correct
102 Correct 3 ms 4196 KB Output is correct
103 Correct 6 ms 4196 KB Output is correct
104 Correct 3 ms 4196 KB Output is correct
105 Correct 18 ms 6500 KB Output is correct
106 Correct 19 ms 6500 KB Output is correct
107 Correct 22 ms 6476 KB Output is correct
108 Correct 19 ms 57444 KB Output is correct
109 Correct 65 ms 42844 KB Output is correct
110 Correct 36 ms 36700 KB Output is correct
111 Correct 29 ms 34384 KB Output is correct
112 Correct 40 ms 45140 KB Output is correct
113 Correct 26 ms 32596 KB Output is correct
114 Correct 18 ms 34464 KB Output is correct
115 Correct 24 ms 31324 KB Output is correct
116 Correct 29 ms 54100 KB Output is correct
117 Correct 20 ms 33804 KB Output is correct
118 Correct 21 ms 38664 KB Output is correct
119 Correct 23 ms 43100 KB Output is correct
120 Correct 22 ms 5192 KB Output is correct
121 Correct 15 ms 35708 KB Output is correct
122 Correct 16 ms 5464 KB Output is correct
123 Correct 21 ms 34648 KB Output is correct
124 Correct 18 ms 5980 KB Output is correct
125 Correct 27 ms 54920 KB Output is correct
126 Correct 24 ms 45980 KB Output is correct
127 Correct 28 ms 54600 KB Output is correct
128 Correct 17 ms 40540 KB Output is correct
129 Correct 19 ms 42072 KB Output is correct
130 Correct 19 ms 57948 KB Output is correct
131 Correct 78 ms 57940 KB Output is correct
132 Correct 66 ms 57804 KB Output is correct
133 Correct 57 ms 57936 KB Output is correct
134 Correct 61 ms 57936 KB Output is correct
135 Correct 74 ms 57864 KB Output is correct
136 Correct 29 ms 59480 KB Output is correct
137 Correct 29 ms 59228 KB Output is correct
138 Correct 31 ms 59304 KB Output is correct
139 Correct 46 ms 59364 KB Output is correct
140 Correct 31 ms 59216 KB Output is correct
141 Correct 45 ms 59216 KB Output is correct
142 Correct 28 ms 6740 KB Output is correct
143 Correct 21 ms 58544 KB Output is correct
144 Correct 22 ms 6752 KB Output is correct
145 Correct 22 ms 58460 KB Output is correct
146 Correct 21 ms 6736 KB Output is correct
147 Correct 22 ms 58456 KB Output is correct
148 Correct 28 ms 58964 KB Output is correct
149 Correct 27 ms 58708 KB Output is correct
150 Correct 23 ms 58712 KB Output is correct
151 Correct 22 ms 58716 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 2648 KB Output is correct
2 Correct 1 ms 2648 KB Output is correct
3 Correct 2 ms 2652 KB Output is correct
4 Correct 2 ms 2652 KB Output is correct
5 Correct 1 ms 2652 KB Output is correct
6 Correct 1 ms 2652 KB Output is correct
7 Correct 1 ms 2652 KB Output is correct
8 Correct 1 ms 2648 KB Output is correct
9 Correct 2 ms 3932 KB Output is correct
10 Correct 2 ms 4188 KB Output is correct
11 Correct 2 ms 4188 KB Output is correct
12 Correct 2 ms 4184 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 3932 KB Output is correct
15 Correct 2 ms 4188 KB Output is correct
16 Correct 2 ms 4188 KB Output is correct
17 Correct 2 ms 4188 KB Output is correct
18 Correct 2 ms 4188 KB Output is correct
19 Correct 2 ms 4188 KB Output is correct
20 Correct 2 ms 4184 KB Output is correct
21 Correct 2 ms 2652 KB Output is correct
22 Correct 2 ms 2652 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 15 ms 7996 KB Output is correct
25 Correct 13 ms 8028 KB Output is correct
26 Correct 13 ms 8028 KB Output is correct
27 Correct 22 ms 57948 KB Output is correct
28 Correct 22 ms 57892 KB Output is correct
29 Correct 24 ms 57872 KB Output is correct
30 Correct 20 ms 57692 KB Output is correct
31 Correct 20 ms 57692 KB Output is correct
32 Correct 19 ms 57868 KB Output is correct
33 Correct 27 ms 58852 KB Output is correct
34 Correct 36 ms 58780 KB Output is correct
35 Correct 25 ms 58904 KB Output is correct
36 Correct 24 ms 58704 KB Output is correct
37 Correct 36 ms 58708 KB Output is correct
38 Correct 27 ms 58712 KB Output is correct
39 Correct 38 ms 61780 KB Output is correct
40 Correct 41 ms 61780 KB Output is correct
41 Correct 35 ms 61788 KB Output is correct
42 Correct 98 ms 253240 KB Output is correct
43 Correct 53 ms 159348 KB Output is correct
44 Correct 95 ms 274004 KB Output is correct
45 Correct 68 ms 182864 KB Output is correct
46 Correct 53 ms 166468 KB Output is correct
47 Correct 97 ms 277724 KB Output is correct
48 Correct 105 ms 249120 KB Output is correct
49 Correct 68 ms 160336 KB Output is correct
50 Correct 72 ms 163156 KB Output is correct
51 Correct 79 ms 176908 KB Output is correct
52 Correct 104 ms 202088 KB Output is correct
53 Correct 89 ms 210496 KB Output is correct
54 Correct 105 ms 278632 KB Output is correct
55 Correct 113 ms 278608 KB Output is correct
56 Correct 94 ms 278352 KB Output is correct
57 Correct 99 ms 278400 KB Output is correct
58 Correct 99 ms 278352 KB Output is correct
59 Correct 98 ms 278240 KB Output is correct
60 Correct 152 ms 287540 KB Output is correct
61 Correct 132 ms 287572 KB Output is correct
62 Correct 123 ms 287572 KB Output is correct
63 Correct 118 ms 287568 KB Output is correct
64 Correct 121 ms 287572 KB Output is correct
65 Correct 121 ms 287568 KB Output is correct
66 Correct 151 ms 286324 KB Output is correct
67 Correct 115 ms 286504 KB Output is correct
68 Correct 116 ms 286292 KB Output is correct
69 Correct 2 ms 2652 KB Output is correct
70 Correct 2 ms 2652 KB Output is correct
71 Correct 1 ms 2652 KB Output is correct
72 Correct 2 ms 3420 KB Output is correct
73 Correct 2 ms 3676 KB Output is correct
74 Correct 1 ms 3520 KB Output is correct
75 Correct 3 ms 3676 KB Output is correct
76 Correct 2 ms 3932 KB Output is correct
77 Correct 2 ms 3672 KB Output is correct
78 Correct 2 ms 3932 KB Output is correct
79 Correct 2 ms 3932 KB Output is correct
80 Correct 2 ms 3420 KB Output is correct
81 Correct 2 ms 3676 KB Output is correct
82 Correct 2 ms 3676 KB Output is correct
83 Correct 1 ms 2652 KB Output is correct
84 Correct 2 ms 3420 KB Output is correct
85 Correct 3 ms 2904 KB Output is correct
86 Correct 2 ms 3676 KB Output is correct
87 Correct 3 ms 2652 KB Output is correct
88 Correct 2 ms 3676 KB Output is correct
89 Correct 2 ms 4188 KB Output is correct
90 Correct 2 ms 4188 KB Output is correct
91 Correct 3 ms 3932 KB Output is correct
92 Correct 2 ms 4188 KB Output is correct
93 Correct 2 ms 4188 KB Output is correct
94 Correct 2 ms 4188 KB Output is correct
95 Correct 2 ms 4048 KB Output is correct
96 Correct 2 ms 4188 KB Output is correct
97 Correct 2 ms 4188 KB Output is correct
98 Correct 2 ms 4188 KB Output is correct
99 Correct 3 ms 4188 KB Output is correct
100 Correct 3 ms 4188 KB Output is correct
101 Correct 2 ms 2652 KB Output is correct
102 Correct 2 ms 4188 KB Output is correct
103 Correct 2 ms 2652 KB Output is correct
104 Correct 2 ms 4188 KB Output is correct
105 Correct 2 ms 2652 KB Output is correct
106 Correct 2 ms 4188 KB Output is correct
107 Correct 3 ms 3500 KB Output is correct
108 Correct 2 ms 3932 KB Output is correct
109 Correct 2 ms 3932 KB Output is correct
110 Correct 2 ms 4040 KB Output is correct
111 Correct 2 ms 3932 KB Output is correct
112 Correct 3 ms 3932 KB Output is correct
113 Correct 3 ms 3932 KB Output is correct
114 Correct 3 ms 3932 KB Output is correct
115 Correct 4 ms 3932 KB Output is correct
116 Correct 3 ms 3676 KB Output is correct
117 Correct 3 ms 3676 KB Output is correct
118 Correct 14 ms 5468 KB Output is correct
119 Correct 13 ms 5724 KB Output is correct
120 Correct 18 ms 6236 KB Output is correct
121 Correct 2 ms 4188 KB Output is correct
122 Correct 4 ms 4212 KB Output is correct
123 Correct 2 ms 4188 KB Output is correct
124 Correct 4 ms 4188 KB Output is correct
125 Correct 2 ms 4188 KB Output is correct
126 Correct 3 ms 4188 KB Output is correct
127 Correct 3 ms 4188 KB Output is correct
128 Correct 3 ms 4188 KB Output is correct
129 Correct 3 ms 4196 KB Output is correct
130 Correct 6 ms 4196 KB Output is correct
131 Correct 3 ms 4196 KB Output is correct
132 Correct 18 ms 6500 KB Output is correct
133 Correct 19 ms 6500 KB Output is correct
134 Correct 22 ms 6476 KB Output is correct
135 Correct 19 ms 57444 KB Output is correct
136 Correct 65 ms 42844 KB Output is correct
137 Correct 36 ms 36700 KB Output is correct
138 Correct 29 ms 34384 KB Output is correct
139 Correct 40 ms 45140 KB Output is correct
140 Correct 26 ms 32596 KB Output is correct
141 Correct 18 ms 34464 KB Output is correct
142 Correct 24 ms 31324 KB Output is correct
143 Correct 29 ms 54100 KB Output is correct
144 Correct 20 ms 33804 KB Output is correct
145 Correct 21 ms 38664 KB Output is correct
146 Correct 23 ms 43100 KB Output is correct
147 Correct 22 ms 5192 KB Output is correct
148 Correct 15 ms 35708 KB Output is correct
149 Correct 16 ms 5464 KB Output is correct
150 Correct 21 ms 34648 KB Output is correct
151 Correct 18 ms 5980 KB Output is correct
152 Correct 27 ms 54920 KB Output is correct
153 Correct 24 ms 45980 KB Output is correct
154 Correct 28 ms 54600 KB Output is correct
155 Correct 17 ms 40540 KB Output is correct
156 Correct 19 ms 42072 KB Output is correct
157 Correct 19 ms 57948 KB Output is correct
158 Correct 78 ms 57940 KB Output is correct
159 Correct 66 ms 57804 KB Output is correct
160 Correct 57 ms 57936 KB Output is correct
161 Correct 61 ms 57936 KB Output is correct
162 Correct 74 ms 57864 KB Output is correct
163 Correct 29 ms 59480 KB Output is correct
164 Correct 29 ms 59228 KB Output is correct
165 Correct 31 ms 59304 KB Output is correct
166 Correct 46 ms 59364 KB Output is correct
167 Correct 31 ms 59216 KB Output is correct
168 Correct 45 ms 59216 KB Output is correct
169 Correct 28 ms 6740 KB Output is correct
170 Correct 21 ms 58544 KB Output is correct
171 Correct 22 ms 6752 KB Output is correct
172 Correct 22 ms 58460 KB Output is correct
173 Correct 21 ms 6736 KB Output is correct
174 Correct 22 ms 58456 KB Output is correct
175 Correct 28 ms 58964 KB Output is correct
176 Correct 27 ms 58708 KB Output is correct
177 Correct 23 ms 58712 KB Output is correct
178 Correct 22 ms 58716 KB Output is correct
179 Correct 55 ms 173904 KB Output is correct
180 Correct 155 ms 146360 KB Output is correct
181 Correct 211 ms 210100 KB Output is correct
182 Correct 262 ms 275796 KB Output is correct
183 Correct 144 ms 182096 KB Output is correct
184 Correct 135 ms 174672 KB Output is correct
185 Correct 66 ms 148092 KB Output is correct
186 Correct 75 ms 182612 KB Output is correct
187 Correct 74 ms 175032 KB Output is correct
188 Correct 19 ms 6488 KB Output is correct
189 Correct 104 ms 248012 KB Output is correct
190 Correct 23 ms 7516 KB Output is correct
191 Correct 86 ms 220628 KB Output is correct
192 Correct 17 ms 5724 KB Output is correct
193 Correct 75 ms 186964 KB Output is correct
194 Correct 106 ms 278608 KB Output is correct
195 Correct 424 ms 278764 KB Output is correct
196 Correct 324 ms 278356 KB Output is correct
197 Correct 302 ms 278420 KB Output is correct
198 Correct 260 ms 278372 KB Output is correct
199 Correct 260 ms 278320 KB Output is correct
200 Correct 138 ms 287524 KB Output is correct
201 Correct 146 ms 287580 KB Output is correct
202 Correct 137 ms 287608 KB Output is correct
203 Correct 146 ms 287624 KB Output is correct
204 Correct 142 ms 287612 KB Output is correct
205 Correct 141 ms 287572 KB Output is correct
206 Correct 36 ms 12116 KB Output is correct
207 Correct 131 ms 286548 KB Output is correct
208 Correct 36 ms 12112 KB Output is correct
209 Correct 133 ms 286548 KB Output is correct
210 Correct 40 ms 12116 KB Output is correct
211 Correct 131 ms 286452 KB Output is correct
212 Correct 136 ms 287572 KB Output is correct
213 Correct 126 ms 284560 KB Output is correct
214 Correct 127 ms 284244 KB Output is correct
215 Correct 164 ms 283992 KB Output is correct