#include "closing.h"
#include<bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
typedef long long ll;
const int M=1<<20;
struct helper_class {
struct BIT {
private:
set<int>todie;
ll TRE[M];
int cnt[M];
ll qryvl(int i){
ll res=0;
while(i)
res+=TRE[i],i-=i&-i;
return res;
}
int querycnt(int i){
int res=0;
while(i)res+=cnt[i],
i-=i&-i;
return res;
}
public:
void upd(int i,ll v,int cof){
while(i<1e6) todie.insert(i),
cnt[i]+=cof,TRE[i]+=cof*v,i+=i&-i;
}
int howmuch(ll v){
int l=0,r=1e6,res=0;
while(l<=r){
int mid=l+r>>1;
if(qryvl(mid)<=v)
res=mid,l=mid+1;
else r=mid-1;
}
return querycnt(res);
}
void reset(){
for(auto i:todie)
TRE[i]=cnt[i]=0;
todie.clear();
}
} cur;
int operator()(vector<pair<ll,ll>> V,ll K){
cur.reset();
if(K<0) return -1e9;
map<ll,int>mp;
for(auto&[i,j]:V)swap(i,j);
sort(V.begin(),V.end());
for(auto&[i,j]:V)swap(i,j);
for(auto[i,j]:V)
mp[i]++,mp[j-i]++;
int ans=0,CC=0,n=V.size();
for(auto&[i,j]:mp)
j=CC+=j;
vector<pair<int,int>> v2;
for(auto[i,j]:V)
v2.push_back({mp[i]--,mp[j-i]--});
for(int i=0;i<n;i++)
cur.upd(v2[i].first,V[i].first,1);
ans=cur.howmuch(K);
for(int i=0;i<n;){K-=V[i].first; if(K<0)break;
cur.upd(v2[i].first,V[i].first,-1);
cur.upd(v2[i].second,V[i].second-V[i].first,1);
ans=max(ans,++i+cur.howmuch(K));
}
return ans;
}
} thecenter;
vector<pair<int,int>>adj[M];
vector<ll>v;
vector<int>path;
ll dis[M][2];
void dfs(int n,int p,ll d,int k){
dis[n][k]=d;
v.push_back(d);
for(auto[i,w]:adj[n])
if(i-p)dfs(i,n,d+w,k);
}
int max_score(int N, int X, int Y, ll K,std::vector<int> U, std::vector<int> V, std::vector<int> W){
for(int i=0;i<N-1;i++)
adj[U[i]].push_back({V[i],W[i]}),
adj[V[i]].push_back({U[i],W[i]});
v.clear();
dfs(X,N,0,0);
dfs(Y,N,0,1);
sort(v.rbegin(),v.rend());
ll origK=K;
while(v.size())
if(v.back()<=K)
K-=v.back(),
v.pop_back();
else break;
for(int i=0;i<N;i++)
adj[i].clear();
K=origK;
int ans1=2*N-v.size();
vector<pair<ll,ll>> stuf;
for(int i=0;i<N;i++)
if(dis[i][0]+dis[i][1]==dis[X][1])
K-=min(dis[i][0],dis[i][1]),
stuf.push_back({0,abs(dis[i][0]-dis[i][1])});
else stuf.push_back({min(dis[i][0],dis[i][1]),
max(dis[i][0],dis[i][1])});
return max(ans1,thecenter(stuf,K));
}
Compilation message
closing.cpp: In member function 'int helper_class::BIT::howmuch(ll)':
closing.cpp:33:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
33 | int mid=l+r>>1;
| ~^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
35164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
98 ms |
57492 KB |
Output is correct |
2 |
Correct |
102 ms |
63932 KB |
Output is correct |
3 |
Correct |
52 ms |
29700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
35164 KB |
Output is correct |
2 |
Correct |
6 ms |
35164 KB |
Output is correct |
3 |
Correct |
7 ms |
35164 KB |
Output is correct |
4 |
Correct |
5 ms |
35164 KB |
Output is correct |
5 |
Correct |
4 ms |
26972 KB |
Output is correct |
6 |
Correct |
5 ms |
35164 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35292 KB |
Output is correct |
9 |
Correct |
5 ms |
26972 KB |
Output is correct |
10 |
Correct |
4 ms |
26968 KB |
Output is correct |
11 |
Correct |
4 ms |
26972 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
35164 KB |
Output is correct |
2 |
Correct |
6 ms |
35164 KB |
Output is correct |
3 |
Correct |
7 ms |
35164 KB |
Output is correct |
4 |
Correct |
5 ms |
35164 KB |
Output is correct |
5 |
Correct |
4 ms |
26972 KB |
Output is correct |
6 |
Correct |
5 ms |
35164 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35292 KB |
Output is correct |
9 |
Correct |
5 ms |
26972 KB |
Output is correct |
10 |
Correct |
4 ms |
26968 KB |
Output is correct |
11 |
Correct |
4 ms |
26972 KB |
Output is correct |
12 |
Correct |
5 ms |
35164 KB |
Output is correct |
13 |
Correct |
6 ms |
35160 KB |
Output is correct |
14 |
Correct |
5 ms |
35164 KB |
Output is correct |
15 |
Correct |
4 ms |
26968 KB |
Output is correct |
16 |
Correct |
4 ms |
26972 KB |
Output is correct |
17 |
Correct |
4 ms |
26972 KB |
Output is correct |
18 |
Correct |
6 ms |
35164 KB |
Output is correct |
19 |
Correct |
6 ms |
35420 KB |
Output is correct |
20 |
Correct |
5 ms |
35420 KB |
Output is correct |
21 |
Correct |
5 ms |
35420 KB |
Output is correct |
22 |
Correct |
4 ms |
26972 KB |
Output is correct |
23 |
Correct |
5 ms |
26972 KB |
Output is correct |
24 |
Correct |
4 ms |
26972 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
35164 KB |
Output is correct |
2 |
Correct |
6 ms |
35164 KB |
Output is correct |
3 |
Correct |
7 ms |
35164 KB |
Output is correct |
4 |
Correct |
5 ms |
35164 KB |
Output is correct |
5 |
Correct |
4 ms |
26972 KB |
Output is correct |
6 |
Correct |
5 ms |
35164 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35292 KB |
Output is correct |
9 |
Correct |
5 ms |
26972 KB |
Output is correct |
10 |
Correct |
4 ms |
26968 KB |
Output is correct |
11 |
Correct |
4 ms |
26972 KB |
Output is correct |
12 |
Correct |
5 ms |
35164 KB |
Output is correct |
13 |
Correct |
6 ms |
35160 KB |
Output is correct |
14 |
Correct |
5 ms |
35164 KB |
Output is correct |
15 |
Correct |
4 ms |
26968 KB |
Output is correct |
16 |
Correct |
4 ms |
26972 KB |
Output is correct |
17 |
Correct |
4 ms |
26972 KB |
Output is correct |
18 |
Correct |
6 ms |
35164 KB |
Output is correct |
19 |
Correct |
6 ms |
35420 KB |
Output is correct |
20 |
Correct |
5 ms |
35420 KB |
Output is correct |
21 |
Correct |
5 ms |
35420 KB |
Output is correct |
22 |
Correct |
4 ms |
26972 KB |
Output is correct |
23 |
Correct |
5 ms |
26972 KB |
Output is correct |
24 |
Correct |
4 ms |
26972 KB |
Output is correct |
25 |
Correct |
10 ms |
35164 KB |
Output is correct |
26 |
Correct |
11 ms |
36060 KB |
Output is correct |
27 |
Correct |
8 ms |
36024 KB |
Output is correct |
28 |
Correct |
11 ms |
36060 KB |
Output is correct |
29 |
Correct |
11 ms |
36188 KB |
Output is correct |
30 |
Correct |
5 ms |
27484 KB |
Output is correct |
31 |
Correct |
5 ms |
27600 KB |
Output is correct |
32 |
Correct |
5 ms |
27484 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
35164 KB |
Output is correct |
2 |
Correct |
5 ms |
35164 KB |
Output is correct |
3 |
Correct |
6 ms |
35164 KB |
Output is correct |
4 |
Correct |
7 ms |
35164 KB |
Output is correct |
5 |
Correct |
5 ms |
35164 KB |
Output is correct |
6 |
Correct |
4 ms |
26972 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35296 KB |
Output is correct |
9 |
Correct |
5 ms |
35252 KB |
Output is correct |
10 |
Correct |
5 ms |
35164 KB |
Output is correct |
11 |
Correct |
5 ms |
35164 KB |
Output is correct |
12 |
Correct |
4 ms |
26972 KB |
Output is correct |
13 |
Correct |
5 ms |
35164 KB |
Output is correct |
14 |
Correct |
5 ms |
35260 KB |
Output is correct |
15 |
Correct |
5 ms |
35164 KB |
Output is correct |
16 |
Correct |
5 ms |
35164 KB |
Output is correct |
17 |
Correct |
4 ms |
26968 KB |
Output is correct |
18 |
Correct |
5 ms |
35268 KB |
Output is correct |
19 |
Correct |
5 ms |
35164 KB |
Output is correct |
20 |
Correct |
5 ms |
35164 KB |
Output is correct |
21 |
Correct |
5 ms |
35284 KB |
Output is correct |
22 |
Correct |
5 ms |
35164 KB |
Output is correct |
23 |
Correct |
5 ms |
35164 KB |
Output is correct |
24 |
Correct |
5 ms |
35160 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
35164 KB |
Output is correct |
2 |
Correct |
5 ms |
35164 KB |
Output is correct |
3 |
Correct |
6 ms |
35164 KB |
Output is correct |
4 |
Correct |
7 ms |
35164 KB |
Output is correct |
5 |
Correct |
5 ms |
35164 KB |
Output is correct |
6 |
Correct |
4 ms |
26972 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35164 KB |
Output is correct |
9 |
Correct |
5 ms |
35292 KB |
Output is correct |
10 |
Correct |
5 ms |
26972 KB |
Output is correct |
11 |
Correct |
4 ms |
26968 KB |
Output is correct |
12 |
Correct |
4 ms |
26972 KB |
Output is correct |
13 |
Correct |
5 ms |
35164 KB |
Output is correct |
14 |
Correct |
6 ms |
35160 KB |
Output is correct |
15 |
Correct |
5 ms |
35164 KB |
Output is correct |
16 |
Correct |
4 ms |
26968 KB |
Output is correct |
17 |
Correct |
4 ms |
26972 KB |
Output is correct |
18 |
Correct |
4 ms |
26972 KB |
Output is correct |
19 |
Correct |
5 ms |
35164 KB |
Output is correct |
20 |
Correct |
5 ms |
35296 KB |
Output is correct |
21 |
Correct |
5 ms |
35252 KB |
Output is correct |
22 |
Correct |
5 ms |
35164 KB |
Output is correct |
23 |
Correct |
5 ms |
35164 KB |
Output is correct |
24 |
Correct |
4 ms |
26972 KB |
Output is correct |
25 |
Correct |
5 ms |
35164 KB |
Output is correct |
26 |
Correct |
5 ms |
35260 KB |
Output is correct |
27 |
Correct |
5 ms |
35164 KB |
Output is correct |
28 |
Correct |
5 ms |
35164 KB |
Output is correct |
29 |
Correct |
4 ms |
26968 KB |
Output is correct |
30 |
Correct |
5 ms |
35268 KB |
Output is correct |
31 |
Correct |
5 ms |
35164 KB |
Output is correct |
32 |
Correct |
5 ms |
35164 KB |
Output is correct |
33 |
Correct |
5 ms |
35284 KB |
Output is correct |
34 |
Correct |
5 ms |
35164 KB |
Output is correct |
35 |
Correct |
5 ms |
35164 KB |
Output is correct |
36 |
Correct |
5 ms |
35160 KB |
Output is correct |
37 |
Correct |
5 ms |
35164 KB |
Output is correct |
38 |
Correct |
5 ms |
35164 KB |
Output is correct |
39 |
Correct |
5 ms |
35288 KB |
Output is correct |
40 |
Correct |
5 ms |
35292 KB |
Output is correct |
41 |
Correct |
5 ms |
35164 KB |
Output is correct |
42 |
Correct |
4 ms |
26972 KB |
Output is correct |
43 |
Correct |
6 ms |
35164 KB |
Output is correct |
44 |
Correct |
6 ms |
35164 KB |
Output is correct |
45 |
Correct |
4 ms |
26972 KB |
Output is correct |
46 |
Correct |
5 ms |
35300 KB |
Output is correct |
47 |
Correct |
5 ms |
35164 KB |
Output is correct |
48 |
Correct |
5 ms |
35164 KB |
Output is correct |
49 |
Correct |
5 ms |
35268 KB |
Output is correct |
50 |
Correct |
5 ms |
35164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
35164 KB |
Output is correct |
2 |
Correct |
5 ms |
35164 KB |
Output is correct |
3 |
Correct |
6 ms |
35164 KB |
Output is correct |
4 |
Correct |
7 ms |
35164 KB |
Output is correct |
5 |
Correct |
5 ms |
35164 KB |
Output is correct |
6 |
Correct |
4 ms |
26972 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35164 KB |
Output is correct |
9 |
Correct |
5 ms |
35292 KB |
Output is correct |
10 |
Correct |
5 ms |
26972 KB |
Output is correct |
11 |
Correct |
4 ms |
26968 KB |
Output is correct |
12 |
Correct |
4 ms |
26972 KB |
Output is correct |
13 |
Correct |
5 ms |
35164 KB |
Output is correct |
14 |
Correct |
6 ms |
35160 KB |
Output is correct |
15 |
Correct |
5 ms |
35164 KB |
Output is correct |
16 |
Correct |
4 ms |
26968 KB |
Output is correct |
17 |
Correct |
4 ms |
26972 KB |
Output is correct |
18 |
Correct |
4 ms |
26972 KB |
Output is correct |
19 |
Correct |
6 ms |
35164 KB |
Output is correct |
20 |
Correct |
6 ms |
35420 KB |
Output is correct |
21 |
Correct |
5 ms |
35420 KB |
Output is correct |
22 |
Correct |
5 ms |
35420 KB |
Output is correct |
23 |
Correct |
4 ms |
26972 KB |
Output is correct |
24 |
Correct |
5 ms |
26972 KB |
Output is correct |
25 |
Correct |
4 ms |
26972 KB |
Output is correct |
26 |
Correct |
5 ms |
35164 KB |
Output is correct |
27 |
Correct |
5 ms |
35296 KB |
Output is correct |
28 |
Correct |
5 ms |
35252 KB |
Output is correct |
29 |
Correct |
5 ms |
35164 KB |
Output is correct |
30 |
Correct |
5 ms |
35164 KB |
Output is correct |
31 |
Correct |
4 ms |
26972 KB |
Output is correct |
32 |
Correct |
5 ms |
35164 KB |
Output is correct |
33 |
Correct |
5 ms |
35260 KB |
Output is correct |
34 |
Correct |
5 ms |
35164 KB |
Output is correct |
35 |
Correct |
5 ms |
35164 KB |
Output is correct |
36 |
Correct |
4 ms |
26968 KB |
Output is correct |
37 |
Correct |
5 ms |
35268 KB |
Output is correct |
38 |
Correct |
5 ms |
35164 KB |
Output is correct |
39 |
Correct |
5 ms |
35164 KB |
Output is correct |
40 |
Correct |
5 ms |
35284 KB |
Output is correct |
41 |
Correct |
5 ms |
35164 KB |
Output is correct |
42 |
Correct |
5 ms |
35164 KB |
Output is correct |
43 |
Correct |
5 ms |
35160 KB |
Output is correct |
44 |
Correct |
5 ms |
35164 KB |
Output is correct |
45 |
Correct |
5 ms |
35164 KB |
Output is correct |
46 |
Correct |
5 ms |
35288 KB |
Output is correct |
47 |
Correct |
5 ms |
35292 KB |
Output is correct |
48 |
Correct |
5 ms |
35164 KB |
Output is correct |
49 |
Correct |
4 ms |
26972 KB |
Output is correct |
50 |
Correct |
6 ms |
35164 KB |
Output is correct |
51 |
Correct |
6 ms |
35164 KB |
Output is correct |
52 |
Correct |
4 ms |
26972 KB |
Output is correct |
53 |
Correct |
5 ms |
35300 KB |
Output is correct |
54 |
Correct |
5 ms |
35164 KB |
Output is correct |
55 |
Correct |
5 ms |
35164 KB |
Output is correct |
56 |
Correct |
5 ms |
35268 KB |
Output is correct |
57 |
Correct |
5 ms |
35164 KB |
Output is correct |
58 |
Correct |
5 ms |
35160 KB |
Output is correct |
59 |
Correct |
6 ms |
35164 KB |
Output is correct |
60 |
Correct |
6 ms |
35164 KB |
Output is correct |
61 |
Correct |
5 ms |
35164 KB |
Output is correct |
62 |
Correct |
8 ms |
35160 KB |
Output is correct |
63 |
Correct |
6 ms |
35420 KB |
Output is correct |
64 |
Correct |
6 ms |
35452 KB |
Output is correct |
65 |
Correct |
5 ms |
35420 KB |
Output is correct |
66 |
Correct |
6 ms |
35304 KB |
Output is correct |
67 |
Correct |
4 ms |
26972 KB |
Output is correct |
68 |
Correct |
5 ms |
35420 KB |
Output is correct |
69 |
Correct |
8 ms |
35420 KB |
Output is correct |
70 |
Correct |
4 ms |
26972 KB |
Output is correct |
71 |
Correct |
4 ms |
26972 KB |
Output is correct |
72 |
Correct |
6 ms |
35416 KB |
Output is correct |
73 |
Correct |
7 ms |
35420 KB |
Output is correct |
74 |
Correct |
6 ms |
35168 KB |
Output is correct |
75 |
Correct |
7 ms |
35164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
35164 KB |
Output is correct |
2 |
Correct |
5 ms |
35164 KB |
Output is correct |
3 |
Correct |
6 ms |
35164 KB |
Output is correct |
4 |
Correct |
7 ms |
35164 KB |
Output is correct |
5 |
Correct |
5 ms |
35164 KB |
Output is correct |
6 |
Correct |
4 ms |
26972 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35164 KB |
Output is correct |
9 |
Correct |
5 ms |
35292 KB |
Output is correct |
10 |
Correct |
5 ms |
26972 KB |
Output is correct |
11 |
Correct |
4 ms |
26968 KB |
Output is correct |
12 |
Correct |
4 ms |
26972 KB |
Output is correct |
13 |
Correct |
5 ms |
35164 KB |
Output is correct |
14 |
Correct |
6 ms |
35160 KB |
Output is correct |
15 |
Correct |
5 ms |
35164 KB |
Output is correct |
16 |
Correct |
4 ms |
26968 KB |
Output is correct |
17 |
Correct |
4 ms |
26972 KB |
Output is correct |
18 |
Correct |
4 ms |
26972 KB |
Output is correct |
19 |
Correct |
6 ms |
35164 KB |
Output is correct |
20 |
Correct |
6 ms |
35420 KB |
Output is correct |
21 |
Correct |
5 ms |
35420 KB |
Output is correct |
22 |
Correct |
5 ms |
35420 KB |
Output is correct |
23 |
Correct |
4 ms |
26972 KB |
Output is correct |
24 |
Correct |
5 ms |
26972 KB |
Output is correct |
25 |
Correct |
4 ms |
26972 KB |
Output is correct |
26 |
Correct |
10 ms |
35164 KB |
Output is correct |
27 |
Correct |
11 ms |
36060 KB |
Output is correct |
28 |
Correct |
8 ms |
36024 KB |
Output is correct |
29 |
Correct |
11 ms |
36060 KB |
Output is correct |
30 |
Correct |
11 ms |
36188 KB |
Output is correct |
31 |
Correct |
5 ms |
27484 KB |
Output is correct |
32 |
Correct |
5 ms |
27600 KB |
Output is correct |
33 |
Correct |
5 ms |
27484 KB |
Output is correct |
34 |
Correct |
5 ms |
35164 KB |
Output is correct |
35 |
Correct |
5 ms |
35296 KB |
Output is correct |
36 |
Correct |
5 ms |
35252 KB |
Output is correct |
37 |
Correct |
5 ms |
35164 KB |
Output is correct |
38 |
Correct |
5 ms |
35164 KB |
Output is correct |
39 |
Correct |
4 ms |
26972 KB |
Output is correct |
40 |
Correct |
5 ms |
35164 KB |
Output is correct |
41 |
Correct |
5 ms |
35260 KB |
Output is correct |
42 |
Correct |
5 ms |
35164 KB |
Output is correct |
43 |
Correct |
5 ms |
35164 KB |
Output is correct |
44 |
Correct |
4 ms |
26968 KB |
Output is correct |
45 |
Correct |
5 ms |
35268 KB |
Output is correct |
46 |
Correct |
5 ms |
35164 KB |
Output is correct |
47 |
Correct |
5 ms |
35164 KB |
Output is correct |
48 |
Correct |
5 ms |
35284 KB |
Output is correct |
49 |
Correct |
5 ms |
35164 KB |
Output is correct |
50 |
Correct |
5 ms |
35164 KB |
Output is correct |
51 |
Correct |
5 ms |
35160 KB |
Output is correct |
52 |
Correct |
5 ms |
35164 KB |
Output is correct |
53 |
Correct |
5 ms |
35164 KB |
Output is correct |
54 |
Correct |
5 ms |
35288 KB |
Output is correct |
55 |
Correct |
5 ms |
35292 KB |
Output is correct |
56 |
Correct |
5 ms |
35164 KB |
Output is correct |
57 |
Correct |
4 ms |
26972 KB |
Output is correct |
58 |
Correct |
6 ms |
35164 KB |
Output is correct |
59 |
Correct |
6 ms |
35164 KB |
Output is correct |
60 |
Correct |
4 ms |
26972 KB |
Output is correct |
61 |
Correct |
5 ms |
35300 KB |
Output is correct |
62 |
Correct |
5 ms |
35164 KB |
Output is correct |
63 |
Correct |
5 ms |
35164 KB |
Output is correct |
64 |
Correct |
5 ms |
35268 KB |
Output is correct |
65 |
Correct |
5 ms |
35164 KB |
Output is correct |
66 |
Correct |
5 ms |
35160 KB |
Output is correct |
67 |
Correct |
6 ms |
35164 KB |
Output is correct |
68 |
Correct |
6 ms |
35164 KB |
Output is correct |
69 |
Correct |
5 ms |
35164 KB |
Output is correct |
70 |
Correct |
8 ms |
35160 KB |
Output is correct |
71 |
Correct |
6 ms |
35420 KB |
Output is correct |
72 |
Correct |
6 ms |
35452 KB |
Output is correct |
73 |
Correct |
5 ms |
35420 KB |
Output is correct |
74 |
Correct |
6 ms |
35304 KB |
Output is correct |
75 |
Correct |
4 ms |
26972 KB |
Output is correct |
76 |
Correct |
5 ms |
35420 KB |
Output is correct |
77 |
Correct |
8 ms |
35420 KB |
Output is correct |
78 |
Correct |
4 ms |
26972 KB |
Output is correct |
79 |
Correct |
4 ms |
26972 KB |
Output is correct |
80 |
Correct |
6 ms |
35416 KB |
Output is correct |
81 |
Correct |
7 ms |
35420 KB |
Output is correct |
82 |
Correct |
6 ms |
35168 KB |
Output is correct |
83 |
Correct |
7 ms |
35164 KB |
Output is correct |
84 |
Correct |
9 ms |
35164 KB |
Output is correct |
85 |
Correct |
10 ms |
35420 KB |
Output is correct |
86 |
Correct |
11 ms |
35396 KB |
Output is correct |
87 |
Correct |
10 ms |
35164 KB |
Output is correct |
88 |
Correct |
9 ms |
35164 KB |
Output is correct |
89 |
Correct |
11 ms |
35932 KB |
Output is correct |
90 |
Correct |
10 ms |
35932 KB |
Output is correct |
91 |
Correct |
9 ms |
35932 KB |
Output is correct |
92 |
Correct |
8 ms |
35932 KB |
Output is correct |
93 |
Correct |
5 ms |
27480 KB |
Output is correct |
94 |
Correct |
10 ms |
35932 KB |
Output is correct |
95 |
Correct |
10 ms |
36188 KB |
Output is correct |
96 |
Correct |
6 ms |
27484 KB |
Output is correct |
97 |
Correct |
11 ms |
36036 KB |
Output is correct |
98 |
Correct |
8 ms |
35932 KB |
Output is correct |
99 |
Correct |
12 ms |
35932 KB |
Output is correct |
100 |
Correct |
8 ms |
35700 KB |
Output is correct |
101 |
Correct |
9 ms |
35292 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
35164 KB |
Output is correct |
2 |
Correct |
5 ms |
35164 KB |
Output is correct |
3 |
Correct |
6 ms |
35164 KB |
Output is correct |
4 |
Correct |
7 ms |
35164 KB |
Output is correct |
5 |
Correct |
5 ms |
35164 KB |
Output is correct |
6 |
Correct |
4 ms |
26972 KB |
Output is correct |
7 |
Correct |
5 ms |
35164 KB |
Output is correct |
8 |
Correct |
5 ms |
35164 KB |
Output is correct |
9 |
Correct |
5 ms |
35292 KB |
Output is correct |
10 |
Correct |
5 ms |
26972 KB |
Output is correct |
11 |
Correct |
4 ms |
26968 KB |
Output is correct |
12 |
Correct |
4 ms |
26972 KB |
Output is correct |
13 |
Correct |
5 ms |
35164 KB |
Output is correct |
14 |
Correct |
6 ms |
35160 KB |
Output is correct |
15 |
Correct |
5 ms |
35164 KB |
Output is correct |
16 |
Correct |
4 ms |
26968 KB |
Output is correct |
17 |
Correct |
4 ms |
26972 KB |
Output is correct |
18 |
Correct |
4 ms |
26972 KB |
Output is correct |
19 |
Correct |
6 ms |
35164 KB |
Output is correct |
20 |
Correct |
6 ms |
35420 KB |
Output is correct |
21 |
Correct |
5 ms |
35420 KB |
Output is correct |
22 |
Correct |
5 ms |
35420 KB |
Output is correct |
23 |
Correct |
4 ms |
26972 KB |
Output is correct |
24 |
Correct |
5 ms |
26972 KB |
Output is correct |
25 |
Correct |
4 ms |
26972 KB |
Output is correct |
26 |
Correct |
10 ms |
35164 KB |
Output is correct |
27 |
Correct |
11 ms |
36060 KB |
Output is correct |
28 |
Correct |
8 ms |
36024 KB |
Output is correct |
29 |
Correct |
11 ms |
36060 KB |
Output is correct |
30 |
Correct |
11 ms |
36188 KB |
Output is correct |
31 |
Correct |
5 ms |
27484 KB |
Output is correct |
32 |
Correct |
5 ms |
27600 KB |
Output is correct |
33 |
Correct |
5 ms |
27484 KB |
Output is correct |
34 |
Correct |
5 ms |
35164 KB |
Output is correct |
35 |
Correct |
5 ms |
35296 KB |
Output is correct |
36 |
Correct |
5 ms |
35252 KB |
Output is correct |
37 |
Correct |
5 ms |
35164 KB |
Output is correct |
38 |
Correct |
5 ms |
35164 KB |
Output is correct |
39 |
Correct |
4 ms |
26972 KB |
Output is correct |
40 |
Correct |
5 ms |
35164 KB |
Output is correct |
41 |
Correct |
5 ms |
35260 KB |
Output is correct |
42 |
Correct |
5 ms |
35164 KB |
Output is correct |
43 |
Correct |
5 ms |
35164 KB |
Output is correct |
44 |
Correct |
4 ms |
26968 KB |
Output is correct |
45 |
Correct |
5 ms |
35268 KB |
Output is correct |
46 |
Correct |
5 ms |
35164 KB |
Output is correct |
47 |
Correct |
5 ms |
35164 KB |
Output is correct |
48 |
Correct |
5 ms |
35284 KB |
Output is correct |
49 |
Correct |
5 ms |
35164 KB |
Output is correct |
50 |
Correct |
5 ms |
35164 KB |
Output is correct |
51 |
Correct |
5 ms |
35160 KB |
Output is correct |
52 |
Correct |
5 ms |
35164 KB |
Output is correct |
53 |
Correct |
5 ms |
35164 KB |
Output is correct |
54 |
Correct |
5 ms |
35288 KB |
Output is correct |
55 |
Correct |
5 ms |
35292 KB |
Output is correct |
56 |
Correct |
5 ms |
35164 KB |
Output is correct |
57 |
Correct |
4 ms |
26972 KB |
Output is correct |
58 |
Correct |
6 ms |
35164 KB |
Output is correct |
59 |
Correct |
6 ms |
35164 KB |
Output is correct |
60 |
Correct |
4 ms |
26972 KB |
Output is correct |
61 |
Correct |
5 ms |
35300 KB |
Output is correct |
62 |
Correct |
5 ms |
35164 KB |
Output is correct |
63 |
Correct |
5 ms |
35164 KB |
Output is correct |
64 |
Correct |
5 ms |
35268 KB |
Output is correct |
65 |
Correct |
5 ms |
35164 KB |
Output is correct |
66 |
Correct |
5 ms |
35160 KB |
Output is correct |
67 |
Correct |
6 ms |
35164 KB |
Output is correct |
68 |
Correct |
6 ms |
35164 KB |
Output is correct |
69 |
Correct |
5 ms |
35164 KB |
Output is correct |
70 |
Correct |
8 ms |
35160 KB |
Output is correct |
71 |
Correct |
6 ms |
35420 KB |
Output is correct |
72 |
Correct |
6 ms |
35452 KB |
Output is correct |
73 |
Correct |
5 ms |
35420 KB |
Output is correct |
74 |
Correct |
6 ms |
35304 KB |
Output is correct |
75 |
Correct |
4 ms |
26972 KB |
Output is correct |
76 |
Correct |
5 ms |
35420 KB |
Output is correct |
77 |
Correct |
8 ms |
35420 KB |
Output is correct |
78 |
Correct |
4 ms |
26972 KB |
Output is correct |
79 |
Correct |
4 ms |
26972 KB |
Output is correct |
80 |
Correct |
6 ms |
35416 KB |
Output is correct |
81 |
Correct |
7 ms |
35420 KB |
Output is correct |
82 |
Correct |
6 ms |
35168 KB |
Output is correct |
83 |
Correct |
7 ms |
35164 KB |
Output is correct |
84 |
Correct |
9 ms |
35164 KB |
Output is correct |
85 |
Correct |
10 ms |
35420 KB |
Output is correct |
86 |
Correct |
11 ms |
35396 KB |
Output is correct |
87 |
Correct |
10 ms |
35164 KB |
Output is correct |
88 |
Correct |
9 ms |
35164 KB |
Output is correct |
89 |
Correct |
11 ms |
35932 KB |
Output is correct |
90 |
Correct |
10 ms |
35932 KB |
Output is correct |
91 |
Correct |
9 ms |
35932 KB |
Output is correct |
92 |
Correct |
8 ms |
35932 KB |
Output is correct |
93 |
Correct |
5 ms |
27480 KB |
Output is correct |
94 |
Correct |
10 ms |
35932 KB |
Output is correct |
95 |
Correct |
10 ms |
36188 KB |
Output is correct |
96 |
Correct |
6 ms |
27484 KB |
Output is correct |
97 |
Correct |
11 ms |
36036 KB |
Output is correct |
98 |
Correct |
8 ms |
35932 KB |
Output is correct |
99 |
Correct |
12 ms |
35932 KB |
Output is correct |
100 |
Correct |
8 ms |
35700 KB |
Output is correct |
101 |
Correct |
9 ms |
35292 KB |
Output is correct |
102 |
Correct |
293 ms |
37968 KB |
Output is correct |
103 |
Correct |
317 ms |
37728 KB |
Output is correct |
104 |
Correct |
667 ms |
98356 KB |
Output is correct |
105 |
Correct |
254 ms |
40072 KB |
Output is correct |
106 |
Correct |
373 ms |
39356 KB |
Output is correct |
107 |
Correct |
610 ms |
78004 KB |
Output is correct |
108 |
Correct |
606 ms |
77544 KB |
Output is correct |
109 |
Correct |
82 ms |
63936 KB |
Output is correct |
110 |
Correct |
553 ms |
90680 KB |
Output is correct |
111 |
Correct |
602 ms |
96052 KB |
Output is correct |
112 |
Correct |
308 ms |
81256 KB |
Output is correct |
113 |
Correct |
106 ms |
53176 KB |
Output is correct |
114 |
Correct |
253 ms |
72908 KB |
Output is correct |
115 |
Correct |
681 ms |
96236 KB |
Output is correct |
116 |
Correct |
363 ms |
85732 KB |
Output is correct |
117 |
Correct |
102 ms |
57792 KB |
Output is correct |
118 |
Correct |
416 ms |
86080 KB |
Output is correct |
119 |
Correct |
377 ms |
45556 KB |
Output is correct |
120 |
Correct |
290 ms |
38016 KB |
Output is correct |