#include "closing.h"
#include <bits/stdc++.h>
#include <vector>
#define MAXN 200007
using namespace std;
vector<int> g[MAXN],w[MAXN];
long long d[2][MAXN];
long long pm[2*MAXN];
void dfs(int br,int s,int f,long long dist)
{
d[br][s]=dist;
for(int i=0;i<g[s].size();i++) if(g[s][i]!=f) dfs(br,g[s][i],s,dist+w[s][i]);
}
int max_score(int N, int X, int Y, long long K, std::vector<int> U, std::vector<int> V, std::vector<int> W)
{
for(int i=0;i<N;i++) g[i].clear();
for(int i=0;i<N;i++) w[i].clear();
for(int i=0;i<N-1;i++)
{
g[U[i]].push_back(V[i]);
g[V[i]].push_back(U[i]);
w[U[i]].push_back(W[i]);
w[V[i]].push_back(W[i]);
}
if(X>Y) swap(X,Y);
dfs(0,X,X,0);
dfs(1,Y,Y,0);
vector<long long> vk;
long long total=0;
int br=0,ans;
for(int i=0;i<N;i++) vk.push_back(d[0][i]);
for(int i=0;i<N;i++) vk.push_back(d[1][i]);
sort(vk.begin(),vk.end());
for(int i=0;i<vk.size();i++)
{
if(total+vk[i]<=K)
{
total+=vk[i];
br++;
}
}
ans=br;
vector<long long> p;
vector<pair<long long,long long> > v;
for(int i=0;i<N;i++) if(d[0][i]+d[1][i]!=d[0][Y])
{
long long a=min(d[0][i],d[1][i]),b=max(d[0][i],d[1][i]);
if(2*a<b)
{
v.push_back({2*a,0});
v.push_back({2*(b-a),0});
}
else v.push_back({b,-a});
}
sort(v.begin(),v.end());
p.push_back(0);
if(v.size()!=0)
{
long long pmin=1000000000000000000LL;
for(int i=v.size()-1;i>=0;i--)
{
if(v[i].second!=0) pmin=min(pmin,-v[i].second);
pm[i]=pmin;
}
long long last=0;
for(int i=0;i<v.size();i++)
{
if(!v[i].second)
{
p.push_back(p.back()+v[i].first/2);
last=v[i].first/2;
}
else
{
long long cur=p.back();
p.push_back(min(cur+pm[i],cur-last+v[i].first));
p.push_back(cur+v[i].first);
}
}
}
vector<pair<long long,int>> aux;
vector<int> put;
for(int i=0;i<N;i++) if(d[0][i]+d[1][i]==d[0][Y]) aux.push_back({d[0][i],i});
sort(aux.begin(),aux.end());
for(int i=0;i<aux.size();i++) put.push_back(aux[i].second);
/*for(int i=0;i<p.size();i++) cout<<p[i]<<" ";
cout<<endl;*/
for(int l=0;l<put.size();l++)
{
long long sum=0;
for(int i=0;i<l;i++) sum+=d[0][put[i]];
for(int i=l;i<put.size();i++) sum+=d[1][put[i]];
for(int r=l;r<put.size();r++)
{
sum+=max(d[0][put[r]],d[1][put[r]])-d[1][put[r]];
int lt=0,rt=p.size()-1;
if(sum>K) continue;
while(lt!=rt)
{
int s=(lt+rt+1)/2;
if(p[s]+sum>K) rt=s-1;
else lt=s;
}
ans=max(ans,(int)put.size()+r-l+1+lt);
}
}
return ans;
}
Compilation message
closing.cpp: In function 'void dfs(int, int, int, long long int)':
closing.cpp:12:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for(int i=0;i<g[s].size();i++) if(g[s][i]!=f) dfs(br,g[s][i],s,dist+w[s][i]);
| ~^~~~~~~~~~~~
closing.cpp: In function 'int max_score(int, int, int, long long int, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:34:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
34 | for(int i=0;i<vk.size();i++)
| ~^~~~~~~~~~
closing.cpp:66:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
66 | for(int i=0;i<v.size();i++)
| ~^~~~~~~~~
closing.cpp:85:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
85 | for(int i=0;i<aux.size();i++) put.push_back(aux[i].second);
| ~^~~~~~~~~~~
closing.cpp:88:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
88 | for(int l=0;l<put.size();l++)
| ~^~~~~~~~~~~
closing.cpp:92:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
92 | for(int i=l;i<put.size();i++) sum+=d[1][put[i]];
| ~^~~~~~~~~~~
closing.cpp:93:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
93 | for(int r=l;r<put.size();r++)
| ~^~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1062 ms |
51980 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
3 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13660 KB |
Output is correct |
4 |
Correct |
3 ms |
13656 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
2 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
3 ms |
13660 KB |
Output is correct |
9 |
Correct |
3 ms |
13656 KB |
Output is correct |
10 |
Correct |
3 ms |
13660 KB |
Output is correct |
11 |
Correct |
3 ms |
13656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
3 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13660 KB |
Output is correct |
4 |
Correct |
3 ms |
13656 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
2 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
3 ms |
13660 KB |
Output is correct |
9 |
Correct |
3 ms |
13656 KB |
Output is correct |
10 |
Correct |
3 ms |
13660 KB |
Output is correct |
11 |
Correct |
3 ms |
13656 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13656 KB |
Output is correct |
14 |
Correct |
3 ms |
13656 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13656 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
4 ms |
13816 KB |
Output is correct |
19 |
Correct |
4 ms |
13912 KB |
Output is correct |
20 |
Correct |
3 ms |
13752 KB |
Output is correct |
21 |
Correct |
4 ms |
13916 KB |
Output is correct |
22 |
Correct |
3 ms |
13912 KB |
Output is correct |
23 |
Correct |
3 ms |
13916 KB |
Output is correct |
24 |
Correct |
4 ms |
13912 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
3 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13660 KB |
Output is correct |
4 |
Correct |
3 ms |
13656 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
2 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
3 ms |
13660 KB |
Output is correct |
9 |
Correct |
3 ms |
13656 KB |
Output is correct |
10 |
Correct |
3 ms |
13660 KB |
Output is correct |
11 |
Correct |
3 ms |
13656 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13656 KB |
Output is correct |
14 |
Correct |
3 ms |
13656 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13656 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
4 ms |
13816 KB |
Output is correct |
19 |
Correct |
4 ms |
13912 KB |
Output is correct |
20 |
Correct |
3 ms |
13752 KB |
Output is correct |
21 |
Correct |
4 ms |
13916 KB |
Output is correct |
22 |
Correct |
3 ms |
13912 KB |
Output is correct |
23 |
Correct |
3 ms |
13916 KB |
Output is correct |
24 |
Correct |
4 ms |
13912 KB |
Output is correct |
25 |
Correct |
4 ms |
13912 KB |
Output is correct |
26 |
Correct |
5 ms |
14428 KB |
Output is correct |
27 |
Correct |
6 ms |
14428 KB |
Output is correct |
28 |
Correct |
27 ms |
14424 KB |
Output is correct |
29 |
Correct |
35 ms |
14484 KB |
Output is correct |
30 |
Correct |
5 ms |
14424 KB |
Output is correct |
31 |
Correct |
14 ms |
14424 KB |
Output is correct |
32 |
Correct |
14 ms |
14680 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
2 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13656 KB |
Output is correct |
4 |
Correct |
3 ms |
13660 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
3 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
3 ms |
13656 KB |
Output is correct |
9 |
Correct |
2 ms |
13656 KB |
Output is correct |
10 |
Correct |
2 ms |
13656 KB |
Output is correct |
11 |
Correct |
3 ms |
13656 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13660 KB |
Output is correct |
14 |
Correct |
3 ms |
13912 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13660 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
3 ms |
13660 KB |
Output is correct |
19 |
Correct |
3 ms |
13660 KB |
Output is correct |
20 |
Correct |
3 ms |
13656 KB |
Output is correct |
21 |
Correct |
3 ms |
13656 KB |
Output is correct |
22 |
Correct |
3 ms |
13656 KB |
Output is correct |
23 |
Correct |
3 ms |
13660 KB |
Output is correct |
24 |
Correct |
2 ms |
13656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
2 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13656 KB |
Output is correct |
4 |
Correct |
3 ms |
13660 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
3 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
2 ms |
13656 KB |
Output is correct |
9 |
Correct |
3 ms |
13660 KB |
Output is correct |
10 |
Correct |
3 ms |
13656 KB |
Output is correct |
11 |
Correct |
3 ms |
13660 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13656 KB |
Output is correct |
14 |
Correct |
3 ms |
13656 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13656 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
3 ms |
13656 KB |
Output is correct |
19 |
Correct |
2 ms |
13656 KB |
Output is correct |
20 |
Correct |
3 ms |
13656 KB |
Output is correct |
21 |
Correct |
2 ms |
13656 KB |
Output is correct |
22 |
Correct |
2 ms |
13656 KB |
Output is correct |
23 |
Correct |
3 ms |
13656 KB |
Output is correct |
24 |
Correct |
3 ms |
13656 KB |
Output is correct |
25 |
Correct |
3 ms |
13660 KB |
Output is correct |
26 |
Correct |
3 ms |
13912 KB |
Output is correct |
27 |
Correct |
3 ms |
13656 KB |
Output is correct |
28 |
Correct |
3 ms |
13660 KB |
Output is correct |
29 |
Correct |
3 ms |
13656 KB |
Output is correct |
30 |
Correct |
3 ms |
13660 KB |
Output is correct |
31 |
Correct |
3 ms |
13660 KB |
Output is correct |
32 |
Correct |
3 ms |
13656 KB |
Output is correct |
33 |
Correct |
3 ms |
13656 KB |
Output is correct |
34 |
Correct |
3 ms |
13656 KB |
Output is correct |
35 |
Correct |
3 ms |
13660 KB |
Output is correct |
36 |
Correct |
2 ms |
13656 KB |
Output is correct |
37 |
Correct |
3 ms |
13656 KB |
Output is correct |
38 |
Correct |
3 ms |
13660 KB |
Output is correct |
39 |
Correct |
3 ms |
13660 KB |
Output is correct |
40 |
Correct |
3 ms |
13656 KB |
Output is correct |
41 |
Correct |
3 ms |
13656 KB |
Output is correct |
42 |
Correct |
3 ms |
13660 KB |
Output is correct |
43 |
Correct |
3 ms |
13656 KB |
Output is correct |
44 |
Correct |
3 ms |
13656 KB |
Output is correct |
45 |
Correct |
3 ms |
13656 KB |
Output is correct |
46 |
Correct |
3 ms |
13656 KB |
Output is correct |
47 |
Correct |
3 ms |
13656 KB |
Output is correct |
48 |
Correct |
3 ms |
13656 KB |
Output is correct |
49 |
Correct |
3 ms |
13816 KB |
Output is correct |
50 |
Correct |
3 ms |
13656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
2 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13656 KB |
Output is correct |
4 |
Correct |
3 ms |
13660 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
3 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
2 ms |
13656 KB |
Output is correct |
9 |
Correct |
3 ms |
13660 KB |
Output is correct |
10 |
Correct |
3 ms |
13656 KB |
Output is correct |
11 |
Correct |
3 ms |
13660 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13656 KB |
Output is correct |
14 |
Correct |
3 ms |
13656 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13656 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
3 ms |
13656 KB |
Output is correct |
19 |
Correct |
4 ms |
13816 KB |
Output is correct |
20 |
Correct |
4 ms |
13912 KB |
Output is correct |
21 |
Correct |
3 ms |
13752 KB |
Output is correct |
22 |
Correct |
4 ms |
13916 KB |
Output is correct |
23 |
Correct |
3 ms |
13912 KB |
Output is correct |
24 |
Correct |
3 ms |
13916 KB |
Output is correct |
25 |
Correct |
4 ms |
13912 KB |
Output is correct |
26 |
Correct |
2 ms |
13656 KB |
Output is correct |
27 |
Correct |
3 ms |
13656 KB |
Output is correct |
28 |
Correct |
2 ms |
13656 KB |
Output is correct |
29 |
Correct |
2 ms |
13656 KB |
Output is correct |
30 |
Correct |
3 ms |
13656 KB |
Output is correct |
31 |
Correct |
3 ms |
13656 KB |
Output is correct |
32 |
Correct |
3 ms |
13660 KB |
Output is correct |
33 |
Correct |
3 ms |
13912 KB |
Output is correct |
34 |
Correct |
3 ms |
13656 KB |
Output is correct |
35 |
Correct |
3 ms |
13660 KB |
Output is correct |
36 |
Correct |
3 ms |
13656 KB |
Output is correct |
37 |
Correct |
3 ms |
13660 KB |
Output is correct |
38 |
Correct |
3 ms |
13660 KB |
Output is correct |
39 |
Correct |
3 ms |
13656 KB |
Output is correct |
40 |
Correct |
3 ms |
13656 KB |
Output is correct |
41 |
Correct |
3 ms |
13656 KB |
Output is correct |
42 |
Correct |
3 ms |
13660 KB |
Output is correct |
43 |
Correct |
2 ms |
13656 KB |
Output is correct |
44 |
Correct |
3 ms |
13656 KB |
Output is correct |
45 |
Correct |
3 ms |
13660 KB |
Output is correct |
46 |
Correct |
3 ms |
13660 KB |
Output is correct |
47 |
Correct |
3 ms |
13656 KB |
Output is correct |
48 |
Correct |
3 ms |
13656 KB |
Output is correct |
49 |
Correct |
3 ms |
13660 KB |
Output is correct |
50 |
Correct |
3 ms |
13656 KB |
Output is correct |
51 |
Correct |
3 ms |
13656 KB |
Output is correct |
52 |
Correct |
3 ms |
13656 KB |
Output is correct |
53 |
Correct |
3 ms |
13656 KB |
Output is correct |
54 |
Correct |
3 ms |
13656 KB |
Output is correct |
55 |
Correct |
3 ms |
13656 KB |
Output is correct |
56 |
Correct |
3 ms |
13816 KB |
Output is correct |
57 |
Correct |
3 ms |
13656 KB |
Output is correct |
58 |
Correct |
3 ms |
13912 KB |
Output is correct |
59 |
Correct |
3 ms |
13656 KB |
Output is correct |
60 |
Correct |
3 ms |
13656 KB |
Output is correct |
61 |
Correct |
3 ms |
13656 KB |
Output is correct |
62 |
Correct |
3 ms |
13656 KB |
Output is correct |
63 |
Correct |
3 ms |
13912 KB |
Output is correct |
64 |
Correct |
3 ms |
13912 KB |
Output is correct |
65 |
Correct |
3 ms |
13912 KB |
Output is correct |
66 |
Correct |
3 ms |
13912 KB |
Output is correct |
67 |
Correct |
3 ms |
13912 KB |
Output is correct |
68 |
Correct |
3 ms |
13912 KB |
Output is correct |
69 |
Correct |
4 ms |
13912 KB |
Output is correct |
70 |
Correct |
3 ms |
13912 KB |
Output is correct |
71 |
Correct |
3 ms |
13912 KB |
Output is correct |
72 |
Correct |
3 ms |
13912 KB |
Output is correct |
73 |
Correct |
3 ms |
13912 KB |
Output is correct |
74 |
Correct |
3 ms |
13912 KB |
Output is correct |
75 |
Correct |
3 ms |
13656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
2 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13656 KB |
Output is correct |
4 |
Correct |
3 ms |
13660 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
3 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
2 ms |
13656 KB |
Output is correct |
9 |
Correct |
3 ms |
13660 KB |
Output is correct |
10 |
Correct |
3 ms |
13656 KB |
Output is correct |
11 |
Correct |
3 ms |
13660 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13656 KB |
Output is correct |
14 |
Correct |
3 ms |
13656 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13656 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
3 ms |
13656 KB |
Output is correct |
19 |
Correct |
4 ms |
13816 KB |
Output is correct |
20 |
Correct |
4 ms |
13912 KB |
Output is correct |
21 |
Correct |
3 ms |
13752 KB |
Output is correct |
22 |
Correct |
4 ms |
13916 KB |
Output is correct |
23 |
Correct |
3 ms |
13912 KB |
Output is correct |
24 |
Correct |
3 ms |
13916 KB |
Output is correct |
25 |
Correct |
4 ms |
13912 KB |
Output is correct |
26 |
Correct |
4 ms |
13912 KB |
Output is correct |
27 |
Correct |
5 ms |
14428 KB |
Output is correct |
28 |
Correct |
6 ms |
14428 KB |
Output is correct |
29 |
Correct |
27 ms |
14424 KB |
Output is correct |
30 |
Correct |
35 ms |
14484 KB |
Output is correct |
31 |
Correct |
5 ms |
14424 KB |
Output is correct |
32 |
Correct |
14 ms |
14424 KB |
Output is correct |
33 |
Correct |
14 ms |
14680 KB |
Output is correct |
34 |
Correct |
2 ms |
13656 KB |
Output is correct |
35 |
Correct |
3 ms |
13656 KB |
Output is correct |
36 |
Correct |
2 ms |
13656 KB |
Output is correct |
37 |
Correct |
2 ms |
13656 KB |
Output is correct |
38 |
Correct |
3 ms |
13656 KB |
Output is correct |
39 |
Correct |
3 ms |
13656 KB |
Output is correct |
40 |
Correct |
3 ms |
13660 KB |
Output is correct |
41 |
Correct |
3 ms |
13912 KB |
Output is correct |
42 |
Correct |
3 ms |
13656 KB |
Output is correct |
43 |
Correct |
3 ms |
13660 KB |
Output is correct |
44 |
Correct |
3 ms |
13656 KB |
Output is correct |
45 |
Correct |
3 ms |
13660 KB |
Output is correct |
46 |
Correct |
3 ms |
13660 KB |
Output is correct |
47 |
Correct |
3 ms |
13656 KB |
Output is correct |
48 |
Correct |
3 ms |
13656 KB |
Output is correct |
49 |
Correct |
3 ms |
13656 KB |
Output is correct |
50 |
Correct |
3 ms |
13660 KB |
Output is correct |
51 |
Correct |
2 ms |
13656 KB |
Output is correct |
52 |
Correct |
3 ms |
13656 KB |
Output is correct |
53 |
Correct |
3 ms |
13660 KB |
Output is correct |
54 |
Correct |
3 ms |
13660 KB |
Output is correct |
55 |
Correct |
3 ms |
13656 KB |
Output is correct |
56 |
Correct |
3 ms |
13656 KB |
Output is correct |
57 |
Correct |
3 ms |
13660 KB |
Output is correct |
58 |
Correct |
3 ms |
13656 KB |
Output is correct |
59 |
Correct |
3 ms |
13656 KB |
Output is correct |
60 |
Correct |
3 ms |
13656 KB |
Output is correct |
61 |
Correct |
3 ms |
13656 KB |
Output is correct |
62 |
Correct |
3 ms |
13656 KB |
Output is correct |
63 |
Correct |
3 ms |
13656 KB |
Output is correct |
64 |
Correct |
3 ms |
13816 KB |
Output is correct |
65 |
Correct |
3 ms |
13656 KB |
Output is correct |
66 |
Correct |
3 ms |
13912 KB |
Output is correct |
67 |
Correct |
3 ms |
13656 KB |
Output is correct |
68 |
Correct |
3 ms |
13656 KB |
Output is correct |
69 |
Correct |
3 ms |
13656 KB |
Output is correct |
70 |
Correct |
3 ms |
13656 KB |
Output is correct |
71 |
Correct |
3 ms |
13912 KB |
Output is correct |
72 |
Correct |
3 ms |
13912 KB |
Output is correct |
73 |
Correct |
3 ms |
13912 KB |
Output is correct |
74 |
Correct |
3 ms |
13912 KB |
Output is correct |
75 |
Correct |
3 ms |
13912 KB |
Output is correct |
76 |
Correct |
3 ms |
13912 KB |
Output is correct |
77 |
Correct |
4 ms |
13912 KB |
Output is correct |
78 |
Correct |
3 ms |
13912 KB |
Output is correct |
79 |
Correct |
3 ms |
13912 KB |
Output is correct |
80 |
Correct |
3 ms |
13912 KB |
Output is correct |
81 |
Correct |
3 ms |
13912 KB |
Output is correct |
82 |
Correct |
3 ms |
13912 KB |
Output is correct |
83 |
Correct |
3 ms |
13656 KB |
Output is correct |
84 |
Correct |
4 ms |
13912 KB |
Output is correct |
85 |
Correct |
4 ms |
13912 KB |
Output is correct |
86 |
Correct |
4 ms |
13916 KB |
Output is correct |
87 |
Correct |
4 ms |
13912 KB |
Output is correct |
88 |
Incorrect |
4 ms |
13912 KB |
1st lines differ - on the 1st token, expected: '158', found: '157' |
89 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
13656 KB |
Output is correct |
2 |
Correct |
2 ms |
13656 KB |
Output is correct |
3 |
Correct |
3 ms |
13656 KB |
Output is correct |
4 |
Correct |
3 ms |
13660 KB |
Output is correct |
5 |
Correct |
3 ms |
13656 KB |
Output is correct |
6 |
Correct |
3 ms |
13656 KB |
Output is correct |
7 |
Correct |
2 ms |
13656 KB |
Output is correct |
8 |
Correct |
2 ms |
13656 KB |
Output is correct |
9 |
Correct |
3 ms |
13660 KB |
Output is correct |
10 |
Correct |
3 ms |
13656 KB |
Output is correct |
11 |
Correct |
3 ms |
13660 KB |
Output is correct |
12 |
Correct |
3 ms |
13656 KB |
Output is correct |
13 |
Correct |
3 ms |
13656 KB |
Output is correct |
14 |
Correct |
3 ms |
13656 KB |
Output is correct |
15 |
Correct |
3 ms |
13656 KB |
Output is correct |
16 |
Correct |
3 ms |
13656 KB |
Output is correct |
17 |
Correct |
3 ms |
13656 KB |
Output is correct |
18 |
Correct |
3 ms |
13656 KB |
Output is correct |
19 |
Correct |
4 ms |
13816 KB |
Output is correct |
20 |
Correct |
4 ms |
13912 KB |
Output is correct |
21 |
Correct |
3 ms |
13752 KB |
Output is correct |
22 |
Correct |
4 ms |
13916 KB |
Output is correct |
23 |
Correct |
3 ms |
13912 KB |
Output is correct |
24 |
Correct |
3 ms |
13916 KB |
Output is correct |
25 |
Correct |
4 ms |
13912 KB |
Output is correct |
26 |
Correct |
4 ms |
13912 KB |
Output is correct |
27 |
Correct |
5 ms |
14428 KB |
Output is correct |
28 |
Correct |
6 ms |
14428 KB |
Output is correct |
29 |
Correct |
27 ms |
14424 KB |
Output is correct |
30 |
Correct |
35 ms |
14484 KB |
Output is correct |
31 |
Correct |
5 ms |
14424 KB |
Output is correct |
32 |
Correct |
14 ms |
14424 KB |
Output is correct |
33 |
Correct |
14 ms |
14680 KB |
Output is correct |
34 |
Correct |
2 ms |
13656 KB |
Output is correct |
35 |
Correct |
3 ms |
13656 KB |
Output is correct |
36 |
Correct |
2 ms |
13656 KB |
Output is correct |
37 |
Correct |
2 ms |
13656 KB |
Output is correct |
38 |
Correct |
3 ms |
13656 KB |
Output is correct |
39 |
Correct |
3 ms |
13656 KB |
Output is correct |
40 |
Correct |
3 ms |
13660 KB |
Output is correct |
41 |
Correct |
3 ms |
13912 KB |
Output is correct |
42 |
Correct |
3 ms |
13656 KB |
Output is correct |
43 |
Correct |
3 ms |
13660 KB |
Output is correct |
44 |
Correct |
3 ms |
13656 KB |
Output is correct |
45 |
Correct |
3 ms |
13660 KB |
Output is correct |
46 |
Correct |
3 ms |
13660 KB |
Output is correct |
47 |
Correct |
3 ms |
13656 KB |
Output is correct |
48 |
Correct |
3 ms |
13656 KB |
Output is correct |
49 |
Correct |
3 ms |
13656 KB |
Output is correct |
50 |
Correct |
3 ms |
13660 KB |
Output is correct |
51 |
Correct |
2 ms |
13656 KB |
Output is correct |
52 |
Correct |
3 ms |
13656 KB |
Output is correct |
53 |
Correct |
3 ms |
13660 KB |
Output is correct |
54 |
Correct |
3 ms |
13660 KB |
Output is correct |
55 |
Correct |
3 ms |
13656 KB |
Output is correct |
56 |
Correct |
3 ms |
13656 KB |
Output is correct |
57 |
Correct |
3 ms |
13660 KB |
Output is correct |
58 |
Correct |
3 ms |
13656 KB |
Output is correct |
59 |
Correct |
3 ms |
13656 KB |
Output is correct |
60 |
Correct |
3 ms |
13656 KB |
Output is correct |
61 |
Correct |
3 ms |
13656 KB |
Output is correct |
62 |
Correct |
3 ms |
13656 KB |
Output is correct |
63 |
Correct |
3 ms |
13656 KB |
Output is correct |
64 |
Correct |
3 ms |
13816 KB |
Output is correct |
65 |
Correct |
3 ms |
13656 KB |
Output is correct |
66 |
Correct |
3 ms |
13912 KB |
Output is correct |
67 |
Correct |
3 ms |
13656 KB |
Output is correct |
68 |
Correct |
3 ms |
13656 KB |
Output is correct |
69 |
Correct |
3 ms |
13656 KB |
Output is correct |
70 |
Correct |
3 ms |
13656 KB |
Output is correct |
71 |
Correct |
3 ms |
13912 KB |
Output is correct |
72 |
Correct |
3 ms |
13912 KB |
Output is correct |
73 |
Correct |
3 ms |
13912 KB |
Output is correct |
74 |
Correct |
3 ms |
13912 KB |
Output is correct |
75 |
Correct |
3 ms |
13912 KB |
Output is correct |
76 |
Correct |
3 ms |
13912 KB |
Output is correct |
77 |
Correct |
4 ms |
13912 KB |
Output is correct |
78 |
Correct |
3 ms |
13912 KB |
Output is correct |
79 |
Correct |
3 ms |
13912 KB |
Output is correct |
80 |
Correct |
3 ms |
13912 KB |
Output is correct |
81 |
Correct |
3 ms |
13912 KB |
Output is correct |
82 |
Correct |
3 ms |
13912 KB |
Output is correct |
83 |
Correct |
3 ms |
13656 KB |
Output is correct |
84 |
Correct |
4 ms |
13912 KB |
Output is correct |
85 |
Correct |
4 ms |
13912 KB |
Output is correct |
86 |
Correct |
4 ms |
13916 KB |
Output is correct |
87 |
Correct |
4 ms |
13912 KB |
Output is correct |
88 |
Incorrect |
4 ms |
13912 KB |
1st lines differ - on the 1st token, expected: '158', found: '157' |
89 |
Halted |
0 ms |
0 KB |
- |