#include "closing.h"
#include<bits/stdc++.h>
#include <vector>
using namespace std;
long long n,x,y,k;
vector<pair<long long,long long>> haha[200001];
vector<long long> bruh(200001);
vector<long long> wow(200001);
void dfs(long long a, long long t, long long d, bool yeah) {
if(yeah) {
bruh[a] = d;
}
else {
wow[a] = d;
}
for(pair<long long,long long> v: haha[a]) {
if(v.first != t) {
dfs(v.first,a,d+v.second,yeah);
}
}
}
bool dude(long long a, long long t) {
if(a == y) {
if(bruh[a] < wow[a]) {
k-=bruh[a];
wow[a]-=bruh[a];
bruh[a] = 0;
}
else {
k-=wow[a];
bruh[a]-=wow[a];
wow[a] = 0;
}
return true;
}
for(pair<long long,long long> v: haha[a]) {
if(v.first != t) {
if(dude(v.first,a)) {
if(bruh[a] < wow[a]) {
k-=bruh[a];
wow[a]-=bruh[a];
bruh[a] = 0;
}
else {
k-=wow[a];
bruh[a]-=wow[a];
wow[a] = 0;
}
return true;
}
}
}
return false;
}
int max_score(int N, int X, int Y, long long K, std::vector<int> U, std::vector<int> V, std::vector<int> W) {
n = N;
x = X;
y = Y;
k = K;
for(int i = 0; i < n; i++) {
haha[i].clear();
}
for(long long i = 0; i < n-1; i++) {
haha[U[i]].push_back({V[i],W[i]});
haha[V[i]].push_back({U[i],W[i]});
}
long long ans = 0;
dfs(x,-1,0,true);
dfs(y,-1,0,false);
vector<long long> wut(n);
for(long long i = 0; i < n; i++) {
wut[i] = min(bruh[i],wow[i]);
}
sort(wut.begin(),wut.end());
long long sb = 0;
for(long long i = 0; i < wut.size(); i++) {
sb+=wut[i];
if(sb > k) {
break;
}
ans++;
}
dude(x,-1);
if(k < 0) {
return ans;
}
vector<long long> dp(2*n+1,LLONG_MAX/3);
dp[0] = 0;
for(long long i = 0; i < n; i++) {
long long a = bruh[i],b = wow[i];
if(a > b) {
swap(a,b);
}
for(int j = 2*n; j >= 0; j--) {
if(j > 0) {
dp[j] = min(dp[j],dp[j-1]+a);
}
if(j > 1) {
dp[j] = min(dp[j],dp[j-2]+b);
}
}
}
for(long long i = 0; i <= 2*n; i++) {
if(dp[i] <= k) {
ans = max(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:80:28: 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]
80 | for(long long i = 0; i < wut.size(); i++) {
| ~~^~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
107 ms |
29008 KB |
Output is correct |
2 |
Correct |
108 ms |
33912 KB |
Output is correct |
3 |
Correct |
49 ms |
10832 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
8024 KB |
Output is correct |
2 |
Correct |
2 ms |
8028 KB |
Output is correct |
3 |
Correct |
2 ms |
8276 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
3 ms |
8028 KB |
Output is correct |
8 |
Correct |
3 ms |
8280 KB |
Output is correct |
9 |
Correct |
2 ms |
8284 KB |
Output is correct |
10 |
Correct |
2 ms |
8028 KB |
Output is correct |
11 |
Correct |
2 ms |
8284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
8024 KB |
Output is correct |
2 |
Correct |
2 ms |
8028 KB |
Output is correct |
3 |
Correct |
2 ms |
8276 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
3 ms |
8028 KB |
Output is correct |
8 |
Correct |
3 ms |
8280 KB |
Output is correct |
9 |
Correct |
2 ms |
8284 KB |
Output is correct |
10 |
Correct |
2 ms |
8028 KB |
Output is correct |
11 |
Correct |
2 ms |
8284 KB |
Output is correct |
12 |
Correct |
2 ms |
8280 KB |
Output is correct |
13 |
Correct |
2 ms |
8196 KB |
Output is correct |
14 |
Correct |
3 ms |
8284 KB |
Output is correct |
15 |
Correct |
2 ms |
8284 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
4 ms |
8280 KB |
Output is correct |
18 |
Correct |
4 ms |
8284 KB |
Output is correct |
19 |
Correct |
3 ms |
8284 KB |
Output is correct |
20 |
Correct |
3 ms |
8284 KB |
Output is correct |
21 |
Correct |
3 ms |
8284 KB |
Output is correct |
22 |
Correct |
2 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
3 ms |
8284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
8024 KB |
Output is correct |
2 |
Correct |
2 ms |
8028 KB |
Output is correct |
3 |
Correct |
2 ms |
8276 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
3 ms |
8028 KB |
Output is correct |
8 |
Correct |
3 ms |
8280 KB |
Output is correct |
9 |
Correct |
2 ms |
8284 KB |
Output is correct |
10 |
Correct |
2 ms |
8028 KB |
Output is correct |
11 |
Correct |
2 ms |
8284 KB |
Output is correct |
12 |
Correct |
2 ms |
8280 KB |
Output is correct |
13 |
Correct |
2 ms |
8196 KB |
Output is correct |
14 |
Correct |
3 ms |
8284 KB |
Output is correct |
15 |
Correct |
2 ms |
8284 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
4 ms |
8280 KB |
Output is correct |
18 |
Correct |
4 ms |
8284 KB |
Output is correct |
19 |
Correct |
3 ms |
8284 KB |
Output is correct |
20 |
Correct |
3 ms |
8284 KB |
Output is correct |
21 |
Correct |
3 ms |
8284 KB |
Output is correct |
22 |
Correct |
2 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
3 ms |
8284 KB |
Output is correct |
25 |
Correct |
3 ms |
8284 KB |
Output is correct |
26 |
Correct |
24 ms |
8732 KB |
Output is correct |
27 |
Correct |
21 ms |
8540 KB |
Output is correct |
28 |
Correct |
22 ms |
8540 KB |
Output is correct |
29 |
Correct |
26 ms |
8552 KB |
Output is correct |
30 |
Correct |
4 ms |
8540 KB |
Output is correct |
31 |
Correct |
3 ms |
8544 KB |
Output is correct |
32 |
Correct |
3 ms |
8536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8024 KB |
Output is correct |
3 |
Correct |
2 ms |
8028 KB |
Output is correct |
4 |
Correct |
2 ms |
8276 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
2 ms |
8284 KB |
Output is correct |
8 |
Correct |
2 ms |
8284 KB |
Output is correct |
9 |
Correct |
2 ms |
8284 KB |
Output is correct |
10 |
Correct |
3 ms |
8028 KB |
Output is correct |
11 |
Correct |
2 ms |
8028 KB |
Output is correct |
12 |
Correct |
2 ms |
8280 KB |
Output is correct |
13 |
Correct |
2 ms |
8280 KB |
Output is correct |
14 |
Correct |
3 ms |
8280 KB |
Output is correct |
15 |
Correct |
2 ms |
8028 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
2 ms |
8280 KB |
Output is correct |
18 |
Correct |
2 ms |
8028 KB |
Output is correct |
19 |
Correct |
2 ms |
8288 KB |
Output is correct |
20 |
Correct |
2 ms |
8284 KB |
Output is correct |
21 |
Correct |
3 ms |
8284 KB |
Output is correct |
22 |
Correct |
2 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
3 ms |
8280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8024 KB |
Output is correct |
3 |
Correct |
2 ms |
8028 KB |
Output is correct |
4 |
Correct |
2 ms |
8276 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
2 ms |
8284 KB |
Output is correct |
8 |
Correct |
3 ms |
8028 KB |
Output is correct |
9 |
Correct |
3 ms |
8280 KB |
Output is correct |
10 |
Correct |
2 ms |
8284 KB |
Output is correct |
11 |
Correct |
2 ms |
8028 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8280 KB |
Output is correct |
14 |
Correct |
2 ms |
8196 KB |
Output is correct |
15 |
Correct |
3 ms |
8284 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
4 ms |
8280 KB |
Output is correct |
19 |
Correct |
2 ms |
8284 KB |
Output is correct |
20 |
Correct |
2 ms |
8284 KB |
Output is correct |
21 |
Correct |
2 ms |
8284 KB |
Output is correct |
22 |
Correct |
3 ms |
8028 KB |
Output is correct |
23 |
Correct |
2 ms |
8028 KB |
Output is correct |
24 |
Correct |
2 ms |
8280 KB |
Output is correct |
25 |
Correct |
2 ms |
8280 KB |
Output is correct |
26 |
Correct |
3 ms |
8280 KB |
Output is correct |
27 |
Correct |
2 ms |
8028 KB |
Output is correct |
28 |
Correct |
2 ms |
8284 KB |
Output is correct |
29 |
Correct |
2 ms |
8280 KB |
Output is correct |
30 |
Correct |
2 ms |
8028 KB |
Output is correct |
31 |
Correct |
2 ms |
8288 KB |
Output is correct |
32 |
Correct |
2 ms |
8284 KB |
Output is correct |
33 |
Correct |
3 ms |
8284 KB |
Output is correct |
34 |
Correct |
2 ms |
8284 KB |
Output is correct |
35 |
Correct |
2 ms |
8284 KB |
Output is correct |
36 |
Correct |
3 ms |
8280 KB |
Output is correct |
37 |
Correct |
2 ms |
8284 KB |
Output is correct |
38 |
Correct |
3 ms |
8284 KB |
Output is correct |
39 |
Correct |
2 ms |
8284 KB |
Output is correct |
40 |
Correct |
2 ms |
8040 KB |
Output is correct |
41 |
Correct |
2 ms |
8284 KB |
Output is correct |
42 |
Correct |
2 ms |
8284 KB |
Output is correct |
43 |
Correct |
2 ms |
8284 KB |
Output is correct |
44 |
Correct |
3 ms |
8284 KB |
Output is correct |
45 |
Correct |
2 ms |
8284 KB |
Output is correct |
46 |
Correct |
2 ms |
8284 KB |
Output is correct |
47 |
Correct |
2 ms |
8028 KB |
Output is correct |
48 |
Correct |
3 ms |
8284 KB |
Output is correct |
49 |
Correct |
2 ms |
8284 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8024 KB |
Output is correct |
3 |
Correct |
2 ms |
8028 KB |
Output is correct |
4 |
Correct |
2 ms |
8276 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
2 ms |
8284 KB |
Output is correct |
8 |
Correct |
3 ms |
8028 KB |
Output is correct |
9 |
Correct |
3 ms |
8280 KB |
Output is correct |
10 |
Correct |
2 ms |
8284 KB |
Output is correct |
11 |
Correct |
2 ms |
8028 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8280 KB |
Output is correct |
14 |
Correct |
2 ms |
8196 KB |
Output is correct |
15 |
Correct |
3 ms |
8284 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
4 ms |
8280 KB |
Output is correct |
19 |
Correct |
4 ms |
8284 KB |
Output is correct |
20 |
Correct |
3 ms |
8284 KB |
Output is correct |
21 |
Correct |
3 ms |
8284 KB |
Output is correct |
22 |
Correct |
3 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
2 ms |
8284 KB |
Output is correct |
25 |
Correct |
3 ms |
8284 KB |
Output is correct |
26 |
Correct |
2 ms |
8284 KB |
Output is correct |
27 |
Correct |
2 ms |
8284 KB |
Output is correct |
28 |
Correct |
2 ms |
8284 KB |
Output is correct |
29 |
Correct |
3 ms |
8028 KB |
Output is correct |
30 |
Correct |
2 ms |
8028 KB |
Output is correct |
31 |
Correct |
2 ms |
8280 KB |
Output is correct |
32 |
Correct |
2 ms |
8280 KB |
Output is correct |
33 |
Correct |
3 ms |
8280 KB |
Output is correct |
34 |
Correct |
2 ms |
8028 KB |
Output is correct |
35 |
Correct |
2 ms |
8284 KB |
Output is correct |
36 |
Correct |
2 ms |
8280 KB |
Output is correct |
37 |
Correct |
2 ms |
8028 KB |
Output is correct |
38 |
Correct |
2 ms |
8288 KB |
Output is correct |
39 |
Correct |
2 ms |
8284 KB |
Output is correct |
40 |
Correct |
3 ms |
8284 KB |
Output is correct |
41 |
Correct |
2 ms |
8284 KB |
Output is correct |
42 |
Correct |
2 ms |
8284 KB |
Output is correct |
43 |
Correct |
3 ms |
8280 KB |
Output is correct |
44 |
Correct |
2 ms |
8284 KB |
Output is correct |
45 |
Correct |
3 ms |
8284 KB |
Output is correct |
46 |
Correct |
2 ms |
8284 KB |
Output is correct |
47 |
Correct |
2 ms |
8040 KB |
Output is correct |
48 |
Correct |
2 ms |
8284 KB |
Output is correct |
49 |
Correct |
2 ms |
8284 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
51 |
Correct |
3 ms |
8284 KB |
Output is correct |
52 |
Correct |
2 ms |
8284 KB |
Output is correct |
53 |
Correct |
2 ms |
8284 KB |
Output is correct |
54 |
Correct |
2 ms |
8028 KB |
Output is correct |
55 |
Correct |
3 ms |
8284 KB |
Output is correct |
56 |
Correct |
2 ms |
8284 KB |
Output is correct |
57 |
Correct |
2 ms |
8284 KB |
Output is correct |
58 |
Correct |
3 ms |
8284 KB |
Output is correct |
59 |
Correct |
3 ms |
8284 KB |
Output is correct |
60 |
Correct |
3 ms |
8284 KB |
Output is correct |
61 |
Correct |
2 ms |
8284 KB |
Output is correct |
62 |
Correct |
3 ms |
8280 KB |
Output is correct |
63 |
Correct |
3 ms |
8280 KB |
Output is correct |
64 |
Correct |
3 ms |
8284 KB |
Output is correct |
65 |
Correct |
3 ms |
8284 KB |
Output is correct |
66 |
Correct |
3 ms |
8284 KB |
Output is correct |
67 |
Correct |
2 ms |
8284 KB |
Output is correct |
68 |
Correct |
3 ms |
8288 KB |
Output is correct |
69 |
Correct |
3 ms |
8284 KB |
Output is correct |
70 |
Correct |
2 ms |
8284 KB |
Output is correct |
71 |
Correct |
2 ms |
8284 KB |
Output is correct |
72 |
Correct |
3 ms |
8284 KB |
Output is correct |
73 |
Correct |
3 ms |
8284 KB |
Output is correct |
74 |
Correct |
3 ms |
8284 KB |
Output is correct |
75 |
Correct |
3 ms |
8284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8024 KB |
Output is correct |
3 |
Correct |
2 ms |
8028 KB |
Output is correct |
4 |
Correct |
2 ms |
8276 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
2 ms |
8284 KB |
Output is correct |
8 |
Correct |
3 ms |
8028 KB |
Output is correct |
9 |
Correct |
3 ms |
8280 KB |
Output is correct |
10 |
Correct |
2 ms |
8284 KB |
Output is correct |
11 |
Correct |
2 ms |
8028 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8280 KB |
Output is correct |
14 |
Correct |
2 ms |
8196 KB |
Output is correct |
15 |
Correct |
3 ms |
8284 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
4 ms |
8280 KB |
Output is correct |
19 |
Correct |
4 ms |
8284 KB |
Output is correct |
20 |
Correct |
3 ms |
8284 KB |
Output is correct |
21 |
Correct |
3 ms |
8284 KB |
Output is correct |
22 |
Correct |
3 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
2 ms |
8284 KB |
Output is correct |
25 |
Correct |
3 ms |
8284 KB |
Output is correct |
26 |
Correct |
3 ms |
8284 KB |
Output is correct |
27 |
Correct |
24 ms |
8732 KB |
Output is correct |
28 |
Correct |
21 ms |
8540 KB |
Output is correct |
29 |
Correct |
22 ms |
8540 KB |
Output is correct |
30 |
Correct |
26 ms |
8552 KB |
Output is correct |
31 |
Correct |
4 ms |
8540 KB |
Output is correct |
32 |
Correct |
3 ms |
8544 KB |
Output is correct |
33 |
Correct |
3 ms |
8536 KB |
Output is correct |
34 |
Correct |
2 ms |
8284 KB |
Output is correct |
35 |
Correct |
2 ms |
8284 KB |
Output is correct |
36 |
Correct |
2 ms |
8284 KB |
Output is correct |
37 |
Correct |
3 ms |
8028 KB |
Output is correct |
38 |
Correct |
2 ms |
8028 KB |
Output is correct |
39 |
Correct |
2 ms |
8280 KB |
Output is correct |
40 |
Correct |
2 ms |
8280 KB |
Output is correct |
41 |
Correct |
3 ms |
8280 KB |
Output is correct |
42 |
Correct |
2 ms |
8028 KB |
Output is correct |
43 |
Correct |
2 ms |
8284 KB |
Output is correct |
44 |
Correct |
2 ms |
8280 KB |
Output is correct |
45 |
Correct |
2 ms |
8028 KB |
Output is correct |
46 |
Correct |
2 ms |
8288 KB |
Output is correct |
47 |
Correct |
2 ms |
8284 KB |
Output is correct |
48 |
Correct |
3 ms |
8284 KB |
Output is correct |
49 |
Correct |
2 ms |
8284 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
51 |
Correct |
3 ms |
8280 KB |
Output is correct |
52 |
Correct |
2 ms |
8284 KB |
Output is correct |
53 |
Correct |
3 ms |
8284 KB |
Output is correct |
54 |
Correct |
2 ms |
8284 KB |
Output is correct |
55 |
Correct |
2 ms |
8040 KB |
Output is correct |
56 |
Correct |
2 ms |
8284 KB |
Output is correct |
57 |
Correct |
2 ms |
8284 KB |
Output is correct |
58 |
Correct |
2 ms |
8284 KB |
Output is correct |
59 |
Correct |
3 ms |
8284 KB |
Output is correct |
60 |
Correct |
2 ms |
8284 KB |
Output is correct |
61 |
Correct |
2 ms |
8284 KB |
Output is correct |
62 |
Correct |
2 ms |
8028 KB |
Output is correct |
63 |
Correct |
3 ms |
8284 KB |
Output is correct |
64 |
Correct |
2 ms |
8284 KB |
Output is correct |
65 |
Correct |
2 ms |
8284 KB |
Output is correct |
66 |
Correct |
3 ms |
8284 KB |
Output is correct |
67 |
Correct |
3 ms |
8284 KB |
Output is correct |
68 |
Correct |
3 ms |
8284 KB |
Output is correct |
69 |
Correct |
2 ms |
8284 KB |
Output is correct |
70 |
Correct |
3 ms |
8280 KB |
Output is correct |
71 |
Correct |
3 ms |
8280 KB |
Output is correct |
72 |
Correct |
3 ms |
8284 KB |
Output is correct |
73 |
Correct |
3 ms |
8284 KB |
Output is correct |
74 |
Correct |
3 ms |
8284 KB |
Output is correct |
75 |
Correct |
2 ms |
8284 KB |
Output is correct |
76 |
Correct |
3 ms |
8288 KB |
Output is correct |
77 |
Correct |
3 ms |
8284 KB |
Output is correct |
78 |
Correct |
2 ms |
8284 KB |
Output is correct |
79 |
Correct |
2 ms |
8284 KB |
Output is correct |
80 |
Correct |
3 ms |
8284 KB |
Output is correct |
81 |
Correct |
3 ms |
8284 KB |
Output is correct |
82 |
Correct |
3 ms |
8284 KB |
Output is correct |
83 |
Correct |
3 ms |
8284 KB |
Output is correct |
84 |
Correct |
3 ms |
8280 KB |
Output is correct |
85 |
Correct |
5 ms |
8280 KB |
Output is correct |
86 |
Correct |
4 ms |
8284 KB |
Output is correct |
87 |
Correct |
4 ms |
8320 KB |
Output is correct |
88 |
Correct |
4 ms |
8336 KB |
Output is correct |
89 |
Correct |
28 ms |
8540 KB |
Output is correct |
90 |
Correct |
21 ms |
8548 KB |
Output is correct |
91 |
Correct |
25 ms |
8552 KB |
Output is correct |
92 |
Correct |
21 ms |
8552 KB |
Output is correct |
93 |
Correct |
3 ms |
8352 KB |
Output is correct |
94 |
Correct |
22 ms |
8540 KB |
Output is correct |
95 |
Correct |
24 ms |
8740 KB |
Output is correct |
96 |
Correct |
3 ms |
8540 KB |
Output is correct |
97 |
Correct |
23 ms |
8676 KB |
Output is correct |
98 |
Correct |
23 ms |
8792 KB |
Output is correct |
99 |
Correct |
26 ms |
8536 KB |
Output is correct |
100 |
Correct |
14 ms |
8280 KB |
Output is correct |
101 |
Correct |
6 ms |
8280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8024 KB |
Output is correct |
3 |
Correct |
2 ms |
8028 KB |
Output is correct |
4 |
Correct |
2 ms |
8276 KB |
Output is correct |
5 |
Correct |
2 ms |
8284 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
2 ms |
8284 KB |
Output is correct |
8 |
Correct |
3 ms |
8028 KB |
Output is correct |
9 |
Correct |
3 ms |
8280 KB |
Output is correct |
10 |
Correct |
2 ms |
8284 KB |
Output is correct |
11 |
Correct |
2 ms |
8028 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8280 KB |
Output is correct |
14 |
Correct |
2 ms |
8196 KB |
Output is correct |
15 |
Correct |
3 ms |
8284 KB |
Output is correct |
16 |
Correct |
2 ms |
8284 KB |
Output is correct |
17 |
Correct |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
4 ms |
8280 KB |
Output is correct |
19 |
Correct |
4 ms |
8284 KB |
Output is correct |
20 |
Correct |
3 ms |
8284 KB |
Output is correct |
21 |
Correct |
3 ms |
8284 KB |
Output is correct |
22 |
Correct |
3 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
2 ms |
8284 KB |
Output is correct |
25 |
Correct |
3 ms |
8284 KB |
Output is correct |
26 |
Correct |
3 ms |
8284 KB |
Output is correct |
27 |
Correct |
24 ms |
8732 KB |
Output is correct |
28 |
Correct |
21 ms |
8540 KB |
Output is correct |
29 |
Correct |
22 ms |
8540 KB |
Output is correct |
30 |
Correct |
26 ms |
8552 KB |
Output is correct |
31 |
Correct |
4 ms |
8540 KB |
Output is correct |
32 |
Correct |
3 ms |
8544 KB |
Output is correct |
33 |
Correct |
3 ms |
8536 KB |
Output is correct |
34 |
Correct |
2 ms |
8284 KB |
Output is correct |
35 |
Correct |
2 ms |
8284 KB |
Output is correct |
36 |
Correct |
2 ms |
8284 KB |
Output is correct |
37 |
Correct |
3 ms |
8028 KB |
Output is correct |
38 |
Correct |
2 ms |
8028 KB |
Output is correct |
39 |
Correct |
2 ms |
8280 KB |
Output is correct |
40 |
Correct |
2 ms |
8280 KB |
Output is correct |
41 |
Correct |
3 ms |
8280 KB |
Output is correct |
42 |
Correct |
2 ms |
8028 KB |
Output is correct |
43 |
Correct |
2 ms |
8284 KB |
Output is correct |
44 |
Correct |
2 ms |
8280 KB |
Output is correct |
45 |
Correct |
2 ms |
8028 KB |
Output is correct |
46 |
Correct |
2 ms |
8288 KB |
Output is correct |
47 |
Correct |
2 ms |
8284 KB |
Output is correct |
48 |
Correct |
3 ms |
8284 KB |
Output is correct |
49 |
Correct |
2 ms |
8284 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
51 |
Correct |
3 ms |
8280 KB |
Output is correct |
52 |
Correct |
2 ms |
8284 KB |
Output is correct |
53 |
Correct |
3 ms |
8284 KB |
Output is correct |
54 |
Correct |
2 ms |
8284 KB |
Output is correct |
55 |
Correct |
2 ms |
8040 KB |
Output is correct |
56 |
Correct |
2 ms |
8284 KB |
Output is correct |
57 |
Correct |
2 ms |
8284 KB |
Output is correct |
58 |
Correct |
2 ms |
8284 KB |
Output is correct |
59 |
Correct |
3 ms |
8284 KB |
Output is correct |
60 |
Correct |
2 ms |
8284 KB |
Output is correct |
61 |
Correct |
2 ms |
8284 KB |
Output is correct |
62 |
Correct |
2 ms |
8028 KB |
Output is correct |
63 |
Correct |
3 ms |
8284 KB |
Output is correct |
64 |
Correct |
2 ms |
8284 KB |
Output is correct |
65 |
Correct |
2 ms |
8284 KB |
Output is correct |
66 |
Correct |
3 ms |
8284 KB |
Output is correct |
67 |
Correct |
3 ms |
8284 KB |
Output is correct |
68 |
Correct |
3 ms |
8284 KB |
Output is correct |
69 |
Correct |
2 ms |
8284 KB |
Output is correct |
70 |
Correct |
3 ms |
8280 KB |
Output is correct |
71 |
Correct |
3 ms |
8280 KB |
Output is correct |
72 |
Correct |
3 ms |
8284 KB |
Output is correct |
73 |
Correct |
3 ms |
8284 KB |
Output is correct |
74 |
Correct |
3 ms |
8284 KB |
Output is correct |
75 |
Correct |
2 ms |
8284 KB |
Output is correct |
76 |
Correct |
3 ms |
8288 KB |
Output is correct |
77 |
Correct |
3 ms |
8284 KB |
Output is correct |
78 |
Correct |
2 ms |
8284 KB |
Output is correct |
79 |
Correct |
2 ms |
8284 KB |
Output is correct |
80 |
Correct |
3 ms |
8284 KB |
Output is correct |
81 |
Correct |
3 ms |
8284 KB |
Output is correct |
82 |
Correct |
3 ms |
8284 KB |
Output is correct |
83 |
Correct |
3 ms |
8284 KB |
Output is correct |
84 |
Correct |
3 ms |
8280 KB |
Output is correct |
85 |
Correct |
5 ms |
8280 KB |
Output is correct |
86 |
Correct |
4 ms |
8284 KB |
Output is correct |
87 |
Correct |
4 ms |
8320 KB |
Output is correct |
88 |
Correct |
4 ms |
8336 KB |
Output is correct |
89 |
Correct |
28 ms |
8540 KB |
Output is correct |
90 |
Correct |
21 ms |
8548 KB |
Output is correct |
91 |
Correct |
25 ms |
8552 KB |
Output is correct |
92 |
Correct |
21 ms |
8552 KB |
Output is correct |
93 |
Correct |
3 ms |
8352 KB |
Output is correct |
94 |
Correct |
22 ms |
8540 KB |
Output is correct |
95 |
Correct |
24 ms |
8740 KB |
Output is correct |
96 |
Correct |
3 ms |
8540 KB |
Output is correct |
97 |
Correct |
23 ms |
8676 KB |
Output is correct |
98 |
Correct |
23 ms |
8792 KB |
Output is correct |
99 |
Correct |
26 ms |
8536 KB |
Output is correct |
100 |
Correct |
14 ms |
8280 KB |
Output is correct |
101 |
Correct |
6 ms |
8280 KB |
Output is correct |
102 |
Correct |
98 ms |
13336 KB |
Output is correct |
103 |
Correct |
215 ms |
13392 KB |
Output is correct |
104 |
Execution timed out |
1050 ms |
38228 KB |
Time limit exceeded |
105 |
Halted |
0 ms |
0 KB |
- |