#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,popcnt,sse4")
#define ll long long
#define pii pair<int,int>
#define fs first
#define sc second
#define int ll
const ll mod = 1e6+3;
const int inf = 1e9;
const int mxn = 1e6+10;
int arr[mxn],pref[mxn],suf[mxn],tar[mxn];
ll ans = 0;
int N;
vector<int> all;
void up(int id){
vector<int> v;
for(int i = 1;i<=N;i++){
if(arr[i] == all[id]&&tar[i] != arr[i])v.push_back(i);
}
if(v.empty())return;
pii ls = pii(inf,inf),rs = pii(inf,inf);
for(int i = 1;i<=N;i++){
if(arr[i]<=all[id])continue;
if(i<v[0])ls.fs = min(ls.fs,arr[i]);
else ls.sc = min(ls.sc,arr[i]);
if(i<v.back())rs.fs = min(rs.fs,arr[i]);
else rs.sc = min(rs.sc,arr[i]);
}
if(v.size() == 1){
ans += (ls.fs+ls.sc)*(all[id+1]-all[id])+(all[id]+all[id+1]-1)*(all[id+1]-all[id])/2%mod;
ans %= mod;
arr[v[0]] = all[id+1];
return;
}
if(ls.fs+ls.sc+rs.sc<=rs.fs+rs.sc+ls.fs){
ans += (ls.fs+ls.sc)*(all[id+1]-all[id])%mod;
ans += rs.sc*(all[id+1]-all[id])%mod+(all[id+1]+all[id]+1)*(all[id+1]-all[id])/2%mod;
}
else{
ans += (rs.fs+rs.sc)*(all[id+1]-all[id])%mod;
ans += ls.fs*(all[id+1]-all[id])%mod+(all[id+1]+all[id]+1)*(all[id+1]-all[id])/2%mod;
}
ans %= mod;
ans += 1ll*(v.size()-2)*((all[id+1]+all[id]+1)*(all[id+1]-all[id])/2%mod*2)%mod;
ans += 1ll*v.size()*((all[id+1]-1+all[id])*(all[id+1]-all[id])/2%mod)%mod;
ans %= mod;
for(auto &i:v)arr[i] = all[id+1];
return;
}
main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>N;
arr[0] = arr[N+1] = 1e9;
for(int i = 1;i<=N;i++)cin>>arr[i],all.push_back(arr[i]);
all.push_back(arr[0]);
sort(all.begin(),all.end());
all.erase(unique(all.begin(),all.end()),all.end());
int mx = 0;
for(int i = 1;i<=N;i++){
mx = max(arr[i],mx);
tar[i] = mx;
}
mx = 0;
for(int i = N;i>=1;i--){
mx = max(arr[i],mx);
tar[i] = min(tar[i],mx);
}
for(int i = 0;i+1<all.size();i++){
up(i);
}
cout<<ans%mod<<'\n';
return 0;
}
Compilation message
Main.cpp:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
58 | main(){
| ^~~~
Main.cpp: In function 'int main()':
Main.cpp:76:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int i = 0;i+1<all.size();i++){
| ~~~^~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
13 |
Correct |
4 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
4 ms |
2652 KB |
Output is correct |
17 |
Correct |
4 ms |
2656 KB |
Output is correct |
18 |
Correct |
4 ms |
2652 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
2 ms |
2660 KB |
Output is correct |
21 |
Correct |
2 ms |
2656 KB |
Output is correct |
22 |
Correct |
1 ms |
2652 KB |
Output is correct |
23 |
Correct |
3 ms |
2652 KB |
Output is correct |
24 |
Correct |
2 ms |
2652 KB |
Output is correct |
25 |
Correct |
2 ms |
2648 KB |
Output is correct |
26 |
Correct |
3 ms |
2652 KB |
Output is correct |
27 |
Correct |
2 ms |
2652 KB |
Output is correct |
28 |
Correct |
3 ms |
2648 KB |
Output is correct |
29 |
Correct |
1 ms |
2404 KB |
Output is correct |
30 |
Correct |
1 ms |
2392 KB |
Output is correct |
31 |
Correct |
1 ms |
2404 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2648 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
13 |
Correct |
4 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
4 ms |
2652 KB |
Output is correct |
17 |
Correct |
4 ms |
2656 KB |
Output is correct |
18 |
Correct |
4 ms |
2652 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
2 ms |
2660 KB |
Output is correct |
21 |
Correct |
2 ms |
2656 KB |
Output is correct |
22 |
Correct |
1 ms |
2652 KB |
Output is correct |
23 |
Correct |
3 ms |
2652 KB |
Output is correct |
24 |
Correct |
2 ms |
2652 KB |
Output is correct |
25 |
Correct |
2 ms |
2648 KB |
Output is correct |
26 |
Correct |
3 ms |
2652 KB |
Output is correct |
27 |
Correct |
2 ms |
2652 KB |
Output is correct |
28 |
Correct |
3 ms |
2648 KB |
Output is correct |
29 |
Correct |
1 ms |
2404 KB |
Output is correct |
30 |
Correct |
1 ms |
2392 KB |
Output is correct |
31 |
Correct |
1 ms |
2404 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2648 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
93 ms |
2680 KB |
Output is correct |
36 |
Correct |
98 ms |
2652 KB |
Output is correct |
37 |
Correct |
98 ms |
2948 KB |
Output is correct |
38 |
Correct |
106 ms |
2688 KB |
Output is correct |
39 |
Correct |
106 ms |
2696 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
2 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
53 ms |
2692 KB |
Output is correct |
44 |
Correct |
53 ms |
2676 KB |
Output is correct |
45 |
Correct |
53 ms |
2652 KB |
Output is correct |
46 |
Correct |
63 ms |
2676 KB |
Output is correct |
47 |
Correct |
61 ms |
2652 KB |
Output is correct |
48 |
Correct |
62 ms |
2652 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
13 |
Correct |
4 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
4 ms |
2652 KB |
Output is correct |
17 |
Correct |
4 ms |
2656 KB |
Output is correct |
18 |
Correct |
4 ms |
2652 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
2 ms |
2660 KB |
Output is correct |
21 |
Correct |
2 ms |
2656 KB |
Output is correct |
22 |
Correct |
1 ms |
2652 KB |
Output is correct |
23 |
Correct |
3 ms |
2652 KB |
Output is correct |
24 |
Correct |
2 ms |
2652 KB |
Output is correct |
25 |
Correct |
2 ms |
2648 KB |
Output is correct |
26 |
Correct |
3 ms |
2652 KB |
Output is correct |
27 |
Correct |
2 ms |
2652 KB |
Output is correct |
28 |
Correct |
3 ms |
2648 KB |
Output is correct |
29 |
Correct |
1 ms |
2404 KB |
Output is correct |
30 |
Correct |
1 ms |
2392 KB |
Output is correct |
31 |
Correct |
1 ms |
2404 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2648 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
93 ms |
2680 KB |
Output is correct |
36 |
Correct |
98 ms |
2652 KB |
Output is correct |
37 |
Correct |
98 ms |
2948 KB |
Output is correct |
38 |
Correct |
106 ms |
2688 KB |
Output is correct |
39 |
Correct |
106 ms |
2696 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
2 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
53 ms |
2692 KB |
Output is correct |
44 |
Correct |
53 ms |
2676 KB |
Output is correct |
45 |
Correct |
53 ms |
2652 KB |
Output is correct |
46 |
Correct |
63 ms |
2676 KB |
Output is correct |
47 |
Correct |
61 ms |
2652 KB |
Output is correct |
48 |
Correct |
62 ms |
2652 KB |
Output is correct |
49 |
Correct |
95 ms |
2648 KB |
Output is correct |
50 |
Correct |
97 ms |
2704 KB |
Output is correct |
51 |
Correct |
108 ms |
2648 KB |
Output is correct |
52 |
Correct |
95 ms |
2648 KB |
Output is correct |
53 |
Correct |
96 ms |
2708 KB |
Output is correct |
54 |
Correct |
1 ms |
2652 KB |
Output is correct |
55 |
Correct |
1 ms |
2652 KB |
Output is correct |
56 |
Correct |
1 ms |
2652 KB |
Output is correct |
57 |
Correct |
52 ms |
2652 KB |
Output is correct |
58 |
Correct |
53 ms |
2648 KB |
Output is correct |
59 |
Correct |
53 ms |
2936 KB |
Output is correct |
60 |
Correct |
64 ms |
2896 KB |
Output is correct |
61 |
Correct |
66 ms |
2696 KB |
Output is correct |
62 |
Correct |
63 ms |
2652 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
13 |
Correct |
4 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
4 ms |
2652 KB |
Output is correct |
17 |
Correct |
4 ms |
2656 KB |
Output is correct |
18 |
Correct |
4 ms |
2652 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
2 ms |
2660 KB |
Output is correct |
21 |
Correct |
2 ms |
2656 KB |
Output is correct |
22 |
Correct |
1 ms |
2652 KB |
Output is correct |
23 |
Correct |
3 ms |
2652 KB |
Output is correct |
24 |
Correct |
2 ms |
2652 KB |
Output is correct |
25 |
Correct |
2 ms |
2648 KB |
Output is correct |
26 |
Correct |
3 ms |
2652 KB |
Output is correct |
27 |
Correct |
2 ms |
2652 KB |
Output is correct |
28 |
Correct |
3 ms |
2648 KB |
Output is correct |
29 |
Correct |
1 ms |
2404 KB |
Output is correct |
30 |
Correct |
1 ms |
2392 KB |
Output is correct |
31 |
Correct |
1 ms |
2404 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2648 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
989 ms |
43060 KB |
Output is correct |
36 |
Correct |
1075 ms |
43196 KB |
Output is correct |
37 |
Correct |
941 ms |
43480 KB |
Output is correct |
38 |
Correct |
1090 ms |
42340 KB |
Output is correct |
39 |
Correct |
1035 ms |
43232 KB |
Output is correct |
40 |
Correct |
1 ms |
2396 KB |
Output is correct |
41 |
Correct |
1 ms |
2396 KB |
Output is correct |
42 |
Correct |
171 ms |
43300 KB |
Output is correct |
43 |
Correct |
181 ms |
44112 KB |
Output is correct |
44 |
Correct |
164 ms |
43404 KB |
Output is correct |
45 |
Correct |
519 ms |
43720 KB |
Output is correct |
46 |
Correct |
478 ms |
44324 KB |
Output is correct |
47 |
Correct |
552 ms |
43768 KB |
Output is correct |
48 |
Correct |
707 ms |
44376 KB |
Output is correct |
49 |
Correct |
660 ms |
43736 KB |
Output is correct |
50 |
Correct |
702 ms |
43784 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
13 |
Correct |
4 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
4 ms |
2652 KB |
Output is correct |
17 |
Correct |
4 ms |
2656 KB |
Output is correct |
18 |
Correct |
4 ms |
2652 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
2 ms |
2660 KB |
Output is correct |
21 |
Correct |
2 ms |
2656 KB |
Output is correct |
22 |
Correct |
1 ms |
2652 KB |
Output is correct |
23 |
Correct |
3 ms |
2652 KB |
Output is correct |
24 |
Correct |
2 ms |
2652 KB |
Output is correct |
25 |
Correct |
2 ms |
2648 KB |
Output is correct |
26 |
Correct |
3 ms |
2652 KB |
Output is correct |
27 |
Correct |
2 ms |
2652 KB |
Output is correct |
28 |
Correct |
3 ms |
2648 KB |
Output is correct |
29 |
Correct |
1 ms |
2404 KB |
Output is correct |
30 |
Correct |
1 ms |
2392 KB |
Output is correct |
31 |
Correct |
1 ms |
2404 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2648 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
93 ms |
2680 KB |
Output is correct |
36 |
Correct |
98 ms |
2652 KB |
Output is correct |
37 |
Correct |
98 ms |
2948 KB |
Output is correct |
38 |
Correct |
106 ms |
2688 KB |
Output is correct |
39 |
Correct |
106 ms |
2696 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
2 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
53 ms |
2692 KB |
Output is correct |
44 |
Correct |
53 ms |
2676 KB |
Output is correct |
45 |
Correct |
53 ms |
2652 KB |
Output is correct |
46 |
Correct |
63 ms |
2676 KB |
Output is correct |
47 |
Correct |
61 ms |
2652 KB |
Output is correct |
48 |
Correct |
62 ms |
2652 KB |
Output is correct |
49 |
Correct |
989 ms |
43060 KB |
Output is correct |
50 |
Correct |
1075 ms |
43196 KB |
Output is correct |
51 |
Correct |
941 ms |
43480 KB |
Output is correct |
52 |
Correct |
1090 ms |
42340 KB |
Output is correct |
53 |
Correct |
1035 ms |
43232 KB |
Output is correct |
54 |
Correct |
1 ms |
2396 KB |
Output is correct |
55 |
Correct |
1 ms |
2396 KB |
Output is correct |
56 |
Correct |
171 ms |
43300 KB |
Output is correct |
57 |
Correct |
181 ms |
44112 KB |
Output is correct |
58 |
Correct |
164 ms |
43404 KB |
Output is correct |
59 |
Correct |
519 ms |
43720 KB |
Output is correct |
60 |
Correct |
478 ms |
44324 KB |
Output is correct |
61 |
Correct |
552 ms |
43768 KB |
Output is correct |
62 |
Correct |
707 ms |
44376 KB |
Output is correct |
63 |
Correct |
660 ms |
43736 KB |
Output is correct |
64 |
Correct |
702 ms |
43784 KB |
Output is correct |
65 |
Execution timed out |
5039 ms |
30624 KB |
Time limit exceeded |
66 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
2 ms |
2484 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
2 ms |
2652 KB |
Output is correct |
5 |
Correct |
1 ms |
2652 KB |
Output is correct |
6 |
Correct |
1 ms |
2652 KB |
Output is correct |
7 |
Correct |
1 ms |
2652 KB |
Output is correct |
8 |
Correct |
1 ms |
2524 KB |
Output is correct |
9 |
Correct |
1 ms |
2532 KB |
Output is correct |
10 |
Correct |
1 ms |
2540 KB |
Output is correct |
11 |
Correct |
2 ms |
2656 KB |
Output is correct |
12 |
Correct |
2 ms |
2904 KB |
Output is correct |
13 |
Correct |
4 ms |
2652 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
4 ms |
2652 KB |
Output is correct |
17 |
Correct |
4 ms |
2656 KB |
Output is correct |
18 |
Correct |
4 ms |
2652 KB |
Output is correct |
19 |
Correct |
4 ms |
2688 KB |
Output is correct |
20 |
Correct |
2 ms |
2660 KB |
Output is correct |
21 |
Correct |
2 ms |
2656 KB |
Output is correct |
22 |
Correct |
1 ms |
2652 KB |
Output is correct |
23 |
Correct |
3 ms |
2652 KB |
Output is correct |
24 |
Correct |
2 ms |
2652 KB |
Output is correct |
25 |
Correct |
2 ms |
2648 KB |
Output is correct |
26 |
Correct |
3 ms |
2652 KB |
Output is correct |
27 |
Correct |
2 ms |
2652 KB |
Output is correct |
28 |
Correct |
3 ms |
2648 KB |
Output is correct |
29 |
Correct |
1 ms |
2404 KB |
Output is correct |
30 |
Correct |
1 ms |
2392 KB |
Output is correct |
31 |
Correct |
1 ms |
2404 KB |
Output is correct |
32 |
Correct |
1 ms |
2396 KB |
Output is correct |
33 |
Correct |
1 ms |
2648 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
93 ms |
2680 KB |
Output is correct |
36 |
Correct |
98 ms |
2652 KB |
Output is correct |
37 |
Correct |
98 ms |
2948 KB |
Output is correct |
38 |
Correct |
106 ms |
2688 KB |
Output is correct |
39 |
Correct |
106 ms |
2696 KB |
Output is correct |
40 |
Correct |
1 ms |
2648 KB |
Output is correct |
41 |
Correct |
2 ms |
2652 KB |
Output is correct |
42 |
Correct |
1 ms |
2652 KB |
Output is correct |
43 |
Correct |
53 ms |
2692 KB |
Output is correct |
44 |
Correct |
53 ms |
2676 KB |
Output is correct |
45 |
Correct |
53 ms |
2652 KB |
Output is correct |
46 |
Correct |
63 ms |
2676 KB |
Output is correct |
47 |
Correct |
61 ms |
2652 KB |
Output is correct |
48 |
Correct |
62 ms |
2652 KB |
Output is correct |
49 |
Correct |
95 ms |
2648 KB |
Output is correct |
50 |
Correct |
97 ms |
2704 KB |
Output is correct |
51 |
Correct |
108 ms |
2648 KB |
Output is correct |
52 |
Correct |
95 ms |
2648 KB |
Output is correct |
53 |
Correct |
96 ms |
2708 KB |
Output is correct |
54 |
Correct |
1 ms |
2652 KB |
Output is correct |
55 |
Correct |
1 ms |
2652 KB |
Output is correct |
56 |
Correct |
1 ms |
2652 KB |
Output is correct |
57 |
Correct |
52 ms |
2652 KB |
Output is correct |
58 |
Correct |
53 ms |
2648 KB |
Output is correct |
59 |
Correct |
53 ms |
2936 KB |
Output is correct |
60 |
Correct |
64 ms |
2896 KB |
Output is correct |
61 |
Correct |
66 ms |
2696 KB |
Output is correct |
62 |
Correct |
63 ms |
2652 KB |
Output is correct |
63 |
Correct |
989 ms |
43060 KB |
Output is correct |
64 |
Correct |
1075 ms |
43196 KB |
Output is correct |
65 |
Correct |
941 ms |
43480 KB |
Output is correct |
66 |
Correct |
1090 ms |
42340 KB |
Output is correct |
67 |
Correct |
1035 ms |
43232 KB |
Output is correct |
68 |
Correct |
1 ms |
2396 KB |
Output is correct |
69 |
Correct |
1 ms |
2396 KB |
Output is correct |
70 |
Correct |
171 ms |
43300 KB |
Output is correct |
71 |
Correct |
181 ms |
44112 KB |
Output is correct |
72 |
Correct |
164 ms |
43404 KB |
Output is correct |
73 |
Correct |
519 ms |
43720 KB |
Output is correct |
74 |
Correct |
478 ms |
44324 KB |
Output is correct |
75 |
Correct |
552 ms |
43768 KB |
Output is correct |
76 |
Correct |
707 ms |
44376 KB |
Output is correct |
77 |
Correct |
660 ms |
43736 KB |
Output is correct |
78 |
Correct |
702 ms |
43784 KB |
Output is correct |
79 |
Execution timed out |
5039 ms |
30624 KB |
Time limit exceeded |
80 |
Halted |
0 ms |
0 KB |
- |