#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);
vector<pair<long long,long long>> idk(0);
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;
}
long long solve() {
long long sb = 0;
vector<int> ans(n+1,-1);
priority_queue<pair<long long,pair<long long,long long>>> no;
priority_queue<pair<long long,pair<long long,long long>>> rem;
priority_queue<pair<long long,long long>> dv;
no.push({-LLONG_MAX/3,{n,-1}});
rem.push({-LLONG_MAX/3,{n,-1}});
dv.push({-LLONG_MAX/3,-1});
for(int i = 0; i < n; i++) {
ans[i] = 0;
no.push({-idk[i].first,{i,0}});
dv.push({-idk[i].second-idk[i].first,i});
}
for(int i = 0; i < 2*n; i++) {
while(ans[no.top().second.first] != no.top().second.second) {
no.pop();
}
while(ans[rem.top().second.first] != rem.top().second.second) {
rem.pop();
}
while(dv.top().second != -1 && ans[dv.top().second] != 0) {
dv.pop();
}
if(-dv.top().first-rem.top().first < -no.top().first) {
long long p1 = rem.top().second.first,p2 = dv.top().second,c = -dv.top().first-rem.top().first;
ans[p1]--;
ans[p2]+=2;
sb+=c;
rem.push({idk[p2].second,{p2,2}});
if(ans[p1] == 1) {
rem.push({idk[p1].first,{p1,1}});
no.push({-idk[p1].second,{p1,1}});
}
else {
no.push({-idk[p1].first,{p1,0}});
dv.push({-idk[p1].second-idk[p1].first,p1});
}
}
else {
ans[no.top().second.first]++;
long long c,p = no.top().second.first;
if(no.top().second.second == 1) {
c = idk[p].second;
}
else {
c = idk[p].first;
no.push({-idk[p].second,{p,ans[p]}});
}
sb+=c;
rem.push({c,{p,ans[p]}});
}
if(sb > k) {
return i;
}
}
return 2*n;
}
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;
}
idk.clear();
for(int i = 0; i < n; i++) {
idk.push_back({min(bruh[i],wow[i]),max(bruh[i],wow[i])-min(bruh[i],wow[i])});
}
return max(solve(),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:140: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]
140 | for(long long i = 0; i < wut.size(); i++) {
| ~~^~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
102 ms |
29144 KB |
Output is correct |
2 |
Correct |
92 ms |
33932 KB |
Output is correct |
3 |
Correct |
45 ms |
10836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8284 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8280 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 |
8024 KB |
Output is correct |
10 |
Correct |
3 ms |
8280 KB |
Output is correct |
11 |
Correct |
2 ms |
8284 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8284 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8280 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 |
8024 KB |
Output is correct |
10 |
Correct |
3 ms |
8280 KB |
Output is correct |
11 |
Correct |
2 ms |
8284 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8284 KB |
Output is correct |
14 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
2 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 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8284 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8280 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 |
8024 KB |
Output is correct |
10 |
Correct |
3 ms |
8280 KB |
Output is correct |
11 |
Correct |
2 ms |
8284 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8284 KB |
Output is correct |
14 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
2 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 |
8280 KB |
Output is correct |
26 |
Correct |
4 ms |
8796 KB |
Output is correct |
27 |
Correct |
3 ms |
8796 KB |
Output is correct |
28 |
Correct |
4 ms |
9052 KB |
Output is correct |
29 |
Correct |
4 ms |
9048 KB |
Output is correct |
30 |
Correct |
3 ms |
8536 KB |
Output is correct |
31 |
Correct |
3 ms |
8540 KB |
Output is correct |
32 |
Correct |
4 ms |
8540 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8280 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8280 KB |
Output is correct |
6 |
Correct |
2 ms |
8284 KB |
Output is correct |
7 |
Correct |
4 ms |
8280 KB |
Output is correct |
8 |
Correct |
2 ms |
8280 KB |
Output is correct |
9 |
Correct |
2 ms |
8028 KB |
Output is correct |
10 |
Correct |
2 ms |
8028 KB |
Output is correct |
11 |
Correct |
2 ms |
8028 KB |
Output is correct |
12 |
Correct |
2 ms |
8028 KB |
Output is correct |
13 |
Correct |
2 ms |
8028 KB |
Output is correct |
14 |
Correct |
2 ms |
8284 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 |
8028 KB |
Output is correct |
18 |
Correct |
2 ms |
8284 KB |
Output is correct |
19 |
Correct |
2 ms |
8036 KB |
Output is correct |
20 |
Correct |
3 ms |
8284 KB |
Output is correct |
21 |
Correct |
2 ms |
8100 KB |
Output is correct |
22 |
Correct |
2 ms |
8284 KB |
Output is correct |
23 |
Correct |
2 ms |
8284 KB |
Output is correct |
24 |
Correct |
2 ms |
8280 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8280 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8280 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 |
2 ms |
8024 KB |
Output is correct |
11 |
Correct |
3 ms |
8280 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8284 KB |
Output is correct |
14 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
2 ms |
8284 KB |
Output is correct |
19 |
Correct |
4 ms |
8280 KB |
Output is correct |
20 |
Correct |
2 ms |
8280 KB |
Output is correct |
21 |
Correct |
2 ms |
8028 KB |
Output is correct |
22 |
Correct |
2 ms |
8028 KB |
Output is correct |
23 |
Correct |
2 ms |
8028 KB |
Output is correct |
24 |
Correct |
2 ms |
8028 KB |
Output is correct |
25 |
Correct |
2 ms |
8028 KB |
Output is correct |
26 |
Correct |
2 ms |
8284 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 |
8028 KB |
Output is correct |
30 |
Correct |
2 ms |
8284 KB |
Output is correct |
31 |
Correct |
2 ms |
8036 KB |
Output is correct |
32 |
Correct |
3 ms |
8284 KB |
Output is correct |
33 |
Correct |
2 ms |
8100 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 |
8280 KB |
Output is correct |
37 |
Correct |
2 ms |
8284 KB |
Output is correct |
38 |
Correct |
2 ms |
8284 KB |
Output is correct |
39 |
Correct |
2 ms |
8284 KB |
Output is correct |
40 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
44 |
Correct |
2 ms |
8280 KB |
Output is correct |
45 |
Correct |
2 ms |
8284 KB |
Output is correct |
46 |
Correct |
2 ms |
8280 KB |
Output is correct |
47 |
Correct |
2 ms |
8284 KB |
Output is correct |
48 |
Correct |
2 ms |
8280 KB |
Output is correct |
49 |
Correct |
2 ms |
8288 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8280 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8280 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 |
2 ms |
8024 KB |
Output is correct |
11 |
Correct |
3 ms |
8280 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8284 KB |
Output is correct |
14 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
2 ms |
8284 KB |
Output is correct |
19 |
Correct |
2 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 |
4 ms |
8280 KB |
Output is correct |
27 |
Correct |
2 ms |
8280 KB |
Output is correct |
28 |
Correct |
2 ms |
8028 KB |
Output is correct |
29 |
Correct |
2 ms |
8028 KB |
Output is correct |
30 |
Correct |
2 ms |
8028 KB |
Output is correct |
31 |
Correct |
2 ms |
8028 KB |
Output is correct |
32 |
Correct |
2 ms |
8028 KB |
Output is correct |
33 |
Correct |
2 ms |
8284 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 |
8028 KB |
Output is correct |
37 |
Correct |
2 ms |
8284 KB |
Output is correct |
38 |
Correct |
2 ms |
8036 KB |
Output is correct |
39 |
Correct |
3 ms |
8284 KB |
Output is correct |
40 |
Correct |
2 ms |
8100 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 |
8280 KB |
Output is correct |
44 |
Correct |
2 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 |
8284 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 |
2 ms |
8280 KB |
Output is correct |
52 |
Correct |
2 ms |
8284 KB |
Output is correct |
53 |
Correct |
2 ms |
8280 KB |
Output is correct |
54 |
Correct |
2 ms |
8284 KB |
Output is correct |
55 |
Correct |
2 ms |
8280 KB |
Output is correct |
56 |
Correct |
2 ms |
8288 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 |
3 ms |
8284 KB |
Output is correct |
62 |
Correct |
3 ms |
8240 KB |
Output is correct |
63 |
Correct |
2 ms |
8284 KB |
Output is correct |
64 |
Correct |
3 ms |
8284 KB |
Output is correct |
65 |
Correct |
3 ms |
8288 KB |
Output is correct |
66 |
Correct |
2 ms |
8284 KB |
Output is correct |
67 |
Correct |
2 ms |
8284 KB |
Output is correct |
68 |
Correct |
2 ms |
8284 KB |
Output is correct |
69 |
Correct |
2 ms |
8284 KB |
Output is correct |
70 |
Correct |
2 ms |
8284 KB |
Output is correct |
71 |
Correct |
3 ms |
8536 KB |
Output is correct |
72 |
Correct |
3 ms |
8284 KB |
Output is correct |
73 |
Correct |
2 ms |
8284 KB |
Output is correct |
74 |
Correct |
2 ms |
8284 KB |
Output is correct |
75 |
Correct |
3 ms |
8284 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8280 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8280 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 |
2 ms |
8024 KB |
Output is correct |
11 |
Correct |
3 ms |
8280 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8284 KB |
Output is correct |
14 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
2 ms |
8284 KB |
Output is correct |
19 |
Correct |
2 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 |
8280 KB |
Output is correct |
27 |
Correct |
4 ms |
8796 KB |
Output is correct |
28 |
Correct |
3 ms |
8796 KB |
Output is correct |
29 |
Correct |
4 ms |
9052 KB |
Output is correct |
30 |
Correct |
4 ms |
9048 KB |
Output is correct |
31 |
Correct |
3 ms |
8536 KB |
Output is correct |
32 |
Correct |
3 ms |
8540 KB |
Output is correct |
33 |
Correct |
4 ms |
8540 KB |
Output is correct |
34 |
Correct |
4 ms |
8280 KB |
Output is correct |
35 |
Correct |
2 ms |
8280 KB |
Output is correct |
36 |
Correct |
2 ms |
8028 KB |
Output is correct |
37 |
Correct |
2 ms |
8028 KB |
Output is correct |
38 |
Correct |
2 ms |
8028 KB |
Output is correct |
39 |
Correct |
2 ms |
8028 KB |
Output is correct |
40 |
Correct |
2 ms |
8028 KB |
Output is correct |
41 |
Correct |
2 ms |
8284 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 |
8028 KB |
Output is correct |
45 |
Correct |
2 ms |
8284 KB |
Output is correct |
46 |
Correct |
2 ms |
8036 KB |
Output is correct |
47 |
Correct |
3 ms |
8284 KB |
Output is correct |
48 |
Correct |
2 ms |
8100 KB |
Output is correct |
49 |
Correct |
2 ms |
8284 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
51 |
Correct |
2 ms |
8280 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 |
8284 KB |
Output is correct |
55 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
59 |
Correct |
2 ms |
8280 KB |
Output is correct |
60 |
Correct |
2 ms |
8284 KB |
Output is correct |
61 |
Correct |
2 ms |
8280 KB |
Output is correct |
62 |
Correct |
2 ms |
8284 KB |
Output is correct |
63 |
Correct |
2 ms |
8280 KB |
Output is correct |
64 |
Correct |
2 ms |
8288 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 |
3 ms |
8284 KB |
Output is correct |
70 |
Correct |
3 ms |
8240 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 |
8288 KB |
Output is correct |
74 |
Correct |
2 ms |
8284 KB |
Output is correct |
75 |
Correct |
2 ms |
8284 KB |
Output is correct |
76 |
Correct |
2 ms |
8284 KB |
Output is correct |
77 |
Correct |
2 ms |
8284 KB |
Output is correct |
78 |
Correct |
2 ms |
8284 KB |
Output is correct |
79 |
Correct |
3 ms |
8536 KB |
Output is correct |
80 |
Correct |
3 ms |
8284 KB |
Output is correct |
81 |
Correct |
2 ms |
8284 KB |
Output is correct |
82 |
Correct |
2 ms |
8284 KB |
Output is correct |
83 |
Correct |
3 ms |
8284 KB |
Output is correct |
84 |
Correct |
4 ms |
8296 KB |
Output is correct |
85 |
Correct |
4 ms |
8280 KB |
Output is correct |
86 |
Correct |
3 ms |
8284 KB |
Output is correct |
87 |
Correct |
3 ms |
8184 KB |
Output is correct |
88 |
Correct |
3 ms |
8296 KB |
Output is correct |
89 |
Correct |
5 ms |
9052 KB |
Output is correct |
90 |
Correct |
4 ms |
8796 KB |
Output is correct |
91 |
Correct |
4 ms |
8796 KB |
Output is correct |
92 |
Correct |
3 ms |
8796 KB |
Output is correct |
93 |
Correct |
3 ms |
8540 KB |
Output is correct |
94 |
Correct |
4 ms |
8808 KB |
Output is correct |
95 |
Correct |
4 ms |
8980 KB |
Output is correct |
96 |
Correct |
3 ms |
8536 KB |
Output is correct |
97 |
Correct |
5 ms |
9052 KB |
Output is correct |
98 |
Correct |
3 ms |
8796 KB |
Output is correct |
99 |
Correct |
5 ms |
9052 KB |
Output is correct |
100 |
Correct |
3 ms |
8540 KB |
Output is correct |
101 |
Correct |
5 ms |
8284 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
8280 KB |
Output is correct |
2 |
Correct |
2 ms |
8280 KB |
Output is correct |
3 |
Correct |
2 ms |
8284 KB |
Output is correct |
4 |
Correct |
2 ms |
8284 KB |
Output is correct |
5 |
Correct |
2 ms |
8280 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 |
2 ms |
8024 KB |
Output is correct |
11 |
Correct |
3 ms |
8280 KB |
Output is correct |
12 |
Correct |
2 ms |
8284 KB |
Output is correct |
13 |
Correct |
2 ms |
8284 KB |
Output is correct |
14 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
18 |
Correct |
2 ms |
8284 KB |
Output is correct |
19 |
Correct |
2 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 |
8280 KB |
Output is correct |
27 |
Correct |
4 ms |
8796 KB |
Output is correct |
28 |
Correct |
3 ms |
8796 KB |
Output is correct |
29 |
Correct |
4 ms |
9052 KB |
Output is correct |
30 |
Correct |
4 ms |
9048 KB |
Output is correct |
31 |
Correct |
3 ms |
8536 KB |
Output is correct |
32 |
Correct |
3 ms |
8540 KB |
Output is correct |
33 |
Correct |
4 ms |
8540 KB |
Output is correct |
34 |
Correct |
4 ms |
8280 KB |
Output is correct |
35 |
Correct |
2 ms |
8280 KB |
Output is correct |
36 |
Correct |
2 ms |
8028 KB |
Output is correct |
37 |
Correct |
2 ms |
8028 KB |
Output is correct |
38 |
Correct |
2 ms |
8028 KB |
Output is correct |
39 |
Correct |
2 ms |
8028 KB |
Output is correct |
40 |
Correct |
2 ms |
8028 KB |
Output is correct |
41 |
Correct |
2 ms |
8284 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 |
8028 KB |
Output is correct |
45 |
Correct |
2 ms |
8284 KB |
Output is correct |
46 |
Correct |
2 ms |
8036 KB |
Output is correct |
47 |
Correct |
3 ms |
8284 KB |
Output is correct |
48 |
Correct |
2 ms |
8100 KB |
Output is correct |
49 |
Correct |
2 ms |
8284 KB |
Output is correct |
50 |
Correct |
2 ms |
8284 KB |
Output is correct |
51 |
Correct |
2 ms |
8280 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 |
8284 KB |
Output is correct |
55 |
Correct |
2 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 |
2 ms |
8284 KB |
Output is correct |
59 |
Correct |
2 ms |
8280 KB |
Output is correct |
60 |
Correct |
2 ms |
8284 KB |
Output is correct |
61 |
Correct |
2 ms |
8280 KB |
Output is correct |
62 |
Correct |
2 ms |
8284 KB |
Output is correct |
63 |
Correct |
2 ms |
8280 KB |
Output is correct |
64 |
Correct |
2 ms |
8288 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 |
3 ms |
8284 KB |
Output is correct |
70 |
Correct |
3 ms |
8240 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 |
8288 KB |
Output is correct |
74 |
Correct |
2 ms |
8284 KB |
Output is correct |
75 |
Correct |
2 ms |
8284 KB |
Output is correct |
76 |
Correct |
2 ms |
8284 KB |
Output is correct |
77 |
Correct |
2 ms |
8284 KB |
Output is correct |
78 |
Correct |
2 ms |
8284 KB |
Output is correct |
79 |
Correct |
3 ms |
8536 KB |
Output is correct |
80 |
Correct |
3 ms |
8284 KB |
Output is correct |
81 |
Correct |
2 ms |
8284 KB |
Output is correct |
82 |
Correct |
2 ms |
8284 KB |
Output is correct |
83 |
Correct |
3 ms |
8284 KB |
Output is correct |
84 |
Correct |
4 ms |
8296 KB |
Output is correct |
85 |
Correct |
4 ms |
8280 KB |
Output is correct |
86 |
Correct |
3 ms |
8284 KB |
Output is correct |
87 |
Correct |
3 ms |
8184 KB |
Output is correct |
88 |
Correct |
3 ms |
8296 KB |
Output is correct |
89 |
Correct |
5 ms |
9052 KB |
Output is correct |
90 |
Correct |
4 ms |
8796 KB |
Output is correct |
91 |
Correct |
4 ms |
8796 KB |
Output is correct |
92 |
Correct |
3 ms |
8796 KB |
Output is correct |
93 |
Correct |
3 ms |
8540 KB |
Output is correct |
94 |
Correct |
4 ms |
8808 KB |
Output is correct |
95 |
Correct |
4 ms |
8980 KB |
Output is correct |
96 |
Correct |
3 ms |
8536 KB |
Output is correct |
97 |
Correct |
5 ms |
9052 KB |
Output is correct |
98 |
Correct |
3 ms |
8796 KB |
Output is correct |
99 |
Correct |
5 ms |
9052 KB |
Output is correct |
100 |
Correct |
3 ms |
8540 KB |
Output is correct |
101 |
Correct |
5 ms |
8284 KB |
Output is correct |
102 |
Correct |
98 ms |
13416 KB |
Output is correct |
103 |
Correct |
118 ms |
13648 KB |
Output is correct |
104 |
Correct |
202 ms |
63088 KB |
Output is correct |
105 |
Correct |
78 ms |
15836 KB |
Output is correct |
106 |
Correct |
100 ms |
15140 KB |
Output is correct |
107 |
Correct |
104 ms |
48392 KB |
Output is correct |
108 |
Correct |
114 ms |
54704 KB |
Output is correct |
109 |
Correct |
61 ms |
36840 KB |
Output is correct |
110 |
Correct |
196 ms |
51892 KB |
Output is correct |
111 |
Correct |
149 ms |
58340 KB |
Output is correct |
112 |
Correct |
110 ms |
45556 KB |
Output is correct |
113 |
Correct |
89 ms |
27984 KB |
Output is correct |
114 |
Correct |
97 ms |
43968 KB |
Output is correct |
115 |
Correct |
154 ms |
66176 KB |
Output is correct |
116 |
Correct |
155 ms |
50104 KB |
Output is correct |
117 |
Correct |
97 ms |
32632 KB |
Output is correct |
118 |
Correct |
134 ms |
45816 KB |
Output is correct |
119 |
Correct |
130 ms |
21140 KB |
Output is correct |
120 |
Correct |
95 ms |
12824 KB |
Output is correct |