Submission #1052577

# Submission time Handle Problem Language Result Execution time Memory
1052577 2024-08-10T16:42:34 Z user736482 Rainforest Jumps (APIO21_jumps) C++17
37 / 100
4000 ms 36004 KB
#include<bits/stdc++.h>
using namespace std;

int lft[200007],rgt[200007],jmpl[200007][18],jmpg[200007][18];
bool czy1=1;
bool odw[200007];
int n;
vector<int>v;
void init(int N,vector<int>V){
    n=N;
    v=V;
    while(v.size()<200007)
        v.push_back(200006);
    stack<int>s;
    lft[200006]=200006;
    rgt[200006]=200006;
    //s.push(n);
    for(int i=0;i<n;i++){
        lft[i]=200006;
        rgt[i]=200006;
    }
    //return;
    for(int i=0;i<n;i++){
        if(s.empty() || v[s.top()]>v[i])
            s.push(i);
        else{
            rgt[s.top()]=i;
            s.pop();
            i--;
        }
    }
    while(s.size()>0) s.pop();
    for(int i=n-1;i>=0;i--){
        if(s.empty() || v[s.top()]>v[i])
            s.push(i);
        else{
            czy1=0;
            lft[s.top()]=i;
            s.pop();
            i++;
        }
    }
    for(int i=0;i<n;i++){
        int pm=lft[i];
        if(v[lft[i]]>v[rgt[i]]){
            lft[i]=rgt[i];
            rgt[i]=pm;
        }
        jmpg[i][0]=rgt[i];
        jmpl[i][0]=lft[i];
    }
    jmpl[200006][0]=200006;
    jmpg[200006][0]=200006;
    for(int i=1;i<18;i++){
        for(int j=0;j<n;j++){
            jmpl[j][i]=jmpl[jmpl[j][i-1]][i-1];
            jmpg[j][i]=jmpg[jmpg[j][i-1]][i-1];
       //     cout<<jmpg[j][i]<<" ";
        }
        jmpl[200006][i]=200006;
        jmpg[200006][i]=200006;
       // cout<<"\n";
    }
    //for(int i=0;i<n;i++)
    //cout<<lft[i]<<" "<<rgt[i]<<"\n";
}
int minimum_jumps(int a,int b,int c,int d){
    if(czy1)
        return c-b;
    int odp=0;
    if(a==b && c==d){
        int akindex=-1;
        //int odp=0;
        while(v[jmpg[a][akindex+1]]<=v[c])
            akindex++;
        if(akindex>=0){
        odp+=1<<akindex;
        //cout<<akindex<<" a ";
        //return 0;
        //cout<<a<<" ";
        a=jmpg[a][akindex];
        //cout<<a<<" ";
        akindex--;}
        while(akindex>=0){
            if(v[jmpg[a][akindex]]>v[c]){
                akindex--;
                continue;
            }
            odp+=1<<akindex;
            a=jmpg[a][akindex];
            akindex--;
            //cout<<a<<" ";
        }
        akindex=-1;
        while(v[jmpl[a][akindex+1]]<=v[c])
            akindex++;
        if(akindex>=0){
        odp+=1<<akindex;
        //cout<<akindex<<" a ";
        //return 0;
        a=jmpl[a][akindex];
        akindex--;}
        while(akindex>=0){
            if(v[jmpl[a][akindex]]>v[c]){
                akindex--;
                continue;
            }
            odp+=1<<akindex;
            a=jmpl[a][akindex];
            akindex--;
            //cout<<a<<" ";
        }
        if(a!=c)
            odp=-1;
        //return odp;
        a=b;
    }
    odw[200006]=1;
    int ans[n];
    for(int i=0;i<n;i++){ odw[i]=0; ans[i]=200007;}
    for(int i=a;i<=b;i++) odw[i]=1;
    priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>>pq;
    for(int i=a;i<=b;i++){
        pq.push({0,i});
    }
    while(!pq.empty()){
        pair<int,int>pom=pq.top();
        pq.pop();
        ans[pom.second]=pom.first;
        if(!odw[lft[pom.second]]){
            odw[lft[pom.second]]=1;
            pq.push({pom.first+1,lft[pom.second]});
        }
        if(!odw[rgt[pom.second]]){
            odw[rgt[pom.second]]=1;
            pq.push({pom.first+1,rgt[pom.second]});
        }
        //return 0;
    }
    int mn=200007;
    for(int i=c;i<=d;i++){
        mn=min(mn,ans[i]);
    }
    if(mn==200007)
        mn=-1;
    //cout<<ans[11];
    //cout<<mn;
    return mn;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 7372 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 63 ms 32568 KB Output is correct
4 Correct 513 ms 33216 KB Output is correct
5 Correct 467 ms 23244 KB Output is correct
6 Correct 602 ms 33352 KB Output is correct
7 Correct 460 ms 27968 KB Output is correct
8 Correct 555 ms 33400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 7504 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 2 ms 7372 KB Output is correct
5 Correct 2 ms 7308 KB Output is correct
6 Correct 3 ms 7348 KB Output is correct
7 Correct 2 ms 7504 KB Output is correct
8 Correct 3 ms 7348 KB Output is correct
9 Correct 2 ms 7384 KB Output is correct
10 Correct 3 ms 7600 KB Output is correct
11 Correct 2 ms 7348 KB Output is correct
12 Correct 2 ms 7348 KB Output is correct
13 Correct 3 ms 7524 KB Output is correct
14 Correct 2 ms 7348 KB Output is correct
15 Correct 3 ms 7348 KB Output is correct
16 Correct 3 ms 7348 KB Output is correct
17 Correct 2 ms 7348 KB Output is correct
18 Correct 1 ms 7372 KB Output is correct
19 Correct 1 ms 7404 KB Output is correct
20 Correct 3 ms 7348 KB Output is correct
21 Correct 3 ms 7348 KB Output is correct
22 Correct 2 ms 7348 KB Output is correct
23 Correct 3 ms 7348 KB Output is correct
24 Correct 2 ms 7348 KB Output is correct
25 Correct 1 ms 7372 KB Output is correct
26 Correct 1 ms 7372 KB Output is correct
27 Correct 2 ms 7372 KB Output is correct
28 Correct 2 ms 7348 KB Output is correct
29 Correct 3 ms 7348 KB Output is correct
30 Correct 2 ms 7348 KB Output is correct
31 Correct 3 ms 7348 KB Output is correct
32 Correct 3 ms 7348 KB Output is correct
33 Correct 1 ms 7372 KB Output is correct
34 Correct 1 ms 7516 KB Output is correct
35 Correct 1 ms 7348 KB Output is correct
36 Correct 1 ms 7516 KB Output is correct
37 Correct 1 ms 7348 KB Output is correct
38 Correct 2 ms 7348 KB Output is correct
39 Correct 1 ms 7348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 7504 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 2 ms 7372 KB Output is correct
5 Correct 2 ms 7308 KB Output is correct
6 Correct 3 ms 7348 KB Output is correct
7 Correct 2 ms 7504 KB Output is correct
8 Correct 3 ms 7348 KB Output is correct
9 Correct 2 ms 7384 KB Output is correct
10 Correct 3 ms 7600 KB Output is correct
11 Correct 2 ms 7348 KB Output is correct
12 Correct 2 ms 7348 KB Output is correct
13 Correct 3 ms 7524 KB Output is correct
14 Correct 2 ms 7348 KB Output is correct
15 Correct 3 ms 7348 KB Output is correct
16 Correct 3 ms 7348 KB Output is correct
17 Correct 2 ms 7348 KB Output is correct
18 Correct 1 ms 7372 KB Output is correct
19 Correct 1 ms 7404 KB Output is correct
20 Correct 3 ms 7348 KB Output is correct
21 Correct 3 ms 7348 KB Output is correct
22 Correct 2 ms 7348 KB Output is correct
23 Correct 3 ms 7348 KB Output is correct
24 Correct 2 ms 7348 KB Output is correct
25 Correct 1 ms 7372 KB Output is correct
26 Correct 1 ms 7372 KB Output is correct
27 Correct 2 ms 7372 KB Output is correct
28 Correct 2 ms 7348 KB Output is correct
29 Correct 3 ms 7348 KB Output is correct
30 Correct 2 ms 7348 KB Output is correct
31 Correct 3 ms 7348 KB Output is correct
32 Correct 3 ms 7348 KB Output is correct
33 Correct 1 ms 7372 KB Output is correct
34 Correct 1 ms 7516 KB Output is correct
35 Correct 1 ms 7348 KB Output is correct
36 Correct 1 ms 7516 KB Output is correct
37 Correct 1 ms 7348 KB Output is correct
38 Correct 2 ms 7348 KB Output is correct
39 Correct 1 ms 7348 KB Output is correct
40 Correct 2 ms 7504 KB Output is correct
41 Correct 1 ms 7372 KB Output is correct
42 Correct 1 ms 7372 KB Output is correct
43 Correct 2 ms 7372 KB Output is correct
44 Correct 2 ms 7308 KB Output is correct
45 Correct 2 ms 7348 KB Output is correct
46 Correct 2 ms 7504 KB Output is correct
47 Correct 2 ms 7348 KB Output is correct
48 Correct 2 ms 7384 KB Output is correct
49 Correct 2 ms 7348 KB Output is correct
50 Correct 2 ms 7348 KB Output is correct
51 Correct 3 ms 7348 KB Output is correct
52 Correct 2 ms 7348 KB Output is correct
53 Correct 2 ms 7348 KB Output is correct
54 Correct 4 ms 7348 KB Output is correct
55 Correct 3 ms 7348 KB Output is correct
56 Correct 2 ms 7348 KB Output is correct
57 Correct 2 ms 7348 KB Output is correct
58 Correct 34 ms 7300 KB Output is correct
59 Correct 48 ms 7412 KB Output is correct
60 Correct 7 ms 7324 KB Output is correct
61 Correct 45 ms 7536 KB Output is correct
62 Correct 13 ms 7332 KB Output is correct
63 Correct 45 ms 7412 KB Output is correct
64 Correct 9 ms 7412 KB Output is correct
65 Correct 64 ms 7412 KB Output is correct
66 Correct 63 ms 7412 KB Output is correct
67 Correct 43 ms 7412 KB Output is correct
68 Correct 86 ms 7412 KB Output is correct
69 Correct 65 ms 7412 KB Output is correct
70 Correct 71 ms 7412 KB Output is correct
71 Correct 2 ms 7372 KB Output is correct
72 Correct 1 ms 7404 KB Output is correct
73 Correct 2 ms 7348 KB Output is correct
74 Correct 2 ms 7348 KB Output is correct
75 Correct 3 ms 7348 KB Output is correct
76 Correct 3 ms 7348 KB Output is correct
77 Correct 3 ms 7348 KB Output is correct
78 Correct 1 ms 7372 KB Output is correct
79 Correct 1 ms 7372 KB Output is correct
80 Correct 2 ms 7528 KB Output is correct
81 Correct 2 ms 7348 KB Output is correct
82 Correct 2 ms 7348 KB Output is correct
83 Correct 2 ms 7348 KB Output is correct
84 Correct 2 ms 7348 KB Output is correct
85 Correct 2 ms 7348 KB Output is correct
86 Correct 1 ms 7372 KB Output is correct
87 Correct 1 ms 7516 KB Output is correct
88 Correct 1 ms 7348 KB Output is correct
89 Correct 2 ms 7348 KB Output is correct
90 Correct 1 ms 7348 KB Output is correct
91 Correct 1 ms 7348 KB Output is correct
92 Correct 1 ms 7348 KB Output is correct
93 Correct 2 ms 7348 KB Output is correct
94 Correct 4 ms 7452 KB Output is correct
95 Correct 44 ms 7412 KB Output is correct
96 Correct 63 ms 7412 KB Output is correct
97 Correct 43 ms 7412 KB Output is correct
98 Correct 99 ms 7412 KB Output is correct
99 Correct 67 ms 7412 KB Output is correct
100 Correct 2 ms 7348 KB Output is correct
101 Correct 2 ms 7424 KB Output is correct
102 Correct 11 ms 7412 KB Output is correct
103 Correct 30 ms 7412 KB Output is correct
104 Correct 11 ms 7412 KB Output is correct
105 Correct 40 ms 7412 KB Output is correct
106 Correct 37 ms 7412 KB Output is correct
107 Correct 2 ms 7348 KB Output is correct
108 Correct 1 ms 7476 KB Output is correct
109 Correct 1 ms 7412 KB Output is correct
110 Correct 2 ms 7412 KB Output is correct
111 Correct 1 ms 7412 KB Output is correct
112 Correct 2 ms 7412 KB Output is correct
113 Correct 2 ms 7412 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 7504 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 1 ms 7372 KB Output is correct
5 Correct 28 ms 33632 KB Output is correct
6 Correct 50 ms 34096 KB Output is correct
7 Correct 20 ms 22824 KB Output is correct
8 Correct 41 ms 35632 KB Output is correct
9 Correct 7 ms 12180 KB Output is correct
10 Correct 32 ms 33592 KB Output is correct
11 Correct 25 ms 33352 KB Output is correct
12 Correct 57 ms 34608 KB Output is correct
13 Correct 43 ms 34352 KB Output is correct
14 Correct 35 ms 33592 KB Output is correct
15 Correct 54 ms 34472 KB Output is correct
16 Correct 50 ms 35976 KB Output is correct
17 Correct 63 ms 35628 KB Output is correct
18 Correct 1 ms 7372 KB Output is correct
19 Correct 2 ms 7516 KB Output is correct
20 Correct 1 ms 7348 KB Output is correct
21 Correct 1 ms 7348 KB Output is correct
22 Correct 1 ms 7348 KB Output is correct
23 Correct 1 ms 7348 KB Output is correct
24 Correct 1 ms 7348 KB Output is correct
25 Correct 1 ms 7348 KB Output is correct
26 Correct 1 ms 7476 KB Output is correct
27 Correct 2 ms 7412 KB Output is correct
28 Correct 2 ms 7412 KB Output is correct
29 Correct 1 ms 7412 KB Output is correct
30 Correct 2 ms 7412 KB Output is correct
31 Correct 2 ms 7412 KB Output is correct
32 Correct 1 ms 7372 KB Output is correct
33 Correct 31 ms 32680 KB Output is correct
34 Correct 34 ms 34300 KB Output is correct
35 Correct 38 ms 34608 KB Output is correct
36 Correct 32 ms 33080 KB Output is correct
37 Correct 44 ms 33840 KB Output is correct
38 Correct 51 ms 36004 KB Output is correct
39 Correct 2 ms 7372 KB Output is correct
40 Correct 16 ms 23032 KB Output is correct
41 Correct 40 ms 32564 KB Output is correct
42 Correct 29 ms 33328 KB Output is correct
43 Correct 28 ms 32568 KB Output is correct
44 Correct 42 ms 32964 KB Output is correct
45 Correct 31 ms 33352 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 7372 KB Output is correct
2 Correct 2 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 965 ms 22820 KB Output is correct
5 Execution timed out 4011 ms 32568 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 7372 KB Output is correct
2 Correct 2 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 965 ms 22820 KB Output is correct
5 Execution timed out 4011 ms 32568 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 7372 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 63 ms 32568 KB Output is correct
4 Correct 513 ms 33216 KB Output is correct
5 Correct 467 ms 23244 KB Output is correct
6 Correct 602 ms 33352 KB Output is correct
7 Correct 460 ms 27968 KB Output is correct
8 Correct 555 ms 33400 KB Output is correct
9 Correct 1 ms 7504 KB Output is correct
10 Correct 1 ms 7372 KB Output is correct
11 Correct 1 ms 7372 KB Output is correct
12 Correct 2 ms 7372 KB Output is correct
13 Correct 2 ms 7308 KB Output is correct
14 Correct 3 ms 7348 KB Output is correct
15 Correct 2 ms 7504 KB Output is correct
16 Correct 3 ms 7348 KB Output is correct
17 Correct 2 ms 7384 KB Output is correct
18 Correct 3 ms 7600 KB Output is correct
19 Correct 2 ms 7348 KB Output is correct
20 Correct 2 ms 7348 KB Output is correct
21 Correct 3 ms 7524 KB Output is correct
22 Correct 2 ms 7348 KB Output is correct
23 Correct 3 ms 7348 KB Output is correct
24 Correct 3 ms 7348 KB Output is correct
25 Correct 2 ms 7348 KB Output is correct
26 Correct 1 ms 7372 KB Output is correct
27 Correct 1 ms 7404 KB Output is correct
28 Correct 3 ms 7348 KB Output is correct
29 Correct 3 ms 7348 KB Output is correct
30 Correct 2 ms 7348 KB Output is correct
31 Correct 3 ms 7348 KB Output is correct
32 Correct 2 ms 7348 KB Output is correct
33 Correct 1 ms 7372 KB Output is correct
34 Correct 1 ms 7372 KB Output is correct
35 Correct 2 ms 7372 KB Output is correct
36 Correct 2 ms 7348 KB Output is correct
37 Correct 3 ms 7348 KB Output is correct
38 Correct 2 ms 7348 KB Output is correct
39 Correct 3 ms 7348 KB Output is correct
40 Correct 3 ms 7348 KB Output is correct
41 Correct 1 ms 7372 KB Output is correct
42 Correct 1 ms 7516 KB Output is correct
43 Correct 1 ms 7348 KB Output is correct
44 Correct 1 ms 7516 KB Output is correct
45 Correct 1 ms 7348 KB Output is correct
46 Correct 2 ms 7348 KB Output is correct
47 Correct 1 ms 7348 KB Output is correct
48 Correct 2 ms 7504 KB Output is correct
49 Correct 1 ms 7372 KB Output is correct
50 Correct 1 ms 7372 KB Output is correct
51 Correct 2 ms 7372 KB Output is correct
52 Correct 2 ms 7308 KB Output is correct
53 Correct 2 ms 7348 KB Output is correct
54 Correct 2 ms 7504 KB Output is correct
55 Correct 2 ms 7348 KB Output is correct
56 Correct 2 ms 7384 KB Output is correct
57 Correct 2 ms 7348 KB Output is correct
58 Correct 2 ms 7348 KB Output is correct
59 Correct 3 ms 7348 KB Output is correct
60 Correct 2 ms 7348 KB Output is correct
61 Correct 2 ms 7348 KB Output is correct
62 Correct 4 ms 7348 KB Output is correct
63 Correct 3 ms 7348 KB Output is correct
64 Correct 2 ms 7348 KB Output is correct
65 Correct 2 ms 7348 KB Output is correct
66 Correct 34 ms 7300 KB Output is correct
67 Correct 48 ms 7412 KB Output is correct
68 Correct 7 ms 7324 KB Output is correct
69 Correct 45 ms 7536 KB Output is correct
70 Correct 13 ms 7332 KB Output is correct
71 Correct 45 ms 7412 KB Output is correct
72 Correct 9 ms 7412 KB Output is correct
73 Correct 64 ms 7412 KB Output is correct
74 Correct 63 ms 7412 KB Output is correct
75 Correct 43 ms 7412 KB Output is correct
76 Correct 86 ms 7412 KB Output is correct
77 Correct 65 ms 7412 KB Output is correct
78 Correct 71 ms 7412 KB Output is correct
79 Correct 2 ms 7372 KB Output is correct
80 Correct 1 ms 7404 KB Output is correct
81 Correct 2 ms 7348 KB Output is correct
82 Correct 2 ms 7348 KB Output is correct
83 Correct 3 ms 7348 KB Output is correct
84 Correct 3 ms 7348 KB Output is correct
85 Correct 3 ms 7348 KB Output is correct
86 Correct 1 ms 7372 KB Output is correct
87 Correct 1 ms 7372 KB Output is correct
88 Correct 2 ms 7528 KB Output is correct
89 Correct 2 ms 7348 KB Output is correct
90 Correct 2 ms 7348 KB Output is correct
91 Correct 2 ms 7348 KB Output is correct
92 Correct 2 ms 7348 KB Output is correct
93 Correct 2 ms 7348 KB Output is correct
94 Correct 1 ms 7372 KB Output is correct
95 Correct 1 ms 7516 KB Output is correct
96 Correct 1 ms 7348 KB Output is correct
97 Correct 2 ms 7348 KB Output is correct
98 Correct 1 ms 7348 KB Output is correct
99 Correct 1 ms 7348 KB Output is correct
100 Correct 1 ms 7348 KB Output is correct
101 Correct 2 ms 7348 KB Output is correct
102 Correct 4 ms 7452 KB Output is correct
103 Correct 44 ms 7412 KB Output is correct
104 Correct 63 ms 7412 KB Output is correct
105 Correct 43 ms 7412 KB Output is correct
106 Correct 99 ms 7412 KB Output is correct
107 Correct 67 ms 7412 KB Output is correct
108 Correct 2 ms 7348 KB Output is correct
109 Correct 2 ms 7424 KB Output is correct
110 Correct 11 ms 7412 KB Output is correct
111 Correct 30 ms 7412 KB Output is correct
112 Correct 11 ms 7412 KB Output is correct
113 Correct 40 ms 7412 KB Output is correct
114 Correct 37 ms 7412 KB Output is correct
115 Correct 2 ms 7348 KB Output is correct
116 Correct 1 ms 7476 KB Output is correct
117 Correct 1 ms 7412 KB Output is correct
118 Correct 2 ms 7412 KB Output is correct
119 Correct 1 ms 7412 KB Output is correct
120 Correct 2 ms 7412 KB Output is correct
121 Correct 2 ms 7412 KB Output is correct
122 Correct 2 ms 7504 KB Output is correct
123 Correct 1 ms 7372 KB Output is correct
124 Correct 1 ms 7372 KB Output is correct
125 Correct 1 ms 7372 KB Output is correct
126 Correct 28 ms 33632 KB Output is correct
127 Correct 50 ms 34096 KB Output is correct
128 Correct 20 ms 22824 KB Output is correct
129 Correct 41 ms 35632 KB Output is correct
130 Correct 7 ms 12180 KB Output is correct
131 Correct 32 ms 33592 KB Output is correct
132 Correct 25 ms 33352 KB Output is correct
133 Correct 57 ms 34608 KB Output is correct
134 Correct 43 ms 34352 KB Output is correct
135 Correct 35 ms 33592 KB Output is correct
136 Correct 54 ms 34472 KB Output is correct
137 Correct 50 ms 35976 KB Output is correct
138 Correct 63 ms 35628 KB Output is correct
139 Correct 1 ms 7372 KB Output is correct
140 Correct 2 ms 7516 KB Output is correct
141 Correct 1 ms 7348 KB Output is correct
142 Correct 1 ms 7348 KB Output is correct
143 Correct 1 ms 7348 KB Output is correct
144 Correct 1 ms 7348 KB Output is correct
145 Correct 1 ms 7348 KB Output is correct
146 Correct 1 ms 7348 KB Output is correct
147 Correct 1 ms 7476 KB Output is correct
148 Correct 2 ms 7412 KB Output is correct
149 Correct 2 ms 7412 KB Output is correct
150 Correct 1 ms 7412 KB Output is correct
151 Correct 2 ms 7412 KB Output is correct
152 Correct 2 ms 7412 KB Output is correct
153 Correct 1 ms 7372 KB Output is correct
154 Correct 31 ms 32680 KB Output is correct
155 Correct 34 ms 34300 KB Output is correct
156 Correct 38 ms 34608 KB Output is correct
157 Correct 32 ms 33080 KB Output is correct
158 Correct 44 ms 33840 KB Output is correct
159 Correct 51 ms 36004 KB Output is correct
160 Correct 2 ms 7372 KB Output is correct
161 Correct 16 ms 23032 KB Output is correct
162 Correct 40 ms 32564 KB Output is correct
163 Correct 29 ms 33328 KB Output is correct
164 Correct 28 ms 32568 KB Output is correct
165 Correct 42 ms 32964 KB Output is correct
166 Correct 31 ms 33352 KB Output is correct
167 Correct 1 ms 7372 KB Output is correct
168 Correct 2 ms 7372 KB Output is correct
169 Correct 1 ms 7372 KB Output is correct
170 Correct 965 ms 22820 KB Output is correct
171 Execution timed out 4011 ms 32568 KB Time limit exceeded
172 Halted 0 ms 0 KB -