Submission #1052546

# Submission time Handle Problem Language Result Execution time Memory
1052546 2024-08-10T16:00:44 Z user736482 Rainforest Jumps (APIO21_jumps) C++17
37 / 100
4000 ms 35888 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;
    if(a==b && c==d && 0){
        int ak=a;
        int akindex=0;
        int odp=0;
        while(v[jmpg[a][akindex+1]]<=v[c])
            akindex++;
        odp+=1<<akindex;
        //cout<<akindex<<" a ";
        //return 0;
        a=jmpg[a][akindex];
        akindex--;
        while(akindex>=0){
            if(v[jmpg[a][akindex]]>v[c]){
                akindex--;
                continue;
            }
            odp+=1<<akindex;
            a=jmpg[a][akindex];
            akindex--;
            //cout<<a<<" ";
        }
        akindex=0;
        while(v[jmpl[a][akindex+1]]<=v[c])
            akindex++;
        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;
    }
    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];
    return mn;
}

Compilation message

jumps.cpp: In function 'int minimum_jumps(int, int, int, int)':
jumps.cpp:71:13: warning: unused variable 'ak' [-Wunused-variable]
   71 |         int ak=a;
      |             ^~
# 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 76 ms 32572 KB Output is correct
4 Correct 574 ms 33352 KB Output is correct
5 Correct 563 ms 23244 KB Output is correct
6 Correct 541 ms 33352 KB Output is correct
7 Correct 442 ms 27968 KB Output is correct
8 Correct 552 ms 33344 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 1 ms 7372 KB Output is correct
5 Correct 3 ms 7308 KB Output is correct
6 Correct 2 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 1 ms 7384 KB Output is correct
10 Correct 2 ms 7396 KB Output is correct
11 Correct 2 ms 7348 KB Output is correct
12 Correct 3 ms 7348 KB Output is correct
13 Correct 3 ms 7348 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 4 ms 7348 KB Output is correct
18 Correct 1 ms 7372 KB Output is correct
19 Correct 2 ms 7404 KB Output is correct
20 Correct 2 ms 7348 KB Output is correct
21 Correct 2 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 3 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 7520 KB Output is correct
29 Correct 2 ms 7348 KB Output is correct
30 Correct 2 ms 7348 KB Output is correct
31 Correct 2 ms 7348 KB Output is correct
32 Correct 2 ms 7348 KB Output is correct
33 Correct 2 ms 7372 KB Output is correct
34 Correct 2 ms 7516 KB Output is correct
35 Correct 1 ms 7348 KB Output is correct
36 Correct 1 ms 7348 KB Output is correct
37 Correct 1 ms 7348 KB Output is correct
38 Correct 1 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 1 ms 7372 KB Output is correct
5 Correct 3 ms 7308 KB Output is correct
6 Correct 2 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 1 ms 7384 KB Output is correct
10 Correct 2 ms 7396 KB Output is correct
11 Correct 2 ms 7348 KB Output is correct
12 Correct 3 ms 7348 KB Output is correct
13 Correct 3 ms 7348 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 4 ms 7348 KB Output is correct
18 Correct 1 ms 7372 KB Output is correct
19 Correct 2 ms 7404 KB Output is correct
20 Correct 2 ms 7348 KB Output is correct
21 Correct 2 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 3 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 7520 KB Output is correct
29 Correct 2 ms 7348 KB Output is correct
30 Correct 2 ms 7348 KB Output is correct
31 Correct 2 ms 7348 KB Output is correct
32 Correct 2 ms 7348 KB Output is correct
33 Correct 2 ms 7372 KB Output is correct
34 Correct 2 ms 7516 KB Output is correct
35 Correct 1 ms 7348 KB Output is correct
36 Correct 1 ms 7348 KB Output is correct
37 Correct 1 ms 7348 KB Output is correct
38 Correct 1 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 1 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 1 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 3 ms 7348 KB Output is correct
55 Correct 2 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 33 ms 7300 KB Output is correct
59 Correct 57 ms 7412 KB Output is correct
60 Correct 8 ms 7324 KB Output is correct
61 Correct 44 ms 7412 KB Output is correct
62 Correct 9 ms 7332 KB Output is correct
63 Correct 46 ms 7412 KB Output is correct
64 Correct 9 ms 7412 KB Output is correct
65 Correct 70 ms 7412 KB Output is correct
66 Correct 66 ms 7412 KB Output is correct
67 Correct 43 ms 7412 KB Output is correct
68 Correct 88 ms 7412 KB Output is correct
69 Correct 78 ms 7412 KB Output is correct
70 Correct 63 ms 7412 KB Output is correct
71 Correct 1 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 3 ms 7348 KB Output is correct
75 Correct 2 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 7372 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 1 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 1 ms 7348 KB Output is correct
94 Correct 3 ms 7452 KB Output is correct
95 Correct 44 ms 7412 KB Output is correct
96 Correct 72 ms 7412 KB Output is correct
97 Correct 43 ms 7412 KB Output is correct
98 Correct 109 ms 7412 KB Output is correct
99 Correct 53 ms 7412 KB Output is correct
100 Correct 1 ms 7600 KB Output is correct
101 Correct 2 ms 7424 KB Output is correct
102 Correct 10 ms 7420 KB Output is correct
103 Correct 38 ms 7412 KB Output is correct
104 Correct 10 ms 7412 KB Output is correct
105 Correct 41 ms 7412 KB Output is correct
106 Correct 32 ms 7412 KB Output is correct
107 Correct 2 ms 7344 KB Output is correct
108 Correct 2 ms 7472 KB Output is correct
109 Correct 2 ms 7412 KB Output is correct
110 Correct 1 ms 7412 KB Output is correct
111 Correct 2 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 1 ms 7504 KB Output is correct
2 Correct 2 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 35 ms 33600 KB Output is correct
6 Correct 48 ms 34096 KB Output is correct
7 Correct 14 ms 22840 KB Output is correct
8 Correct 40 ms 35632 KB Output is correct
9 Correct 8 ms 12180 KB Output is correct
10 Correct 31 ms 33548 KB Output is correct
11 Correct 24 ms 33352 KB Output is correct
12 Correct 47 ms 34616 KB Output is correct
13 Correct 36 ms 34352 KB Output is correct
14 Correct 34 ms 33584 KB Output is correct
15 Correct 66 ms 34352 KB Output is correct
16 Correct 50 ms 35888 KB Output is correct
17 Correct 61 ms 35632 KB Output is correct
18 Correct 2 ms 7372 KB Output is correct
19 Correct 1 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 2 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 1 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 33 ms 32476 KB Output is correct
34 Correct 33 ms 34356 KB Output is correct
35 Correct 38 ms 34616 KB Output is correct
36 Correct 42 ms 33072 KB Output is correct
37 Correct 44 ms 33732 KB Output is correct
38 Correct 42 ms 35888 KB Output is correct
39 Correct 1 ms 7624 KB Output is correct
40 Correct 16 ms 22984 KB Output is correct
41 Correct 32 ms 32560 KB Output is correct
42 Correct 32 ms 33232 KB Output is correct
43 Correct 38 ms 32676 KB Output is correct
44 Correct 39 ms 33080 KB Output is correct
45 Correct 29 ms 33376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 7372 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 894 ms 22820 KB Output is correct
5 Execution timed out 4022 ms 32680 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 7372 KB Output is correct
2 Correct 1 ms 7372 KB Output is correct
3 Correct 1 ms 7372 KB Output is correct
4 Correct 894 ms 22820 KB Output is correct
5 Execution timed out 4022 ms 32680 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 76 ms 32572 KB Output is correct
4 Correct 574 ms 33352 KB Output is correct
5 Correct 563 ms 23244 KB Output is correct
6 Correct 541 ms 33352 KB Output is correct
7 Correct 442 ms 27968 KB Output is correct
8 Correct 552 ms 33344 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 1 ms 7372 KB Output is correct
13 Correct 3 ms 7308 KB Output is correct
14 Correct 2 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 1 ms 7384 KB Output is correct
18 Correct 2 ms 7396 KB Output is correct
19 Correct 2 ms 7348 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 3 ms 7348 KB Output is correct
25 Correct 4 ms 7348 KB Output is correct
26 Correct 1 ms 7372 KB Output is correct
27 Correct 2 ms 7404 KB Output is correct
28 Correct 2 ms 7348 KB Output is correct
29 Correct 2 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 7372 KB Output is correct
35 Correct 2 ms 7372 KB Output is correct
36 Correct 2 ms 7520 KB Output is correct
37 Correct 2 ms 7348 KB Output is correct
38 Correct 2 ms 7348 KB Output is correct
39 Correct 2 ms 7348 KB Output is correct
40 Correct 2 ms 7348 KB Output is correct
41 Correct 2 ms 7372 KB Output is correct
42 Correct 2 ms 7516 KB Output is correct
43 Correct 1 ms 7348 KB Output is correct
44 Correct 1 ms 7348 KB Output is correct
45 Correct 1 ms 7348 KB Output is correct
46 Correct 1 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 1 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 1 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 3 ms 7348 KB Output is correct
63 Correct 2 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 33 ms 7300 KB Output is correct
67 Correct 57 ms 7412 KB Output is correct
68 Correct 8 ms 7324 KB Output is correct
69 Correct 44 ms 7412 KB Output is correct
70 Correct 9 ms 7332 KB Output is correct
71 Correct 46 ms 7412 KB Output is correct
72 Correct 9 ms 7412 KB Output is correct
73 Correct 70 ms 7412 KB Output is correct
74 Correct 66 ms 7412 KB Output is correct
75 Correct 43 ms 7412 KB Output is correct
76 Correct 88 ms 7412 KB Output is correct
77 Correct 78 ms 7412 KB Output is correct
78 Correct 63 ms 7412 KB Output is correct
79 Correct 1 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 3 ms 7348 KB Output is correct
83 Correct 2 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 7372 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 1 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 1 ms 7348 KB Output is correct
102 Correct 3 ms 7452 KB Output is correct
103 Correct 44 ms 7412 KB Output is correct
104 Correct 72 ms 7412 KB Output is correct
105 Correct 43 ms 7412 KB Output is correct
106 Correct 109 ms 7412 KB Output is correct
107 Correct 53 ms 7412 KB Output is correct
108 Correct 1 ms 7600 KB Output is correct
109 Correct 2 ms 7424 KB Output is correct
110 Correct 10 ms 7420 KB Output is correct
111 Correct 38 ms 7412 KB Output is correct
112 Correct 10 ms 7412 KB Output is correct
113 Correct 41 ms 7412 KB Output is correct
114 Correct 32 ms 7412 KB Output is correct
115 Correct 2 ms 7344 KB Output is correct
116 Correct 2 ms 7472 KB Output is correct
117 Correct 2 ms 7412 KB Output is correct
118 Correct 1 ms 7412 KB Output is correct
119 Correct 2 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 1 ms 7504 KB Output is correct
123 Correct 2 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 35 ms 33600 KB Output is correct
127 Correct 48 ms 34096 KB Output is correct
128 Correct 14 ms 22840 KB Output is correct
129 Correct 40 ms 35632 KB Output is correct
130 Correct 8 ms 12180 KB Output is correct
131 Correct 31 ms 33548 KB Output is correct
132 Correct 24 ms 33352 KB Output is correct
133 Correct 47 ms 34616 KB Output is correct
134 Correct 36 ms 34352 KB Output is correct
135 Correct 34 ms 33584 KB Output is correct
136 Correct 66 ms 34352 KB Output is correct
137 Correct 50 ms 35888 KB Output is correct
138 Correct 61 ms 35632 KB Output is correct
139 Correct 2 ms 7372 KB Output is correct
140 Correct 1 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 2 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 1 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 33 ms 32476 KB Output is correct
155 Correct 33 ms 34356 KB Output is correct
156 Correct 38 ms 34616 KB Output is correct
157 Correct 42 ms 33072 KB Output is correct
158 Correct 44 ms 33732 KB Output is correct
159 Correct 42 ms 35888 KB Output is correct
160 Correct 1 ms 7624 KB Output is correct
161 Correct 16 ms 22984 KB Output is correct
162 Correct 32 ms 32560 KB Output is correct
163 Correct 32 ms 33232 KB Output is correct
164 Correct 38 ms 32676 KB Output is correct
165 Correct 39 ms 33080 KB Output is correct
166 Correct 29 ms 33376 KB Output is correct
167 Correct 2 ms 7372 KB Output is correct
168 Correct 1 ms 7372 KB Output is correct
169 Correct 1 ms 7372 KB Output is correct
170 Correct 894 ms 22820 KB Output is correct
171 Execution timed out 4022 ms 32680 KB Time limit exceeded
172 Halted 0 ms 0 KB -