#include "jumps.h"
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
const int maxn = (int)2e5+10;
const int maxlg = 24;
const int INF = (int)1e9;
bool increasing;
vector<int> adj[maxn];
int high[maxlg][maxn], low[maxlg][maxn];
int n, h[maxn], dis[maxn], pr[maxn], nx[maxn];
int bfs(int s1, int s2, int d1, int d2){
queue<int> Q;
while(!Q.empty()) Q.pop();
for(int i = 0; i < n; i++) dis[i]=INF;
for(int i = s1; i <= s2; i++) Q.push(i), dis[i]=0;
while(!Q.empty()){
int s = Q.front(); Q.pop();
if(d1<=s and s<=d2) return dis[s];
for(auto u : adj[s])
if(dis[u]==INF)
dis[u] = dis[s]+1, Q.push(u);
}
return -1;
}
void calc(int jmp[][maxn]){
for(int i = 1; i < maxlg; i++)
for(int j = 0; j < n; j++)
if(jmp[i-1][j]!=-1) jmp[i][j] = jmp[i-1][jmp[i-1][j]];
}
void init(int N, vector<int> a) {
n = N; increasing = 1;
stack<pair<int,int>> S;
memset(pr,-1,sizeof(pr));
memset(nx,-1,sizeof(nx));
memset(low,-1,sizeof(low));
memset(high,-1,sizeof(high));
for(int i = 0; i < (int)a.size(); i++) h[i]=a[i];
for(int i = 0; i < n; i++){
increasing&=(!i or a[i]>=a[i-1]);
while(!S.empty() and S.top().fi<a[i]) S.pop();
if(!S.empty()) pr[i] = S.top().se;
S.push({a[i],i});
}
while(!S.empty()) S.pop();
for(int i = n-1; i>=0; i--){
while(!S.empty() and S.top().fi<a[i]) S.pop();
if(!S.empty()) nx[i] = S.top().se;
S.push({a[i],i});
}
while(!S.empty()) S.pop();
for(int i = 0; i < n; i++){
if(pr[i]!=-1) adj[i].pb(pr[i]);
if(nx[i]!=-1) adj[i].pb(nx[i]);
if(pr[i]!=-1 and nx[i]!=-1){
if(a[pr[i]]<a[nx[i]]) swap(pr[i],nx[i]);
high[0][i] = pr[i]; low[0][i] = nx[i];
if(a[pr[i]]>a[nx[i]]) swap(pr[i],nx[i]);
}
else{
if(pr[i]!=-1) low[0][i] = pr[i];
else low[0][i] = nx[i];
}
}
calc(high), calc(low);
}
int get_path(int *x, int y, int jmp[][maxn]){
int tot = 0;
for(int i = 20; i >= 0; i--)
if(jmp[i][*x]!=-1 and h[jmp[i][*x]]<=h[y])
*x = jmp[i][*x], tot+=(1<<i);
return tot;
}
int sub5(int x, int y){
int num1 = get_path(&x,y,high);
int num2 = get_path(&x,y,low);
return (h[x]==h[y]?num1+num2:-1);
}
int minimum_jumps(int A, int B, int C, int D) {
if((A==B and C==D) or increasing) return sub5(B,C);
return bfs(A,B,C,D);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
44108 KB |
Output is correct |
2 |
Correct |
21 ms |
44112 KB |
Output is correct |
3 |
Correct |
106 ms |
51028 KB |
Output is correct |
4 |
Correct |
917 ms |
52748 KB |
Output is correct |
5 |
Correct |
639 ms |
48412 KB |
Output is correct |
6 |
Correct |
1020 ms |
52776 KB |
Output is correct |
7 |
Correct |
640 ms |
49956 KB |
Output is correct |
8 |
Correct |
1045 ms |
52756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
44064 KB |
Output is correct |
2 |
Correct |
17 ms |
44096 KB |
Output is correct |
3 |
Correct |
19 ms |
44128 KB |
Output is correct |
4 |
Correct |
18 ms |
44116 KB |
Output is correct |
5 |
Correct |
19 ms |
44052 KB |
Output is correct |
6 |
Correct |
19 ms |
44088 KB |
Output is correct |
7 |
Correct |
21 ms |
44112 KB |
Output is correct |
8 |
Correct |
20 ms |
44112 KB |
Output is correct |
9 |
Correct |
20 ms |
44112 KB |
Output is correct |
10 |
Correct |
20 ms |
44056 KB |
Output is correct |
11 |
Correct |
20 ms |
44112 KB |
Output is correct |
12 |
Correct |
20 ms |
44064 KB |
Output is correct |
13 |
Correct |
19 ms |
44112 KB |
Output is correct |
14 |
Correct |
21 ms |
44068 KB |
Output is correct |
15 |
Correct |
22 ms |
44084 KB |
Output is correct |
16 |
Correct |
20 ms |
44080 KB |
Output is correct |
17 |
Correct |
20 ms |
44048 KB |
Output is correct |
18 |
Correct |
18 ms |
44112 KB |
Output is correct |
19 |
Correct |
19 ms |
44132 KB |
Output is correct |
20 |
Correct |
20 ms |
44136 KB |
Output is correct |
21 |
Correct |
21 ms |
44124 KB |
Output is correct |
22 |
Correct |
20 ms |
44112 KB |
Output is correct |
23 |
Correct |
20 ms |
44112 KB |
Output is correct |
24 |
Correct |
19 ms |
44124 KB |
Output is correct |
25 |
Correct |
19 ms |
44032 KB |
Output is correct |
26 |
Correct |
18 ms |
44056 KB |
Output is correct |
27 |
Correct |
20 ms |
44112 KB |
Output is correct |
28 |
Correct |
20 ms |
44088 KB |
Output is correct |
29 |
Correct |
21 ms |
44112 KB |
Output is correct |
30 |
Correct |
20 ms |
44112 KB |
Output is correct |
31 |
Correct |
20 ms |
44120 KB |
Output is correct |
32 |
Correct |
19 ms |
44108 KB |
Output is correct |
33 |
Correct |
22 ms |
44108 KB |
Output is correct |
34 |
Correct |
18 ms |
44112 KB |
Output is correct |
35 |
Correct |
20 ms |
44112 KB |
Output is correct |
36 |
Correct |
20 ms |
44132 KB |
Output is correct |
37 |
Correct |
18 ms |
44112 KB |
Output is correct |
38 |
Correct |
19 ms |
44112 KB |
Output is correct |
39 |
Correct |
19 ms |
44112 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
44064 KB |
Output is correct |
2 |
Correct |
17 ms |
44096 KB |
Output is correct |
3 |
Correct |
19 ms |
44128 KB |
Output is correct |
4 |
Correct |
18 ms |
44116 KB |
Output is correct |
5 |
Correct |
19 ms |
44052 KB |
Output is correct |
6 |
Correct |
19 ms |
44088 KB |
Output is correct |
7 |
Correct |
21 ms |
44112 KB |
Output is correct |
8 |
Correct |
20 ms |
44112 KB |
Output is correct |
9 |
Correct |
20 ms |
44112 KB |
Output is correct |
10 |
Correct |
20 ms |
44056 KB |
Output is correct |
11 |
Correct |
20 ms |
44112 KB |
Output is correct |
12 |
Correct |
20 ms |
44064 KB |
Output is correct |
13 |
Correct |
19 ms |
44112 KB |
Output is correct |
14 |
Correct |
21 ms |
44068 KB |
Output is correct |
15 |
Correct |
22 ms |
44084 KB |
Output is correct |
16 |
Correct |
20 ms |
44080 KB |
Output is correct |
17 |
Correct |
20 ms |
44048 KB |
Output is correct |
18 |
Correct |
18 ms |
44112 KB |
Output is correct |
19 |
Correct |
19 ms |
44132 KB |
Output is correct |
20 |
Correct |
20 ms |
44136 KB |
Output is correct |
21 |
Correct |
21 ms |
44124 KB |
Output is correct |
22 |
Correct |
20 ms |
44112 KB |
Output is correct |
23 |
Correct |
20 ms |
44112 KB |
Output is correct |
24 |
Correct |
19 ms |
44124 KB |
Output is correct |
25 |
Correct |
19 ms |
44032 KB |
Output is correct |
26 |
Correct |
18 ms |
44056 KB |
Output is correct |
27 |
Correct |
20 ms |
44112 KB |
Output is correct |
28 |
Correct |
20 ms |
44088 KB |
Output is correct |
29 |
Correct |
21 ms |
44112 KB |
Output is correct |
30 |
Correct |
20 ms |
44112 KB |
Output is correct |
31 |
Correct |
20 ms |
44120 KB |
Output is correct |
32 |
Correct |
19 ms |
44108 KB |
Output is correct |
33 |
Correct |
22 ms |
44108 KB |
Output is correct |
34 |
Correct |
18 ms |
44112 KB |
Output is correct |
35 |
Correct |
20 ms |
44112 KB |
Output is correct |
36 |
Correct |
20 ms |
44132 KB |
Output is correct |
37 |
Correct |
18 ms |
44112 KB |
Output is correct |
38 |
Correct |
19 ms |
44112 KB |
Output is correct |
39 |
Correct |
19 ms |
44112 KB |
Output is correct |
40 |
Correct |
18 ms |
44120 KB |
Output is correct |
41 |
Correct |
18 ms |
44112 KB |
Output is correct |
42 |
Correct |
18 ms |
44112 KB |
Output is correct |
43 |
Correct |
18 ms |
44052 KB |
Output is correct |
44 |
Correct |
19 ms |
44124 KB |
Output is correct |
45 |
Correct |
21 ms |
44144 KB |
Output is correct |
46 |
Correct |
20 ms |
44140 KB |
Output is correct |
47 |
Correct |
20 ms |
44104 KB |
Output is correct |
48 |
Correct |
19 ms |
44112 KB |
Output is correct |
49 |
Correct |
19 ms |
44056 KB |
Output is correct |
50 |
Correct |
20 ms |
44104 KB |
Output is correct |
51 |
Correct |
20 ms |
44112 KB |
Output is correct |
52 |
Correct |
20 ms |
44072 KB |
Output is correct |
53 |
Correct |
19 ms |
44112 KB |
Output is correct |
54 |
Correct |
20 ms |
44048 KB |
Output is correct |
55 |
Correct |
20 ms |
44068 KB |
Output is correct |
56 |
Correct |
22 ms |
44032 KB |
Output is correct |
57 |
Correct |
19 ms |
44128 KB |
Output is correct |
58 |
Correct |
39 ms |
44108 KB |
Output is correct |
59 |
Correct |
42 ms |
44208 KB |
Output is correct |
60 |
Correct |
25 ms |
44112 KB |
Output is correct |
61 |
Correct |
49 ms |
44244 KB |
Output is correct |
62 |
Correct |
31 ms |
44152 KB |
Output is correct |
63 |
Correct |
43 ms |
44240 KB |
Output is correct |
64 |
Correct |
37 ms |
44112 KB |
Output is correct |
65 |
Correct |
53 ms |
44168 KB |
Output is correct |
66 |
Correct |
52 ms |
44168 KB |
Output is correct |
67 |
Correct |
43 ms |
44204 KB |
Output is correct |
68 |
Correct |
45 ms |
44148 KB |
Output is correct |
69 |
Correct |
49 ms |
44240 KB |
Output is correct |
70 |
Correct |
44 ms |
44240 KB |
Output is correct |
71 |
Correct |
22 ms |
44076 KB |
Output is correct |
72 |
Correct |
19 ms |
44108 KB |
Output is correct |
73 |
Correct |
19 ms |
44032 KB |
Output is correct |
74 |
Correct |
20 ms |
44084 KB |
Output is correct |
75 |
Correct |
20 ms |
44112 KB |
Output is correct |
76 |
Correct |
21 ms |
44112 KB |
Output is correct |
77 |
Correct |
21 ms |
44112 KB |
Output is correct |
78 |
Correct |
18 ms |
44112 KB |
Output is correct |
79 |
Correct |
19 ms |
44112 KB |
Output is correct |
80 |
Correct |
22 ms |
44152 KB |
Output is correct |
81 |
Correct |
20 ms |
44040 KB |
Output is correct |
82 |
Correct |
20 ms |
44112 KB |
Output is correct |
83 |
Correct |
21 ms |
44112 KB |
Output is correct |
84 |
Correct |
21 ms |
44112 KB |
Output is correct |
85 |
Correct |
20 ms |
44076 KB |
Output is correct |
86 |
Correct |
18 ms |
44112 KB |
Output is correct |
87 |
Correct |
21 ms |
44112 KB |
Output is correct |
88 |
Correct |
19 ms |
44064 KB |
Output is correct |
89 |
Correct |
20 ms |
44120 KB |
Output is correct |
90 |
Correct |
19 ms |
44112 KB |
Output is correct |
91 |
Correct |
21 ms |
44104 KB |
Output is correct |
92 |
Correct |
18 ms |
44112 KB |
Output is correct |
93 |
Correct |
18 ms |
44112 KB |
Output is correct |
94 |
Correct |
20 ms |
44096 KB |
Output is correct |
95 |
Correct |
47 ms |
44132 KB |
Output is correct |
96 |
Correct |
49 ms |
44240 KB |
Output is correct |
97 |
Correct |
41 ms |
44160 KB |
Output is correct |
98 |
Correct |
57 ms |
44120 KB |
Output is correct |
99 |
Correct |
40 ms |
44240 KB |
Output is correct |
100 |
Correct |
18 ms |
44124 KB |
Output is correct |
101 |
Correct |
18 ms |
44212 KB |
Output is correct |
102 |
Correct |
27 ms |
44112 KB |
Output is correct |
103 |
Correct |
38 ms |
44116 KB |
Output is correct |
104 |
Correct |
27 ms |
44240 KB |
Output is correct |
105 |
Correct |
39 ms |
44240 KB |
Output is correct |
106 |
Correct |
27 ms |
44156 KB |
Output is correct |
107 |
Correct |
18 ms |
44112 KB |
Output is correct |
108 |
Correct |
20 ms |
44192 KB |
Output is correct |
109 |
Correct |
19 ms |
44240 KB |
Output is correct |
110 |
Correct |
19 ms |
44272 KB |
Output is correct |
111 |
Correct |
19 ms |
44160 KB |
Output is correct |
112 |
Correct |
19 ms |
44232 KB |
Output is correct |
113 |
Correct |
18 ms |
44140 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
19 ms |
44140 KB |
Output is correct |
2 |
Correct |
20 ms |
44112 KB |
Output is correct |
3 |
Correct |
18 ms |
44112 KB |
Output is correct |
4 |
Correct |
19 ms |
44028 KB |
Output is correct |
5 |
Correct |
62 ms |
51332 KB |
Output is correct |
6 |
Correct |
70 ms |
52972 KB |
Output is correct |
7 |
Correct |
45 ms |
48540 KB |
Output is correct |
8 |
Correct |
70 ms |
53460 KB |
Output is correct |
9 |
Correct |
26 ms |
45456 KB |
Output is correct |
10 |
Correct |
68 ms |
52920 KB |
Output is correct |
11 |
Correct |
70 ms |
52732 KB |
Output is correct |
12 |
Correct |
61 ms |
53100 KB |
Output is correct |
13 |
Correct |
60 ms |
52996 KB |
Output is correct |
14 |
Correct |
67 ms |
52920 KB |
Output is correct |
15 |
Correct |
81 ms |
53136 KB |
Output is correct |
16 |
Correct |
69 ms |
53472 KB |
Output is correct |
17 |
Correct |
75 ms |
53440 KB |
Output is correct |
18 |
Correct |
20 ms |
44068 KB |
Output is correct |
19 |
Correct |
19 ms |
44068 KB |
Output is correct |
20 |
Correct |
18 ms |
44116 KB |
Output is correct |
21 |
Correct |
19 ms |
44112 KB |
Output is correct |
22 |
Correct |
18 ms |
44112 KB |
Output is correct |
23 |
Correct |
18 ms |
44104 KB |
Output is correct |
24 |
Correct |
18 ms |
44124 KB |
Output is correct |
25 |
Correct |
18 ms |
44112 KB |
Output is correct |
26 |
Correct |
18 ms |
44184 KB |
Output is correct |
27 |
Correct |
20 ms |
44156 KB |
Output is correct |
28 |
Correct |
19 ms |
44184 KB |
Output is correct |
29 |
Correct |
22 ms |
44140 KB |
Output is correct |
30 |
Correct |
19 ms |
44240 KB |
Output is correct |
31 |
Correct |
19 ms |
44240 KB |
Output is correct |
32 |
Correct |
22 ms |
44080 KB |
Output is correct |
33 |
Correct |
67 ms |
52720 KB |
Output is correct |
34 |
Correct |
68 ms |
52976 KB |
Output is correct |
35 |
Correct |
58 ms |
53120 KB |
Output is correct |
36 |
Correct |
69 ms |
52860 KB |
Output is correct |
37 |
Correct |
65 ms |
53000 KB |
Output is correct |
38 |
Correct |
60 ms |
53524 KB |
Output is correct |
39 |
Correct |
18 ms |
44112 KB |
Output is correct |
40 |
Correct |
45 ms |
49020 KB |
Output is correct |
41 |
Correct |
67 ms |
52680 KB |
Output is correct |
42 |
Correct |
72 ms |
52732 KB |
Output is correct |
43 |
Correct |
65 ms |
52732 KB |
Output is correct |
44 |
Correct |
60 ms |
52768 KB |
Output is correct |
45 |
Correct |
55 ms |
52680 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
44112 KB |
Output is correct |
2 |
Correct |
18 ms |
44112 KB |
Output is correct |
3 |
Correct |
19 ms |
44112 KB |
Output is correct |
4 |
Correct |
271 ms |
48000 KB |
Output is correct |
5 |
Correct |
1075 ms |
52752 KB |
Output is correct |
6 |
Correct |
607 ms |
45564 KB |
Output is correct |
7 |
Correct |
872 ms |
52628 KB |
Output is correct |
8 |
Correct |
574 ms |
46988 KB |
Output is correct |
9 |
Correct |
746 ms |
52680 KB |
Output is correct |
10 |
Correct |
975 ms |
52744 KB |
Output is correct |
11 |
Correct |
1047 ms |
52676 KB |
Output is correct |
12 |
Correct |
1143 ms |
52756 KB |
Output is correct |
13 |
Correct |
1000 ms |
52732 KB |
Output is correct |
14 |
Correct |
749 ms |
52772 KB |
Output is correct |
15 |
Correct |
856 ms |
52736 KB |
Output is correct |
16 |
Correct |
927 ms |
52724 KB |
Output is correct |
17 |
Correct |
18 ms |
44112 KB |
Output is correct |
18 |
Correct |
19 ms |
44048 KB |
Output is correct |
19 |
Correct |
20 ms |
44112 KB |
Output is correct |
20 |
Correct |
20 ms |
44140 KB |
Output is correct |
21 |
Correct |
20 ms |
44036 KB |
Output is correct |
22 |
Correct |
20 ms |
44112 KB |
Output is correct |
23 |
Correct |
20 ms |
44068 KB |
Output is correct |
24 |
Correct |
21 ms |
44112 KB |
Output is correct |
25 |
Correct |
18 ms |
44112 KB |
Output is correct |
26 |
Correct |
19 ms |
44136 KB |
Output is correct |
27 |
Correct |
35 ms |
44164 KB |
Output is correct |
28 |
Correct |
38 ms |
44196 KB |
Output is correct |
29 |
Correct |
27 ms |
44200 KB |
Output is correct |
30 |
Correct |
36 ms |
44160 KB |
Output is correct |
31 |
Correct |
27 ms |
44204 KB |
Output is correct |
32 |
Correct |
18 ms |
44112 KB |
Output is correct |
33 |
Correct |
46 ms |
49104 KB |
Output is correct |
34 |
Correct |
66 ms |
52640 KB |
Output is correct |
35 |
Correct |
57 ms |
52728 KB |
Output is correct |
36 |
Correct |
67 ms |
52740 KB |
Output is correct |
37 |
Correct |
72 ms |
52648 KB |
Output is correct |
38 |
Correct |
68 ms |
52680 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
44112 KB |
Output is correct |
2 |
Correct |
18 ms |
44112 KB |
Output is correct |
3 |
Correct |
19 ms |
44112 KB |
Output is correct |
4 |
Correct |
271 ms |
48000 KB |
Output is correct |
5 |
Correct |
1075 ms |
52752 KB |
Output is correct |
6 |
Correct |
607 ms |
45564 KB |
Output is correct |
7 |
Correct |
872 ms |
52628 KB |
Output is correct |
8 |
Correct |
574 ms |
46988 KB |
Output is correct |
9 |
Correct |
746 ms |
52680 KB |
Output is correct |
10 |
Correct |
975 ms |
52744 KB |
Output is correct |
11 |
Correct |
1047 ms |
52676 KB |
Output is correct |
12 |
Correct |
1143 ms |
52756 KB |
Output is correct |
13 |
Correct |
1000 ms |
52732 KB |
Output is correct |
14 |
Correct |
749 ms |
52772 KB |
Output is correct |
15 |
Correct |
856 ms |
52736 KB |
Output is correct |
16 |
Correct |
927 ms |
52724 KB |
Output is correct |
17 |
Correct |
18 ms |
44112 KB |
Output is correct |
18 |
Correct |
19 ms |
44048 KB |
Output is correct |
19 |
Correct |
20 ms |
44112 KB |
Output is correct |
20 |
Correct |
20 ms |
44140 KB |
Output is correct |
21 |
Correct |
20 ms |
44036 KB |
Output is correct |
22 |
Correct |
20 ms |
44112 KB |
Output is correct |
23 |
Correct |
20 ms |
44068 KB |
Output is correct |
24 |
Correct |
21 ms |
44112 KB |
Output is correct |
25 |
Correct |
18 ms |
44112 KB |
Output is correct |
26 |
Correct |
19 ms |
44136 KB |
Output is correct |
27 |
Correct |
35 ms |
44164 KB |
Output is correct |
28 |
Correct |
38 ms |
44196 KB |
Output is correct |
29 |
Correct |
27 ms |
44200 KB |
Output is correct |
30 |
Correct |
36 ms |
44160 KB |
Output is correct |
31 |
Correct |
27 ms |
44204 KB |
Output is correct |
32 |
Correct |
18 ms |
44112 KB |
Output is correct |
33 |
Correct |
46 ms |
49104 KB |
Output is correct |
34 |
Correct |
66 ms |
52640 KB |
Output is correct |
35 |
Correct |
57 ms |
52728 KB |
Output is correct |
36 |
Correct |
67 ms |
52740 KB |
Output is correct |
37 |
Correct |
72 ms |
52648 KB |
Output is correct |
38 |
Correct |
68 ms |
52680 KB |
Output is correct |
39 |
Correct |
18 ms |
44112 KB |
Output is correct |
40 |
Correct |
19 ms |
44036 KB |
Output is correct |
41 |
Correct |
20 ms |
44028 KB |
Output is correct |
42 |
Correct |
254 ms |
48120 KB |
Output is correct |
43 |
Correct |
875 ms |
52708 KB |
Output is correct |
44 |
Correct |
629 ms |
45560 KB |
Output is correct |
45 |
Correct |
980 ms |
52680 KB |
Output is correct |
46 |
Correct |
585 ms |
47000 KB |
Output is correct |
47 |
Correct |
749 ms |
52632 KB |
Output is correct |
48 |
Correct |
905 ms |
52760 KB |
Output is correct |
49 |
Correct |
945 ms |
52724 KB |
Output is correct |
50 |
Correct |
1121 ms |
52736 KB |
Output is correct |
51 |
Correct |
941 ms |
52648 KB |
Output is correct |
52 |
Correct |
1032 ms |
52708 KB |
Output is correct |
53 |
Correct |
1176 ms |
52744 KB |
Output is correct |
54 |
Correct |
1031 ms |
52684 KB |
Output is correct |
55 |
Correct |
20 ms |
44048 KB |
Output is correct |
56 |
Correct |
3554 ms |
53540 KB |
Output is correct |
57 |
Execution timed out |
4077 ms |
53564 KB |
Time limit exceeded |
58 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
44108 KB |
Output is correct |
2 |
Correct |
21 ms |
44112 KB |
Output is correct |
3 |
Correct |
106 ms |
51028 KB |
Output is correct |
4 |
Correct |
917 ms |
52748 KB |
Output is correct |
5 |
Correct |
639 ms |
48412 KB |
Output is correct |
6 |
Correct |
1020 ms |
52776 KB |
Output is correct |
7 |
Correct |
640 ms |
49956 KB |
Output is correct |
8 |
Correct |
1045 ms |
52756 KB |
Output is correct |
9 |
Correct |
19 ms |
44064 KB |
Output is correct |
10 |
Correct |
17 ms |
44096 KB |
Output is correct |
11 |
Correct |
19 ms |
44128 KB |
Output is correct |
12 |
Correct |
18 ms |
44116 KB |
Output is correct |
13 |
Correct |
19 ms |
44052 KB |
Output is correct |
14 |
Correct |
19 ms |
44088 KB |
Output is correct |
15 |
Correct |
21 ms |
44112 KB |
Output is correct |
16 |
Correct |
20 ms |
44112 KB |
Output is correct |
17 |
Correct |
20 ms |
44112 KB |
Output is correct |
18 |
Correct |
20 ms |
44056 KB |
Output is correct |
19 |
Correct |
20 ms |
44112 KB |
Output is correct |
20 |
Correct |
20 ms |
44064 KB |
Output is correct |
21 |
Correct |
19 ms |
44112 KB |
Output is correct |
22 |
Correct |
21 ms |
44068 KB |
Output is correct |
23 |
Correct |
22 ms |
44084 KB |
Output is correct |
24 |
Correct |
20 ms |
44080 KB |
Output is correct |
25 |
Correct |
20 ms |
44048 KB |
Output is correct |
26 |
Correct |
18 ms |
44112 KB |
Output is correct |
27 |
Correct |
19 ms |
44132 KB |
Output is correct |
28 |
Correct |
20 ms |
44136 KB |
Output is correct |
29 |
Correct |
21 ms |
44124 KB |
Output is correct |
30 |
Correct |
20 ms |
44112 KB |
Output is correct |
31 |
Correct |
20 ms |
44112 KB |
Output is correct |
32 |
Correct |
19 ms |
44124 KB |
Output is correct |
33 |
Correct |
19 ms |
44032 KB |
Output is correct |
34 |
Correct |
18 ms |
44056 KB |
Output is correct |
35 |
Correct |
20 ms |
44112 KB |
Output is correct |
36 |
Correct |
20 ms |
44088 KB |
Output is correct |
37 |
Correct |
21 ms |
44112 KB |
Output is correct |
38 |
Correct |
20 ms |
44112 KB |
Output is correct |
39 |
Correct |
20 ms |
44120 KB |
Output is correct |
40 |
Correct |
19 ms |
44108 KB |
Output is correct |
41 |
Correct |
22 ms |
44108 KB |
Output is correct |
42 |
Correct |
18 ms |
44112 KB |
Output is correct |
43 |
Correct |
20 ms |
44112 KB |
Output is correct |
44 |
Correct |
20 ms |
44132 KB |
Output is correct |
45 |
Correct |
18 ms |
44112 KB |
Output is correct |
46 |
Correct |
19 ms |
44112 KB |
Output is correct |
47 |
Correct |
19 ms |
44112 KB |
Output is correct |
48 |
Correct |
18 ms |
44120 KB |
Output is correct |
49 |
Correct |
18 ms |
44112 KB |
Output is correct |
50 |
Correct |
18 ms |
44112 KB |
Output is correct |
51 |
Correct |
18 ms |
44052 KB |
Output is correct |
52 |
Correct |
19 ms |
44124 KB |
Output is correct |
53 |
Correct |
21 ms |
44144 KB |
Output is correct |
54 |
Correct |
20 ms |
44140 KB |
Output is correct |
55 |
Correct |
20 ms |
44104 KB |
Output is correct |
56 |
Correct |
19 ms |
44112 KB |
Output is correct |
57 |
Correct |
19 ms |
44056 KB |
Output is correct |
58 |
Correct |
20 ms |
44104 KB |
Output is correct |
59 |
Correct |
20 ms |
44112 KB |
Output is correct |
60 |
Correct |
20 ms |
44072 KB |
Output is correct |
61 |
Correct |
19 ms |
44112 KB |
Output is correct |
62 |
Correct |
20 ms |
44048 KB |
Output is correct |
63 |
Correct |
20 ms |
44068 KB |
Output is correct |
64 |
Correct |
22 ms |
44032 KB |
Output is correct |
65 |
Correct |
19 ms |
44128 KB |
Output is correct |
66 |
Correct |
39 ms |
44108 KB |
Output is correct |
67 |
Correct |
42 ms |
44208 KB |
Output is correct |
68 |
Correct |
25 ms |
44112 KB |
Output is correct |
69 |
Correct |
49 ms |
44244 KB |
Output is correct |
70 |
Correct |
31 ms |
44152 KB |
Output is correct |
71 |
Correct |
43 ms |
44240 KB |
Output is correct |
72 |
Correct |
37 ms |
44112 KB |
Output is correct |
73 |
Correct |
53 ms |
44168 KB |
Output is correct |
74 |
Correct |
52 ms |
44168 KB |
Output is correct |
75 |
Correct |
43 ms |
44204 KB |
Output is correct |
76 |
Correct |
45 ms |
44148 KB |
Output is correct |
77 |
Correct |
49 ms |
44240 KB |
Output is correct |
78 |
Correct |
44 ms |
44240 KB |
Output is correct |
79 |
Correct |
22 ms |
44076 KB |
Output is correct |
80 |
Correct |
19 ms |
44108 KB |
Output is correct |
81 |
Correct |
19 ms |
44032 KB |
Output is correct |
82 |
Correct |
20 ms |
44084 KB |
Output is correct |
83 |
Correct |
20 ms |
44112 KB |
Output is correct |
84 |
Correct |
21 ms |
44112 KB |
Output is correct |
85 |
Correct |
21 ms |
44112 KB |
Output is correct |
86 |
Correct |
18 ms |
44112 KB |
Output is correct |
87 |
Correct |
19 ms |
44112 KB |
Output is correct |
88 |
Correct |
22 ms |
44152 KB |
Output is correct |
89 |
Correct |
20 ms |
44040 KB |
Output is correct |
90 |
Correct |
20 ms |
44112 KB |
Output is correct |
91 |
Correct |
21 ms |
44112 KB |
Output is correct |
92 |
Correct |
21 ms |
44112 KB |
Output is correct |
93 |
Correct |
20 ms |
44076 KB |
Output is correct |
94 |
Correct |
18 ms |
44112 KB |
Output is correct |
95 |
Correct |
21 ms |
44112 KB |
Output is correct |
96 |
Correct |
19 ms |
44064 KB |
Output is correct |
97 |
Correct |
20 ms |
44120 KB |
Output is correct |
98 |
Correct |
19 ms |
44112 KB |
Output is correct |
99 |
Correct |
21 ms |
44104 KB |
Output is correct |
100 |
Correct |
18 ms |
44112 KB |
Output is correct |
101 |
Correct |
18 ms |
44112 KB |
Output is correct |
102 |
Correct |
20 ms |
44096 KB |
Output is correct |
103 |
Correct |
47 ms |
44132 KB |
Output is correct |
104 |
Correct |
49 ms |
44240 KB |
Output is correct |
105 |
Correct |
41 ms |
44160 KB |
Output is correct |
106 |
Correct |
57 ms |
44120 KB |
Output is correct |
107 |
Correct |
40 ms |
44240 KB |
Output is correct |
108 |
Correct |
18 ms |
44124 KB |
Output is correct |
109 |
Correct |
18 ms |
44212 KB |
Output is correct |
110 |
Correct |
27 ms |
44112 KB |
Output is correct |
111 |
Correct |
38 ms |
44116 KB |
Output is correct |
112 |
Correct |
27 ms |
44240 KB |
Output is correct |
113 |
Correct |
39 ms |
44240 KB |
Output is correct |
114 |
Correct |
27 ms |
44156 KB |
Output is correct |
115 |
Correct |
18 ms |
44112 KB |
Output is correct |
116 |
Correct |
20 ms |
44192 KB |
Output is correct |
117 |
Correct |
19 ms |
44240 KB |
Output is correct |
118 |
Correct |
19 ms |
44272 KB |
Output is correct |
119 |
Correct |
19 ms |
44160 KB |
Output is correct |
120 |
Correct |
19 ms |
44232 KB |
Output is correct |
121 |
Correct |
18 ms |
44140 KB |
Output is correct |
122 |
Correct |
19 ms |
44140 KB |
Output is correct |
123 |
Correct |
20 ms |
44112 KB |
Output is correct |
124 |
Correct |
18 ms |
44112 KB |
Output is correct |
125 |
Correct |
19 ms |
44028 KB |
Output is correct |
126 |
Correct |
62 ms |
51332 KB |
Output is correct |
127 |
Correct |
70 ms |
52972 KB |
Output is correct |
128 |
Correct |
45 ms |
48540 KB |
Output is correct |
129 |
Correct |
70 ms |
53460 KB |
Output is correct |
130 |
Correct |
26 ms |
45456 KB |
Output is correct |
131 |
Correct |
68 ms |
52920 KB |
Output is correct |
132 |
Correct |
70 ms |
52732 KB |
Output is correct |
133 |
Correct |
61 ms |
53100 KB |
Output is correct |
134 |
Correct |
60 ms |
52996 KB |
Output is correct |
135 |
Correct |
67 ms |
52920 KB |
Output is correct |
136 |
Correct |
81 ms |
53136 KB |
Output is correct |
137 |
Correct |
69 ms |
53472 KB |
Output is correct |
138 |
Correct |
75 ms |
53440 KB |
Output is correct |
139 |
Correct |
20 ms |
44068 KB |
Output is correct |
140 |
Correct |
19 ms |
44068 KB |
Output is correct |
141 |
Correct |
18 ms |
44116 KB |
Output is correct |
142 |
Correct |
19 ms |
44112 KB |
Output is correct |
143 |
Correct |
18 ms |
44112 KB |
Output is correct |
144 |
Correct |
18 ms |
44104 KB |
Output is correct |
145 |
Correct |
18 ms |
44124 KB |
Output is correct |
146 |
Correct |
18 ms |
44112 KB |
Output is correct |
147 |
Correct |
18 ms |
44184 KB |
Output is correct |
148 |
Correct |
20 ms |
44156 KB |
Output is correct |
149 |
Correct |
19 ms |
44184 KB |
Output is correct |
150 |
Correct |
22 ms |
44140 KB |
Output is correct |
151 |
Correct |
19 ms |
44240 KB |
Output is correct |
152 |
Correct |
19 ms |
44240 KB |
Output is correct |
153 |
Correct |
22 ms |
44080 KB |
Output is correct |
154 |
Correct |
67 ms |
52720 KB |
Output is correct |
155 |
Correct |
68 ms |
52976 KB |
Output is correct |
156 |
Correct |
58 ms |
53120 KB |
Output is correct |
157 |
Correct |
69 ms |
52860 KB |
Output is correct |
158 |
Correct |
65 ms |
53000 KB |
Output is correct |
159 |
Correct |
60 ms |
53524 KB |
Output is correct |
160 |
Correct |
18 ms |
44112 KB |
Output is correct |
161 |
Correct |
45 ms |
49020 KB |
Output is correct |
162 |
Correct |
67 ms |
52680 KB |
Output is correct |
163 |
Correct |
72 ms |
52732 KB |
Output is correct |
164 |
Correct |
65 ms |
52732 KB |
Output is correct |
165 |
Correct |
60 ms |
52768 KB |
Output is correct |
166 |
Correct |
55 ms |
52680 KB |
Output is correct |
167 |
Correct |
18 ms |
44112 KB |
Output is correct |
168 |
Correct |
18 ms |
44112 KB |
Output is correct |
169 |
Correct |
19 ms |
44112 KB |
Output is correct |
170 |
Correct |
271 ms |
48000 KB |
Output is correct |
171 |
Correct |
1075 ms |
52752 KB |
Output is correct |
172 |
Correct |
607 ms |
45564 KB |
Output is correct |
173 |
Correct |
872 ms |
52628 KB |
Output is correct |
174 |
Correct |
574 ms |
46988 KB |
Output is correct |
175 |
Correct |
746 ms |
52680 KB |
Output is correct |
176 |
Correct |
975 ms |
52744 KB |
Output is correct |
177 |
Correct |
1047 ms |
52676 KB |
Output is correct |
178 |
Correct |
1143 ms |
52756 KB |
Output is correct |
179 |
Correct |
1000 ms |
52732 KB |
Output is correct |
180 |
Correct |
749 ms |
52772 KB |
Output is correct |
181 |
Correct |
856 ms |
52736 KB |
Output is correct |
182 |
Correct |
927 ms |
52724 KB |
Output is correct |
183 |
Correct |
18 ms |
44112 KB |
Output is correct |
184 |
Correct |
19 ms |
44048 KB |
Output is correct |
185 |
Correct |
20 ms |
44112 KB |
Output is correct |
186 |
Correct |
20 ms |
44140 KB |
Output is correct |
187 |
Correct |
20 ms |
44036 KB |
Output is correct |
188 |
Correct |
20 ms |
44112 KB |
Output is correct |
189 |
Correct |
20 ms |
44068 KB |
Output is correct |
190 |
Correct |
21 ms |
44112 KB |
Output is correct |
191 |
Correct |
18 ms |
44112 KB |
Output is correct |
192 |
Correct |
19 ms |
44136 KB |
Output is correct |
193 |
Correct |
35 ms |
44164 KB |
Output is correct |
194 |
Correct |
38 ms |
44196 KB |
Output is correct |
195 |
Correct |
27 ms |
44200 KB |
Output is correct |
196 |
Correct |
36 ms |
44160 KB |
Output is correct |
197 |
Correct |
27 ms |
44204 KB |
Output is correct |
198 |
Correct |
18 ms |
44112 KB |
Output is correct |
199 |
Correct |
46 ms |
49104 KB |
Output is correct |
200 |
Correct |
66 ms |
52640 KB |
Output is correct |
201 |
Correct |
57 ms |
52728 KB |
Output is correct |
202 |
Correct |
67 ms |
52740 KB |
Output is correct |
203 |
Correct |
72 ms |
52648 KB |
Output is correct |
204 |
Correct |
68 ms |
52680 KB |
Output is correct |
205 |
Correct |
18 ms |
44112 KB |
Output is correct |
206 |
Correct |
19 ms |
44036 KB |
Output is correct |
207 |
Correct |
20 ms |
44028 KB |
Output is correct |
208 |
Correct |
254 ms |
48120 KB |
Output is correct |
209 |
Correct |
875 ms |
52708 KB |
Output is correct |
210 |
Correct |
629 ms |
45560 KB |
Output is correct |
211 |
Correct |
980 ms |
52680 KB |
Output is correct |
212 |
Correct |
585 ms |
47000 KB |
Output is correct |
213 |
Correct |
749 ms |
52632 KB |
Output is correct |
214 |
Correct |
905 ms |
52760 KB |
Output is correct |
215 |
Correct |
945 ms |
52724 KB |
Output is correct |
216 |
Correct |
1121 ms |
52736 KB |
Output is correct |
217 |
Correct |
941 ms |
52648 KB |
Output is correct |
218 |
Correct |
1032 ms |
52708 KB |
Output is correct |
219 |
Correct |
1176 ms |
52744 KB |
Output is correct |
220 |
Correct |
1031 ms |
52684 KB |
Output is correct |
221 |
Correct |
20 ms |
44048 KB |
Output is correct |
222 |
Correct |
3554 ms |
53540 KB |
Output is correct |
223 |
Execution timed out |
4077 ms |
53564 KB |
Time limit exceeded |
224 |
Halted |
0 ms |
0 KB |
- |