#include "closing.h"
#include <bits/stdc++.h>
using ll = long long;
#define pb push_back
#define all(v) v.begin(), v.end()
const ll N = 3e5 + 10;
const ll INF = 1e18;
using namespace std;
ll n, s1, s2, k;
vector<pair<ll,ll> > g[N];
ll dist[N][2];
void dfs1(ll x,ll p,ll t){
for(auto [u, w] : g[x]){
if(u == p)continue;
dist[u][t] = dist[x][t] + w;
dfs1(u, x, t);
}
}
ll C[2][N];
bool path[N];
vector<ll> curr;
void dfs2(ll x,ll p){
curr.pb(x);
if(x == s2){
for(auto v : curr){
path[v] = true;
}
return;
}
for(auto [u, w] : g[x]){
if(u == p)continue;
dfs2(u, x);
}
curr.pop_back();
}
int max_score(int _n, int _x, int _y, long long _k,vector<int> u, vector<int> v, vector<int> w){
n = _n;
s1 = _x;
s2 = _y;
k = _k;
memset(path, 0, sizeof path);
memset(dist, 0, sizeof dist);
memset(C, 0, sizeof C);
for(int i = 0;i<n;i++)g[i].clear();
for(ll i = 0;i<u.size();i++){
g[u[i]].pb({v[i], w[i]});
g[v[i]].pb({u[i], w[i]});
}
curr.clear();
dfs1(s1, -1, 0);
//assert(0);
dfs1(s2, -1, 1);
for(ll i = 0;i<n;i++){
C[0][i] = min(dist[i][0], dist[i][1]);
C[1][i] = max(dist[i][0], dist[i][1]);
// cout<<i<<": "<<C[0][i]<<" "<<C[1][i]<<endl;
}
vector<ll> vc;
for(ll i = 0;i<n;i++)vc.pb(C[0][i]);
sort(all(vc));
ll sum = 0;
ll cnt = 0;
for(auto u : vc){
sum += u;
if(sum > k)break;
cnt++;
}
ll ans = cnt;
//return cnt;
//vector<ll> dp[2];
vector<ll> dp;
dp.resize(2 * n + 5, INF);
dfs2(s1, -1);
dp[0] = 0;
for(ll i = 0;i<n;i++){
// assert(0);
// cout<<path[i]<<" ";
vector<ll> ndp(2 * n + 5, INF);
// ndp.resize(2 * n + 5, INF);
for(ll j = 0;j<=2 * n;j++){
if(!path[i])ndp[j] = min(ndp[j], dp[j]);
ndp[j+1] = min(ndp[j+1], dp[j] + C[0][i]);
ndp[j+2] = min(ndp[j+2], dp[j] + C[1][i]);
}
swap(dp, ndp);
}
//cout<<endl;
// assert(0);
for(ll i = ans+1;i<dp.size();i++){
// cout<<dp[i]<<endl;
if(dp[i] <= k)ans = i;
}
return ans;
}
Compilation message
closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:59:19: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
59 | for(ll i = 0;i<u.size();i++){
| ~^~~~~~~~~
closing.cpp:112:23: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
112 | for(ll i = ans+1;i<dp.size();i++){
| ~^~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1049 ms |
46992 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
5 ms |
16988 KB |
Output is correct |
3 |
Correct |
3 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16984 KB |
Output is correct |
5 |
Correct |
3 ms |
16988 KB |
Output is correct |
6 |
Correct |
4 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
3 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
5 ms |
16988 KB |
Output is correct |
3 |
Correct |
3 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16984 KB |
Output is correct |
5 |
Correct |
3 ms |
16988 KB |
Output is correct |
6 |
Correct |
4 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
3 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
4 ms |
16988 KB |
Output is correct |
13 |
Correct |
3 ms |
16984 KB |
Output is correct |
14 |
Correct |
4 ms |
16984 KB |
Output is correct |
15 |
Correct |
4 ms |
16988 KB |
Output is correct |
16 |
Correct |
3 ms |
16988 KB |
Output is correct |
17 |
Correct |
4 ms |
16988 KB |
Output is correct |
18 |
Correct |
7 ms |
16988 KB |
Output is correct |
19 |
Correct |
5 ms |
17244 KB |
Output is correct |
20 |
Correct |
4 ms |
17244 KB |
Output is correct |
21 |
Correct |
5 ms |
17084 KB |
Output is correct |
22 |
Correct |
5 ms |
17240 KB |
Output is correct |
23 |
Correct |
5 ms |
17244 KB |
Output is correct |
24 |
Correct |
4 ms |
17244 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
5 ms |
16988 KB |
Output is correct |
3 |
Correct |
3 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16984 KB |
Output is correct |
5 |
Correct |
3 ms |
16988 KB |
Output is correct |
6 |
Correct |
4 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
3 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
4 ms |
16988 KB |
Output is correct |
13 |
Correct |
3 ms |
16984 KB |
Output is correct |
14 |
Correct |
4 ms |
16984 KB |
Output is correct |
15 |
Correct |
4 ms |
16988 KB |
Output is correct |
16 |
Correct |
3 ms |
16988 KB |
Output is correct |
17 |
Correct |
4 ms |
16988 KB |
Output is correct |
18 |
Correct |
7 ms |
16988 KB |
Output is correct |
19 |
Correct |
5 ms |
17244 KB |
Output is correct |
20 |
Correct |
4 ms |
17244 KB |
Output is correct |
21 |
Correct |
5 ms |
17084 KB |
Output is correct |
22 |
Correct |
5 ms |
17240 KB |
Output is correct |
23 |
Correct |
5 ms |
17244 KB |
Output is correct |
24 |
Correct |
4 ms |
17244 KB |
Output is correct |
25 |
Correct |
14 ms |
17256 KB |
Output is correct |
26 |
Correct |
44 ms |
17500 KB |
Output is correct |
27 |
Correct |
39 ms |
17496 KB |
Output is correct |
28 |
Correct |
30 ms |
17756 KB |
Output is correct |
29 |
Correct |
39 ms |
17500 KB |
Output is correct |
30 |
Correct |
37 ms |
17496 KB |
Output is correct |
31 |
Correct |
38 ms |
18000 KB |
Output is correct |
32 |
Correct |
34 ms |
17752 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
3 ms |
16984 KB |
Output is correct |
3 |
Correct |
5 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16988 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
3 ms |
16988 KB |
Output is correct |
7 |
Correct |
3 ms |
16988 KB |
Output is correct |
8 |
Correct |
3 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
3 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
4 ms |
16988 KB |
Output is correct |
13 |
Correct |
3 ms |
16984 KB |
Output is correct |
14 |
Correct |
4 ms |
16988 KB |
Output is correct |
15 |
Correct |
4 ms |
17160 KB |
Output is correct |
16 |
Correct |
3 ms |
16984 KB |
Output is correct |
17 |
Correct |
3 ms |
16988 KB |
Output is correct |
18 |
Correct |
3 ms |
16988 KB |
Output is correct |
19 |
Correct |
3 ms |
16988 KB |
Output is correct |
20 |
Correct |
3 ms |
16984 KB |
Output is correct |
21 |
Correct |
3 ms |
16988 KB |
Output is correct |
22 |
Correct |
3 ms |
17068 KB |
Output is correct |
23 |
Correct |
3 ms |
16988 KB |
Output is correct |
24 |
Correct |
3 ms |
16988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
3 ms |
16984 KB |
Output is correct |
3 |
Correct |
5 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16988 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
3 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
4 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
3 ms |
16988 KB |
Output is correct |
13 |
Correct |
4 ms |
16988 KB |
Output is correct |
14 |
Correct |
3 ms |
16984 KB |
Output is correct |
15 |
Correct |
4 ms |
16984 KB |
Output is correct |
16 |
Correct |
4 ms |
16988 KB |
Output is correct |
17 |
Correct |
3 ms |
16988 KB |
Output is correct |
18 |
Correct |
4 ms |
16988 KB |
Output is correct |
19 |
Correct |
3 ms |
16988 KB |
Output is correct |
20 |
Correct |
3 ms |
16988 KB |
Output is correct |
21 |
Correct |
4 ms |
16988 KB |
Output is correct |
22 |
Correct |
3 ms |
16988 KB |
Output is correct |
23 |
Correct |
3 ms |
16988 KB |
Output is correct |
24 |
Correct |
4 ms |
16988 KB |
Output is correct |
25 |
Correct |
3 ms |
16984 KB |
Output is correct |
26 |
Correct |
4 ms |
16988 KB |
Output is correct |
27 |
Correct |
4 ms |
17160 KB |
Output is correct |
28 |
Correct |
3 ms |
16984 KB |
Output is correct |
29 |
Correct |
3 ms |
16988 KB |
Output is correct |
30 |
Correct |
3 ms |
16988 KB |
Output is correct |
31 |
Correct |
3 ms |
16988 KB |
Output is correct |
32 |
Correct |
3 ms |
16984 KB |
Output is correct |
33 |
Correct |
3 ms |
16988 KB |
Output is correct |
34 |
Correct |
3 ms |
17068 KB |
Output is correct |
35 |
Correct |
3 ms |
16988 KB |
Output is correct |
36 |
Correct |
3 ms |
16988 KB |
Output is correct |
37 |
Correct |
6 ms |
16988 KB |
Output is correct |
38 |
Correct |
5 ms |
16988 KB |
Output is correct |
39 |
Correct |
3 ms |
16988 KB |
Output is correct |
40 |
Correct |
3 ms |
16992 KB |
Output is correct |
41 |
Correct |
4 ms |
16988 KB |
Output is correct |
42 |
Correct |
4 ms |
16988 KB |
Output is correct |
43 |
Correct |
4 ms |
16984 KB |
Output is correct |
44 |
Correct |
4 ms |
16988 KB |
Output is correct |
45 |
Correct |
3 ms |
16988 KB |
Output is correct |
46 |
Correct |
3 ms |
16988 KB |
Output is correct |
47 |
Correct |
3 ms |
16988 KB |
Output is correct |
48 |
Correct |
3 ms |
16988 KB |
Output is correct |
49 |
Correct |
4 ms |
16988 KB |
Output is correct |
50 |
Correct |
4 ms |
16988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
3 ms |
16984 KB |
Output is correct |
3 |
Correct |
5 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16988 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
3 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
4 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
3 ms |
16988 KB |
Output is correct |
13 |
Correct |
4 ms |
16988 KB |
Output is correct |
14 |
Correct |
3 ms |
16984 KB |
Output is correct |
15 |
Correct |
4 ms |
16984 KB |
Output is correct |
16 |
Correct |
4 ms |
16988 KB |
Output is correct |
17 |
Correct |
3 ms |
16988 KB |
Output is correct |
18 |
Correct |
4 ms |
16988 KB |
Output is correct |
19 |
Correct |
7 ms |
16988 KB |
Output is correct |
20 |
Correct |
5 ms |
17244 KB |
Output is correct |
21 |
Correct |
4 ms |
17244 KB |
Output is correct |
22 |
Correct |
5 ms |
17084 KB |
Output is correct |
23 |
Correct |
5 ms |
17240 KB |
Output is correct |
24 |
Correct |
5 ms |
17244 KB |
Output is correct |
25 |
Correct |
4 ms |
17244 KB |
Output is correct |
26 |
Correct |
3 ms |
16988 KB |
Output is correct |
27 |
Correct |
3 ms |
16988 KB |
Output is correct |
28 |
Correct |
4 ms |
16988 KB |
Output is correct |
29 |
Correct |
3 ms |
16988 KB |
Output is correct |
30 |
Correct |
3 ms |
16988 KB |
Output is correct |
31 |
Correct |
4 ms |
16988 KB |
Output is correct |
32 |
Correct |
3 ms |
16984 KB |
Output is correct |
33 |
Correct |
4 ms |
16988 KB |
Output is correct |
34 |
Correct |
4 ms |
17160 KB |
Output is correct |
35 |
Correct |
3 ms |
16984 KB |
Output is correct |
36 |
Correct |
3 ms |
16988 KB |
Output is correct |
37 |
Correct |
3 ms |
16988 KB |
Output is correct |
38 |
Correct |
3 ms |
16988 KB |
Output is correct |
39 |
Correct |
3 ms |
16984 KB |
Output is correct |
40 |
Correct |
3 ms |
16988 KB |
Output is correct |
41 |
Correct |
3 ms |
17068 KB |
Output is correct |
42 |
Correct |
3 ms |
16988 KB |
Output is correct |
43 |
Correct |
3 ms |
16988 KB |
Output is correct |
44 |
Correct |
6 ms |
16988 KB |
Output is correct |
45 |
Correct |
5 ms |
16988 KB |
Output is correct |
46 |
Correct |
3 ms |
16988 KB |
Output is correct |
47 |
Correct |
3 ms |
16992 KB |
Output is correct |
48 |
Correct |
4 ms |
16988 KB |
Output is correct |
49 |
Correct |
4 ms |
16988 KB |
Output is correct |
50 |
Correct |
4 ms |
16984 KB |
Output is correct |
51 |
Correct |
4 ms |
16988 KB |
Output is correct |
52 |
Correct |
3 ms |
16988 KB |
Output is correct |
53 |
Correct |
3 ms |
16988 KB |
Output is correct |
54 |
Correct |
3 ms |
16988 KB |
Output is correct |
55 |
Correct |
3 ms |
16988 KB |
Output is correct |
56 |
Correct |
4 ms |
16988 KB |
Output is correct |
57 |
Correct |
4 ms |
16988 KB |
Output is correct |
58 |
Correct |
7 ms |
16984 KB |
Output is correct |
59 |
Correct |
5 ms |
16988 KB |
Output is correct |
60 |
Correct |
4 ms |
16988 KB |
Output is correct |
61 |
Correct |
4 ms |
16988 KB |
Output is correct |
62 |
Correct |
5 ms |
16984 KB |
Output is correct |
63 |
Correct |
5 ms |
16988 KB |
Output is correct |
64 |
Correct |
4 ms |
16988 KB |
Output is correct |
65 |
Correct |
4 ms |
16988 KB |
Output is correct |
66 |
Correct |
4 ms |
16988 KB |
Output is correct |
67 |
Correct |
5 ms |
16988 KB |
Output is correct |
68 |
Correct |
5 ms |
17084 KB |
Output is correct |
69 |
Correct |
4 ms |
17244 KB |
Output is correct |
70 |
Correct |
5 ms |
17244 KB |
Output is correct |
71 |
Correct |
5 ms |
17244 KB |
Output is correct |
72 |
Correct |
4 ms |
16988 KB |
Output is correct |
73 |
Correct |
4 ms |
16988 KB |
Output is correct |
74 |
Correct |
5 ms |
16988 KB |
Output is correct |
75 |
Correct |
5 ms |
16988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
3 ms |
16984 KB |
Output is correct |
3 |
Correct |
5 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16988 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
3 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
4 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
3 ms |
16988 KB |
Output is correct |
13 |
Correct |
4 ms |
16988 KB |
Output is correct |
14 |
Correct |
3 ms |
16984 KB |
Output is correct |
15 |
Correct |
4 ms |
16984 KB |
Output is correct |
16 |
Correct |
4 ms |
16988 KB |
Output is correct |
17 |
Correct |
3 ms |
16988 KB |
Output is correct |
18 |
Correct |
4 ms |
16988 KB |
Output is correct |
19 |
Correct |
7 ms |
16988 KB |
Output is correct |
20 |
Correct |
5 ms |
17244 KB |
Output is correct |
21 |
Correct |
4 ms |
17244 KB |
Output is correct |
22 |
Correct |
5 ms |
17084 KB |
Output is correct |
23 |
Correct |
5 ms |
17240 KB |
Output is correct |
24 |
Correct |
5 ms |
17244 KB |
Output is correct |
25 |
Correct |
4 ms |
17244 KB |
Output is correct |
26 |
Correct |
14 ms |
17256 KB |
Output is correct |
27 |
Correct |
44 ms |
17500 KB |
Output is correct |
28 |
Correct |
39 ms |
17496 KB |
Output is correct |
29 |
Correct |
30 ms |
17756 KB |
Output is correct |
30 |
Correct |
39 ms |
17500 KB |
Output is correct |
31 |
Correct |
37 ms |
17496 KB |
Output is correct |
32 |
Correct |
38 ms |
18000 KB |
Output is correct |
33 |
Correct |
34 ms |
17752 KB |
Output is correct |
34 |
Correct |
3 ms |
16988 KB |
Output is correct |
35 |
Correct |
3 ms |
16988 KB |
Output is correct |
36 |
Correct |
4 ms |
16988 KB |
Output is correct |
37 |
Correct |
3 ms |
16988 KB |
Output is correct |
38 |
Correct |
3 ms |
16988 KB |
Output is correct |
39 |
Correct |
4 ms |
16988 KB |
Output is correct |
40 |
Correct |
3 ms |
16984 KB |
Output is correct |
41 |
Correct |
4 ms |
16988 KB |
Output is correct |
42 |
Correct |
4 ms |
17160 KB |
Output is correct |
43 |
Correct |
3 ms |
16984 KB |
Output is correct |
44 |
Correct |
3 ms |
16988 KB |
Output is correct |
45 |
Correct |
3 ms |
16988 KB |
Output is correct |
46 |
Correct |
3 ms |
16988 KB |
Output is correct |
47 |
Correct |
3 ms |
16984 KB |
Output is correct |
48 |
Correct |
3 ms |
16988 KB |
Output is correct |
49 |
Correct |
3 ms |
17068 KB |
Output is correct |
50 |
Correct |
3 ms |
16988 KB |
Output is correct |
51 |
Correct |
3 ms |
16988 KB |
Output is correct |
52 |
Correct |
6 ms |
16988 KB |
Output is correct |
53 |
Correct |
5 ms |
16988 KB |
Output is correct |
54 |
Correct |
3 ms |
16988 KB |
Output is correct |
55 |
Correct |
3 ms |
16992 KB |
Output is correct |
56 |
Correct |
4 ms |
16988 KB |
Output is correct |
57 |
Correct |
4 ms |
16988 KB |
Output is correct |
58 |
Correct |
4 ms |
16984 KB |
Output is correct |
59 |
Correct |
4 ms |
16988 KB |
Output is correct |
60 |
Correct |
3 ms |
16988 KB |
Output is correct |
61 |
Correct |
3 ms |
16988 KB |
Output is correct |
62 |
Correct |
3 ms |
16988 KB |
Output is correct |
63 |
Correct |
3 ms |
16988 KB |
Output is correct |
64 |
Correct |
4 ms |
16988 KB |
Output is correct |
65 |
Correct |
4 ms |
16988 KB |
Output is correct |
66 |
Correct |
7 ms |
16984 KB |
Output is correct |
67 |
Correct |
5 ms |
16988 KB |
Output is correct |
68 |
Correct |
4 ms |
16988 KB |
Output is correct |
69 |
Correct |
4 ms |
16988 KB |
Output is correct |
70 |
Correct |
5 ms |
16984 KB |
Output is correct |
71 |
Correct |
5 ms |
16988 KB |
Output is correct |
72 |
Correct |
4 ms |
16988 KB |
Output is correct |
73 |
Correct |
4 ms |
16988 KB |
Output is correct |
74 |
Correct |
4 ms |
16988 KB |
Output is correct |
75 |
Correct |
5 ms |
16988 KB |
Output is correct |
76 |
Correct |
5 ms |
17084 KB |
Output is correct |
77 |
Correct |
4 ms |
17244 KB |
Output is correct |
78 |
Correct |
5 ms |
17244 KB |
Output is correct |
79 |
Correct |
5 ms |
17244 KB |
Output is correct |
80 |
Correct |
4 ms |
16988 KB |
Output is correct |
81 |
Correct |
4 ms |
16988 KB |
Output is correct |
82 |
Correct |
5 ms |
16988 KB |
Output is correct |
83 |
Correct |
5 ms |
16988 KB |
Output is correct |
84 |
Correct |
17 ms |
17244 KB |
Output is correct |
85 |
Correct |
10 ms |
17244 KB |
Output is correct |
86 |
Correct |
10 ms |
17240 KB |
Output is correct |
87 |
Correct |
10 ms |
17260 KB |
Output is correct |
88 |
Correct |
12 ms |
17240 KB |
Output is correct |
89 |
Correct |
45 ms |
17584 KB |
Output is correct |
90 |
Correct |
37 ms |
17496 KB |
Output is correct |
91 |
Correct |
45 ms |
17696 KB |
Output is correct |
92 |
Correct |
39 ms |
17500 KB |
Output is correct |
93 |
Correct |
43 ms |
17500 KB |
Output is correct |
94 |
Correct |
34 ms |
17500 KB |
Output is correct |
95 |
Correct |
37 ms |
18000 KB |
Output is correct |
96 |
Correct |
34 ms |
17752 KB |
Output is correct |
97 |
Correct |
39 ms |
17592 KB |
Output is correct |
98 |
Correct |
42 ms |
17560 KB |
Output is correct |
99 |
Correct |
44 ms |
17500 KB |
Output is correct |
100 |
Correct |
27 ms |
17244 KB |
Output is correct |
101 |
Correct |
11 ms |
17240 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
16984 KB |
Output is correct |
2 |
Correct |
3 ms |
16984 KB |
Output is correct |
3 |
Correct |
5 ms |
16988 KB |
Output is correct |
4 |
Correct |
3 ms |
16988 KB |
Output is correct |
5 |
Correct |
3 ms |
16984 KB |
Output is correct |
6 |
Correct |
3 ms |
16988 KB |
Output is correct |
7 |
Correct |
4 ms |
16988 KB |
Output is correct |
8 |
Correct |
4 ms |
16988 KB |
Output is correct |
9 |
Correct |
4 ms |
16988 KB |
Output is correct |
10 |
Correct |
4 ms |
16988 KB |
Output is correct |
11 |
Correct |
3 ms |
16988 KB |
Output is correct |
12 |
Correct |
3 ms |
16988 KB |
Output is correct |
13 |
Correct |
4 ms |
16988 KB |
Output is correct |
14 |
Correct |
3 ms |
16984 KB |
Output is correct |
15 |
Correct |
4 ms |
16984 KB |
Output is correct |
16 |
Correct |
4 ms |
16988 KB |
Output is correct |
17 |
Correct |
3 ms |
16988 KB |
Output is correct |
18 |
Correct |
4 ms |
16988 KB |
Output is correct |
19 |
Correct |
7 ms |
16988 KB |
Output is correct |
20 |
Correct |
5 ms |
17244 KB |
Output is correct |
21 |
Correct |
4 ms |
17244 KB |
Output is correct |
22 |
Correct |
5 ms |
17084 KB |
Output is correct |
23 |
Correct |
5 ms |
17240 KB |
Output is correct |
24 |
Correct |
5 ms |
17244 KB |
Output is correct |
25 |
Correct |
4 ms |
17244 KB |
Output is correct |
26 |
Correct |
14 ms |
17256 KB |
Output is correct |
27 |
Correct |
44 ms |
17500 KB |
Output is correct |
28 |
Correct |
39 ms |
17496 KB |
Output is correct |
29 |
Correct |
30 ms |
17756 KB |
Output is correct |
30 |
Correct |
39 ms |
17500 KB |
Output is correct |
31 |
Correct |
37 ms |
17496 KB |
Output is correct |
32 |
Correct |
38 ms |
18000 KB |
Output is correct |
33 |
Correct |
34 ms |
17752 KB |
Output is correct |
34 |
Correct |
3 ms |
16988 KB |
Output is correct |
35 |
Correct |
3 ms |
16988 KB |
Output is correct |
36 |
Correct |
4 ms |
16988 KB |
Output is correct |
37 |
Correct |
3 ms |
16988 KB |
Output is correct |
38 |
Correct |
3 ms |
16988 KB |
Output is correct |
39 |
Correct |
4 ms |
16988 KB |
Output is correct |
40 |
Correct |
3 ms |
16984 KB |
Output is correct |
41 |
Correct |
4 ms |
16988 KB |
Output is correct |
42 |
Correct |
4 ms |
17160 KB |
Output is correct |
43 |
Correct |
3 ms |
16984 KB |
Output is correct |
44 |
Correct |
3 ms |
16988 KB |
Output is correct |
45 |
Correct |
3 ms |
16988 KB |
Output is correct |
46 |
Correct |
3 ms |
16988 KB |
Output is correct |
47 |
Correct |
3 ms |
16984 KB |
Output is correct |
48 |
Correct |
3 ms |
16988 KB |
Output is correct |
49 |
Correct |
3 ms |
17068 KB |
Output is correct |
50 |
Correct |
3 ms |
16988 KB |
Output is correct |
51 |
Correct |
3 ms |
16988 KB |
Output is correct |
52 |
Correct |
6 ms |
16988 KB |
Output is correct |
53 |
Correct |
5 ms |
16988 KB |
Output is correct |
54 |
Correct |
3 ms |
16988 KB |
Output is correct |
55 |
Correct |
3 ms |
16992 KB |
Output is correct |
56 |
Correct |
4 ms |
16988 KB |
Output is correct |
57 |
Correct |
4 ms |
16988 KB |
Output is correct |
58 |
Correct |
4 ms |
16984 KB |
Output is correct |
59 |
Correct |
4 ms |
16988 KB |
Output is correct |
60 |
Correct |
3 ms |
16988 KB |
Output is correct |
61 |
Correct |
3 ms |
16988 KB |
Output is correct |
62 |
Correct |
3 ms |
16988 KB |
Output is correct |
63 |
Correct |
3 ms |
16988 KB |
Output is correct |
64 |
Correct |
4 ms |
16988 KB |
Output is correct |
65 |
Correct |
4 ms |
16988 KB |
Output is correct |
66 |
Correct |
7 ms |
16984 KB |
Output is correct |
67 |
Correct |
5 ms |
16988 KB |
Output is correct |
68 |
Correct |
4 ms |
16988 KB |
Output is correct |
69 |
Correct |
4 ms |
16988 KB |
Output is correct |
70 |
Correct |
5 ms |
16984 KB |
Output is correct |
71 |
Correct |
5 ms |
16988 KB |
Output is correct |
72 |
Correct |
4 ms |
16988 KB |
Output is correct |
73 |
Correct |
4 ms |
16988 KB |
Output is correct |
74 |
Correct |
4 ms |
16988 KB |
Output is correct |
75 |
Correct |
5 ms |
16988 KB |
Output is correct |
76 |
Correct |
5 ms |
17084 KB |
Output is correct |
77 |
Correct |
4 ms |
17244 KB |
Output is correct |
78 |
Correct |
5 ms |
17244 KB |
Output is correct |
79 |
Correct |
5 ms |
17244 KB |
Output is correct |
80 |
Correct |
4 ms |
16988 KB |
Output is correct |
81 |
Correct |
4 ms |
16988 KB |
Output is correct |
82 |
Correct |
5 ms |
16988 KB |
Output is correct |
83 |
Correct |
5 ms |
16988 KB |
Output is correct |
84 |
Correct |
17 ms |
17244 KB |
Output is correct |
85 |
Correct |
10 ms |
17244 KB |
Output is correct |
86 |
Correct |
10 ms |
17240 KB |
Output is correct |
87 |
Correct |
10 ms |
17260 KB |
Output is correct |
88 |
Correct |
12 ms |
17240 KB |
Output is correct |
89 |
Correct |
45 ms |
17584 KB |
Output is correct |
90 |
Correct |
37 ms |
17496 KB |
Output is correct |
91 |
Correct |
45 ms |
17696 KB |
Output is correct |
92 |
Correct |
39 ms |
17500 KB |
Output is correct |
93 |
Correct |
43 ms |
17500 KB |
Output is correct |
94 |
Correct |
34 ms |
17500 KB |
Output is correct |
95 |
Correct |
37 ms |
18000 KB |
Output is correct |
96 |
Correct |
34 ms |
17752 KB |
Output is correct |
97 |
Correct |
39 ms |
17592 KB |
Output is correct |
98 |
Correct |
42 ms |
17560 KB |
Output is correct |
99 |
Correct |
44 ms |
17500 KB |
Output is correct |
100 |
Correct |
27 ms |
17244 KB |
Output is correct |
101 |
Correct |
11 ms |
17240 KB |
Output is correct |
102 |
Correct |
524 ms |
22336 KB |
Output is correct |
103 |
Correct |
549 ms |
22444 KB |
Output is correct |
104 |
Execution timed out |
1043 ms |
53664 KB |
Time limit exceeded |
105 |
Halted |
0 ms |
0 KB |
- |