Submission #1088797

# Submission time Handle Problem Language Result Execution time Memory
1088797 2024-09-15T06:11:24 Z BABY_GANGSTER Painting Walls (APIO20_paint) C++14
100 / 100
379 ms 289492 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}});
}*/
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 2 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 2 ms 2652 KB Output is correct
7 Correct 2 ms 4188 KB Output is correct
8 Correct 3 ms 4188 KB Output is correct
9 Correct 2 ms 3932 KB Output is correct
10 Correct 2 ms 4188 KB Output is correct
11 Correct 3 ms 3932 KB Output is correct
12 Correct 2 ms 4188 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 4188 KB Output is correct
15 Correct 3 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 1 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 17 ms 8024 KB Output is correct
23 Correct 18 ms 8028 KB Output is correct
24 Correct 17 ms 8024 KB Output is correct
25 Correct 20 ms 57948 KB Output is correct
26 Correct 20 ms 57792 KB Output is correct
27 Correct 19 ms 57692 KB Output is correct
28 Correct 19 ms 57824 KB Output is correct
29 Correct 18 ms 57692 KB Output is correct
30 Correct 18 ms 57692 KB Output is correct
31 Correct 23 ms 58916 KB Output is correct
32 Correct 24 ms 58692 KB Output is correct
33 Correct 27 ms 58696 KB Output is correct
34 Correct 23 ms 58732 KB Output is correct
35 Correct 22 ms 58772 KB Output is correct
36 Correct 23 ms 58716 KB Output is correct
37 Correct 34 ms 61948 KB Output is correct
38 Correct 34 ms 61744 KB Output is correct
39 Correct 34 ms 61784 KB Output is correct
40 Correct 75 ms 253168 KB Output is correct
41 Correct 48 ms 159396 KB Output is correct
42 Correct 81 ms 273996 KB Output is correct
43 Correct 55 ms 182868 KB Output is correct
44 Correct 51 ms 166484 KB Output is correct
45 Correct 82 ms 277820 KB Output is correct
46 Correct 103 ms 249172 KB Output is correct
47 Correct 62 ms 160504 KB Output is correct
48 Correct 64 ms 163408 KB Output is correct
49 Correct 72 ms 176976 KB Output is correct
50 Correct 91 ms 202064 KB Output is correct
51 Correct 91 ms 210256 KB Output is correct
52 Correct 93 ms 278724 KB Output is correct
53 Correct 89 ms 278608 KB Output is correct
54 Correct 89 ms 278256 KB Output is correct
55 Correct 91 ms 278352 KB Output is correct
56 Correct 87 ms 278356 KB Output is correct
57 Correct 92 ms 278356 KB Output is correct
58 Correct 123 ms 287572 KB Output is correct
59 Correct 123 ms 287572 KB Output is correct
60 Correct 114 ms 287572 KB Output is correct
61 Correct 122 ms 287720 KB Output is correct
62 Correct 112 ms 287568 KB Output is correct
63 Correct 141 ms 287680 KB Output is correct
64 Correct 130 ms 286544 KB Output is correct
65 Correct 119 ms 286292 KB Output is correct
66 Correct 117 ms 286544 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2652 KB Output is correct
2 Correct 1 ms 2652 KB Output is correct
3 Correct 2 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 2 ms 2652 KB Output is correct
7 Correct 2 ms 4188 KB Output is correct
8 Correct 3 ms 4188 KB Output is correct
9 Correct 2 ms 3932 KB Output is correct
10 Correct 2 ms 4188 KB Output is correct
11 Correct 3 ms 3932 KB Output is correct
12 Correct 2 ms 4188 KB Output is correct
13 Correct 2 ms 4188 KB Output is correct
14 Correct 2 ms 4188 KB Output is correct
15 Correct 3 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 1 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 2 ms 2648 KB Output is correct
23 Correct 2 ms 2652 KB Output is correct
24 Correct 2 ms 2652 KB Output is correct
25 Correct 2 ms 2652 KB Output is correct
26 Correct 2 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 2 ms 3416 KB Output is correct
30 Correct 3 ms 3672 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 1 ms 3676 KB Output is correct
38 Correct 2 ms 2652 KB Output is correct
39 Correct 2 ms 3420 KB Output is correct
40 Correct 2 ms 2652 KB Output is correct
41 Correct 2 ms 3672 KB Output is correct
42 Correct 1 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 2 ms 4020 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 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 4188 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 2652 KB Output is correct
57 Correct 2 ms 4188 KB Output is correct
58 Correct 2 ms 2648 KB Output is correct
59 Correct 4 ms 4184 KB Output is correct
60 Correct 2 ms 2652 KB Output is correct
61 Correct 2 ms 4156 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2648 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 2 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 2 ms 2652 KB Output is correct
9 Correct 2 ms 4188 KB Output is correct
10 Correct 3 ms 4188 KB Output is correct
11 Correct 2 ms 3932 KB Output is correct
12 Correct 2 ms 4188 KB Output is correct
13 Correct 3 ms 3932 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 3 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 4188 KB Output is correct
21 Correct 1 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 17 ms 8024 KB Output is correct
25 Correct 18 ms 8028 KB Output is correct
26 Correct 17 ms 8024 KB Output is correct
27 Correct 2 ms 2652 KB Output is correct
28 Correct 2 ms 2652 KB Output is correct
29 Correct 2 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 2 ms 3416 KB Output is correct
33 Correct 3 ms 3672 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 1 ms 3676 KB Output is correct
41 Correct 2 ms 2652 KB Output is correct
42 Correct 2 ms 3420 KB Output is correct
43 Correct 2 ms 2652 KB Output is correct
44 Correct 2 ms 3672 KB Output is correct
45 Correct 1 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 2 ms 4020 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 4188 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 2 ms 4188 KB Output is correct
58 Correct 2 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 2648 KB Output is correct
62 Correct 4 ms 4184 KB Output is correct
63 Correct 2 ms 2652 KB Output is correct
64 Correct 2 ms 4156 KB Output is correct
65 Correct 2 ms 3420 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 3932 KB Output is correct
69 Correct 2 ms 3932 KB Output is correct
70 Correct 3 ms 4092 KB Output is correct
71 Correct 3 ms 3932 KB Output is correct
72 Correct 3 ms 3932 KB Output is correct
73 Correct 2 ms 3932 KB Output is correct
74 Correct 2 ms 3676 KB Output is correct
75 Correct 3 ms 3676 KB Output is correct
76 Correct 15 ms 5472 KB Output is correct
77 Correct 13 ms 6408 KB Output is correct
78 Correct 17 ms 7008 KB Output is correct
79 Correct 3 ms 4192 KB Output is correct
80 Correct 3 ms 4192 KB Output is correct
81 Correct 2 ms 4192 KB Output is correct
82 Correct 2 ms 4192 KB Output is correct
83 Correct 3 ms 4192 KB Output is correct
84 Correct 3 ms 4384 KB Output is correct
85 Correct 3 ms 4448 KB Output is correct
86 Correct 3 ms 4452 KB Output is correct
87 Correct 6 ms 4328 KB Output is correct
88 Correct 3 ms 4456 KB Output is correct
89 Correct 3 ms 4456 KB Output is correct
90 Correct 25 ms 7264 KB Output is correct
91 Correct 19 ms 7256 KB Output is correct
92 Correct 23 ms 7512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2648 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 2 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 2 ms 2652 KB Output is correct
9 Correct 2 ms 4188 KB Output is correct
10 Correct 3 ms 4188 KB Output is correct
11 Correct 2 ms 3932 KB Output is correct
12 Correct 2 ms 4188 KB Output is correct
13 Correct 3 ms 3932 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 3 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 4188 KB Output is correct
21 Correct 1 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 17 ms 8024 KB Output is correct
25 Correct 18 ms 8028 KB Output is correct
26 Correct 17 ms 8024 KB Output is correct
27 Correct 20 ms 57948 KB Output is correct
28 Correct 20 ms 57792 KB Output is correct
29 Correct 19 ms 57692 KB Output is correct
30 Correct 19 ms 57824 KB Output is correct
31 Correct 18 ms 57692 KB Output is correct
32 Correct 18 ms 57692 KB Output is correct
33 Correct 23 ms 58916 KB Output is correct
34 Correct 24 ms 58692 KB Output is correct
35 Correct 27 ms 58696 KB Output is correct
36 Correct 23 ms 58732 KB Output is correct
37 Correct 22 ms 58772 KB Output is correct
38 Correct 23 ms 58716 KB Output is correct
39 Correct 34 ms 61948 KB Output is correct
40 Correct 34 ms 61744 KB Output is correct
41 Correct 34 ms 61784 KB Output is correct
42 Correct 2 ms 2652 KB Output is correct
43 Correct 2 ms 2652 KB Output is correct
44 Correct 2 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 2 ms 3416 KB Output is correct
48 Correct 3 ms 3672 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 1 ms 3676 KB Output is correct
56 Correct 2 ms 2652 KB Output is correct
57 Correct 2 ms 3420 KB Output is correct
58 Correct 2 ms 2652 KB Output is correct
59 Correct 2 ms 3672 KB Output is correct
60 Correct 1 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 2 ms 4020 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 4188 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 2 ms 4188 KB Output is correct
73 Correct 2 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 2648 KB Output is correct
77 Correct 4 ms 4184 KB Output is correct
78 Correct 2 ms 2652 KB Output is correct
79 Correct 2 ms 4156 KB Output is correct
80 Correct 2 ms 3420 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 3932 KB Output is correct
84 Correct 2 ms 3932 KB Output is correct
85 Correct 3 ms 4092 KB Output is correct
86 Correct 3 ms 3932 KB Output is correct
87 Correct 3 ms 3932 KB Output is correct
88 Correct 2 ms 3932 KB Output is correct
89 Correct 2 ms 3676 KB Output is correct
90 Correct 3 ms 3676 KB Output is correct
91 Correct 15 ms 5472 KB Output is correct
92 Correct 13 ms 6408 KB Output is correct
93 Correct 17 ms 7008 KB Output is correct
94 Correct 3 ms 4192 KB Output is correct
95 Correct 3 ms 4192 KB Output is correct
96 Correct 2 ms 4192 KB Output is correct
97 Correct 2 ms 4192 KB Output is correct
98 Correct 3 ms 4192 KB Output is correct
99 Correct 3 ms 4384 KB Output is correct
100 Correct 3 ms 4448 KB Output is correct
101 Correct 3 ms 4452 KB Output is correct
102 Correct 6 ms 4328 KB Output is correct
103 Correct 3 ms 4456 KB Output is correct
104 Correct 3 ms 4456 KB Output is correct
105 Correct 25 ms 7264 KB Output is correct
106 Correct 19 ms 7256 KB Output is correct
107 Correct 23 ms 7512 KB Output is correct
108 Correct 21 ms 57692 KB Output is correct
109 Correct 56 ms 42836 KB Output is correct
110 Correct 39 ms 36748 KB Output is correct
111 Correct 33 ms 34648 KB Output is correct
112 Correct 42 ms 45080 KB Output is correct
113 Correct 30 ms 32596 KB Output is correct
114 Correct 19 ms 34896 KB Output is correct
115 Correct 25 ms 31732 KB Output is correct
116 Correct 33 ms 54608 KB Output is correct
117 Correct 20 ms 34132 KB Output is correct
118 Correct 23 ms 39004 KB Output is correct
119 Correct 21 ms 43352 KB Output is correct
120 Correct 13 ms 5720 KB Output is correct
121 Correct 16 ms 35928 KB Output is correct
122 Correct 15 ms 6232 KB Output is correct
123 Correct 13 ms 34880 KB Output is correct
124 Correct 22 ms 6656 KB Output is correct
125 Correct 22 ms 54876 KB Output is correct
126 Correct 21 ms 46428 KB Output is correct
127 Correct 24 ms 54864 KB Output is correct
128 Correct 18 ms 40796 KB Output is correct
129 Correct 19 ms 42076 KB Output is correct
130 Correct 22 ms 57948 KB Output is correct
131 Correct 85 ms 57888 KB Output is correct
132 Correct 69 ms 57940 KB Output is correct
133 Correct 56 ms 57936 KB Output is correct
134 Correct 52 ms 57908 KB Output is correct
135 Correct 59 ms 57940 KB Output is correct
136 Correct 32 ms 59932 KB Output is correct
137 Correct 31 ms 59984 KB Output is correct
138 Correct 29 ms 59788 KB Output is correct
139 Correct 30 ms 59984 KB Output is correct
140 Correct 30 ms 59996 KB Output is correct
141 Correct 28 ms 59928 KB Output is correct
142 Correct 24 ms 7760 KB Output is correct
143 Correct 21 ms 58708 KB Output is correct
144 Correct 22 ms 7836 KB Output is correct
145 Correct 24 ms 58716 KB Output is correct
146 Correct 23 ms 7740 KB Output is correct
147 Correct 21 ms 58704 KB Output is correct
148 Correct 23 ms 59228 KB Output is correct
149 Correct 30 ms 59212 KB Output is correct
150 Correct 29 ms 59032 KB Output is correct
151 Correct 29 ms 58968 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 2648 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 2 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 2 ms 2652 KB Output is correct
9 Correct 2 ms 4188 KB Output is correct
10 Correct 3 ms 4188 KB Output is correct
11 Correct 2 ms 3932 KB Output is correct
12 Correct 2 ms 4188 KB Output is correct
13 Correct 3 ms 3932 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 3 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 4188 KB Output is correct
21 Correct 1 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 17 ms 8024 KB Output is correct
25 Correct 18 ms 8028 KB Output is correct
26 Correct 17 ms 8024 KB Output is correct
27 Correct 20 ms 57948 KB Output is correct
28 Correct 20 ms 57792 KB Output is correct
29 Correct 19 ms 57692 KB Output is correct
30 Correct 19 ms 57824 KB Output is correct
31 Correct 18 ms 57692 KB Output is correct
32 Correct 18 ms 57692 KB Output is correct
33 Correct 23 ms 58916 KB Output is correct
34 Correct 24 ms 58692 KB Output is correct
35 Correct 27 ms 58696 KB Output is correct
36 Correct 23 ms 58732 KB Output is correct
37 Correct 22 ms 58772 KB Output is correct
38 Correct 23 ms 58716 KB Output is correct
39 Correct 34 ms 61948 KB Output is correct
40 Correct 34 ms 61744 KB Output is correct
41 Correct 34 ms 61784 KB Output is correct
42 Correct 75 ms 253168 KB Output is correct
43 Correct 48 ms 159396 KB Output is correct
44 Correct 81 ms 273996 KB Output is correct
45 Correct 55 ms 182868 KB Output is correct
46 Correct 51 ms 166484 KB Output is correct
47 Correct 82 ms 277820 KB Output is correct
48 Correct 103 ms 249172 KB Output is correct
49 Correct 62 ms 160504 KB Output is correct
50 Correct 64 ms 163408 KB Output is correct
51 Correct 72 ms 176976 KB Output is correct
52 Correct 91 ms 202064 KB Output is correct
53 Correct 91 ms 210256 KB Output is correct
54 Correct 93 ms 278724 KB Output is correct
55 Correct 89 ms 278608 KB Output is correct
56 Correct 89 ms 278256 KB Output is correct
57 Correct 91 ms 278352 KB Output is correct
58 Correct 87 ms 278356 KB Output is correct
59 Correct 92 ms 278356 KB Output is correct
60 Correct 123 ms 287572 KB Output is correct
61 Correct 123 ms 287572 KB Output is correct
62 Correct 114 ms 287572 KB Output is correct
63 Correct 122 ms 287720 KB Output is correct
64 Correct 112 ms 287568 KB Output is correct
65 Correct 141 ms 287680 KB Output is correct
66 Correct 130 ms 286544 KB Output is correct
67 Correct 119 ms 286292 KB Output is correct
68 Correct 117 ms 286544 KB Output is correct
69 Correct 2 ms 2652 KB Output is correct
70 Correct 2 ms 2652 KB Output is correct
71 Correct 2 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 2 ms 3416 KB Output is correct
75 Correct 3 ms 3672 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 1 ms 3676 KB Output is correct
83 Correct 2 ms 2652 KB Output is correct
84 Correct 2 ms 3420 KB Output is correct
85 Correct 2 ms 2652 KB Output is correct
86 Correct 2 ms 3672 KB Output is correct
87 Correct 1 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 2 ms 4020 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 4188 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 2 ms 4188 KB Output is correct
100 Correct 2 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 2648 KB Output is correct
104 Correct 4 ms 4184 KB Output is correct
105 Correct 2 ms 2652 KB Output is correct
106 Correct 2 ms 4156 KB Output is correct
107 Correct 2 ms 3420 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 3932 KB Output is correct
111 Correct 2 ms 3932 KB Output is correct
112 Correct 3 ms 4092 KB Output is correct
113 Correct 3 ms 3932 KB Output is correct
114 Correct 3 ms 3932 KB Output is correct
115 Correct 2 ms 3932 KB Output is correct
116 Correct 2 ms 3676 KB Output is correct
117 Correct 3 ms 3676 KB Output is correct
118 Correct 15 ms 5472 KB Output is correct
119 Correct 13 ms 6408 KB Output is correct
120 Correct 17 ms 7008 KB Output is correct
121 Correct 3 ms 4192 KB Output is correct
122 Correct 3 ms 4192 KB Output is correct
123 Correct 2 ms 4192 KB Output is correct
124 Correct 2 ms 4192 KB Output is correct
125 Correct 3 ms 4192 KB Output is correct
126 Correct 3 ms 4384 KB Output is correct
127 Correct 3 ms 4448 KB Output is correct
128 Correct 3 ms 4452 KB Output is correct
129 Correct 6 ms 4328 KB Output is correct
130 Correct 3 ms 4456 KB Output is correct
131 Correct 3 ms 4456 KB Output is correct
132 Correct 25 ms 7264 KB Output is correct
133 Correct 19 ms 7256 KB Output is correct
134 Correct 23 ms 7512 KB Output is correct
135 Correct 21 ms 57692 KB Output is correct
136 Correct 56 ms 42836 KB Output is correct
137 Correct 39 ms 36748 KB Output is correct
138 Correct 33 ms 34648 KB Output is correct
139 Correct 42 ms 45080 KB Output is correct
140 Correct 30 ms 32596 KB Output is correct
141 Correct 19 ms 34896 KB Output is correct
142 Correct 25 ms 31732 KB Output is correct
143 Correct 33 ms 54608 KB Output is correct
144 Correct 20 ms 34132 KB Output is correct
145 Correct 23 ms 39004 KB Output is correct
146 Correct 21 ms 43352 KB Output is correct
147 Correct 13 ms 5720 KB Output is correct
148 Correct 16 ms 35928 KB Output is correct
149 Correct 15 ms 6232 KB Output is correct
150 Correct 13 ms 34880 KB Output is correct
151 Correct 22 ms 6656 KB Output is correct
152 Correct 22 ms 54876 KB Output is correct
153 Correct 21 ms 46428 KB Output is correct
154 Correct 24 ms 54864 KB Output is correct
155 Correct 18 ms 40796 KB Output is correct
156 Correct 19 ms 42076 KB Output is correct
157 Correct 22 ms 57948 KB Output is correct
158 Correct 85 ms 57888 KB Output is correct
159 Correct 69 ms 57940 KB Output is correct
160 Correct 56 ms 57936 KB Output is correct
161 Correct 52 ms 57908 KB Output is correct
162 Correct 59 ms 57940 KB Output is correct
163 Correct 32 ms 59932 KB Output is correct
164 Correct 31 ms 59984 KB Output is correct
165 Correct 29 ms 59788 KB Output is correct
166 Correct 30 ms 59984 KB Output is correct
167 Correct 30 ms 59996 KB Output is correct
168 Correct 28 ms 59928 KB Output is correct
169 Correct 24 ms 7760 KB Output is correct
170 Correct 21 ms 58708 KB Output is correct
171 Correct 22 ms 7836 KB Output is correct
172 Correct 24 ms 58716 KB Output is correct
173 Correct 23 ms 7740 KB Output is correct
174 Correct 21 ms 58704 KB Output is correct
175 Correct 23 ms 59228 KB Output is correct
176 Correct 30 ms 59212 KB Output is correct
177 Correct 29 ms 59032 KB Output is correct
178 Correct 29 ms 58968 KB Output is correct
179 Correct 53 ms 173908 KB Output is correct
180 Correct 154 ms 146516 KB Output is correct
181 Correct 196 ms 210168 KB Output is correct
182 Correct 262 ms 276052 KB Output is correct
183 Correct 172 ms 182352 KB Output is correct
184 Correct 132 ms 174908 KB Output is correct
185 Correct 72 ms 149140 KB Output is correct
186 Correct 76 ms 183544 KB Output is correct
187 Correct 76 ms 175920 KB Output is correct
188 Correct 21 ms 7484 KB Output is correct
189 Correct 95 ms 248948 KB Output is correct
190 Correct 29 ms 8536 KB Output is correct
191 Correct 87 ms 221524 KB Output is correct
192 Correct 18 ms 6736 KB Output is correct
193 Correct 71 ms 187728 KB Output is correct
194 Correct 93 ms 278812 KB Output is correct
195 Correct 379 ms 279044 KB Output is correct
196 Correct 316 ms 278588 KB Output is correct
197 Correct 301 ms 278424 KB Output is correct
198 Correct 312 ms 278652 KB Output is correct
199 Correct 288 ms 278608 KB Output is correct
200 Correct 139 ms 289364 KB Output is correct
201 Correct 173 ms 289360 KB Output is correct
202 Correct 127 ms 289464 KB Output is correct
203 Correct 129 ms 289492 KB Output is correct
204 Correct 164 ms 289468 KB Output is correct
205 Correct 122 ms 289364 KB Output is correct
206 Correct 43 ms 13652 KB Output is correct
207 Correct 119 ms 287796 KB Output is correct
208 Correct 45 ms 13608 KB Output is correct
209 Correct 119 ms 287776 KB Output is correct
210 Correct 44 ms 13644 KB Output is correct
211 Correct 117 ms 287828 KB Output is correct
212 Correct 124 ms 289204 KB Output is correct
213 Correct 117 ms 286148 KB Output is correct
214 Correct 127 ms 285620 KB Output is correct
215 Correct 120 ms 285676 KB Output is correct