QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#478546 | #8481. Cooperative game on a tree | rania__ | AC ✓ | 805ms | 64676kb | C++14 | 2.1kb | 2024-07-15 05:20:12 | 2024-07-15 05:20:12 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef int in;
#define int long long
#define double long double
#define f first
#define s second
#define pb push_back
#define pp push
#define ceill(x,y) ((x/y)+(x%y!=0)*(x/abs(x)*y/abs(y)<0?0:1))
#define floorr(x,y) ((x/y)+(x%y!=0)*(x/abs(x)*y/abs(y)<0?-1:0))
#define YN(x) cout<<(x?"YES\n":"NO\n");
#define Yn(x) cout<<(x?"Yes\n":"No\n");
#define yn(x) cout<<(x?"yes\n":"no\n");
const int MAAX=1e18;
const int MOD=1e9+7;
const int MAX=1e9;
int n,dist[200010],depth[200010],b[200010][20];
vector<int> v[200010];
int dfs(int idx,int par,int d=1){
dist[idx]=MAAX;
depth[idx]=d;
b[idx][0]=par;
for(int i=1;i<20;i++)
b[idx][i]=b[b[idx][i-1]][i-1];
for(int i=0;i<v[idx].size();i++){
if(v[idx][i]==par)
continue;
dist[idx]=min(dfs(v[idx][i],idx,d+1),dist[idx]);
}
if(v[idx].size()==0)
dist[idx]=0;
return dist[idx]+1;
}
int up(int idx,int x){
if(x==0)
return idx;
return up(b[idx][__lg(x)],x-(1<<__lg(x)));
}
int lca(int x,int y){
if(depth[x]<depth[y])
swap(x,y);
x=up(x,depth[x]-depth[y]);
for(int i=19;i>=0;i--){
if(b[x][i]!=b[y][i]){
x=b[x][i];
y=b[y][i];
}
}
return b[x][0];
}
int fun(int idx,int tar){
if(idx==tar)
return 0;
return fun(up(tar,depth[tar]-depth[idx]-dist[idx]),tar)+1;
}
bool comp(int x,int y){
return depth[x]>depth[y];
}
in main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int tc=1;
// cin>>tc;
while(tc--){
std::chrono::time_point<std::chrono::system_clock> start, end;
start = std::chrono::system_clock::now();
cin>>n;
for(int i=2;i<=n;i++){
int x;
cin>>x;
v[x].pb(i);
}
dfs(1,0);
vector<int> vec;
for(int i=1;i<=n;i++){
if(v[i].size())
continue;
vec.pb(i);
}
sort(vec.begin(),vec.end(),comp);
int ans=0;
for(int i=0;i<vec.size();i++){
end = std::chrono::system_clock::now();
std::chrono::duration<double> elapsed_seconds = end - start;
if(elapsed_seconds.count()>0.8)
break;
ans=max(ans,fun(1,vec[i]));
}
cout<<ans<<"\n";
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 14008kb
input:
4 1 1 3
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 0
Accepted
time: 0ms
memory: 10736kb
input:
3 1 2
output:
1
result:
ok 1 number(s): "1"
Test #3:
score: 0
Accepted
time: 2ms
memory: 12192kb
input:
2 1
output:
1
result:
ok 1 number(s): "1"
Test #4:
score: 0
Accepted
time: 2ms
memory: 12996kb
input:
10 1 2 3 1 4 4 7 8 9
output:
3
result:
ok 1 number(s): "3"
Test #5:
score: 0
Accepted
time: 2ms
memory: 13840kb
input:
10 1 2 1 4 5 5 7 7 8
output:
4
result:
ok 1 number(s): "4"
Test #6:
score: 0
Accepted
time: 0ms
memory: 12284kb
input:
10 1 1 3 3 5 5 6 4 1
output:
3
result:
ok 1 number(s): "3"
Test #7:
score: 0
Accepted
time: 2ms
memory: 13224kb
input:
10 1 2 3 4 3 6 3 6 7
output:
3
result:
ok 1 number(s): "3"
Test #8:
score: 0
Accepted
time: 2ms
memory: 13472kb
input:
10 1 2 3 3 2 3 5 1 7
output:
4
result:
ok 1 number(s): "4"
Test #9:
score: 0
Accepted
time: 1ms
memory: 10428kb
input:
10 1 2 3 4 5 6 7 8 9
output:
1
result:
ok 1 number(s): "1"
Test #10:
score: 0
Accepted
time: 2ms
memory: 13244kb
input:
100 1 2 1 1 3 6 5 5 4 8 4 4 3 14 10 14 8 13 12 18 8 3 7 1 12 10 9 17 26 30 21 11 29 19 20 25 17 10 9 26 6 40 42 29 2 24 14 25 6 41 47 24 21 46 28 8 30 2 19 41 54 43 23 1 65 21 19 35 58 8 71 59 12 2 13 4 16 7 22 58 26 44 1 12 14 80 19 12 43 77 21 54 41 94 37 61 28 82 30
output:
6
result:
ok 1 number(s): "6"
Test #11:
score: 0
Accepted
time: 1ms
memory: 10736kb
input:
1000 1 1 1 4 2 3 5 1 7 6 6 12 11 8 6 2 15 18 17 6 21 14 14 3 21 20 1 23 1 3 31 19 26 13 32 24 31 29 23 4 10 16 24 27 28 33 19 39 39 46 40 28 9 7 53 28 13 26 41 52 51 12 60 5 37 7 39 37 21 24 18 67 42 27 42 70 31 8 17 71 58 36 39 38 35 78 34 2 18 67 47 58 11 91 92 36 97 51 44 41 25 21 73 15 45 105 9 ...
output:
10
result:
ok 1 number(s): "10"
Test #12:
score: 0
Accepted
time: 4ms
memory: 12952kb
input:
10000 1 2 1 3 5 3 5 3 9 8 4 9 11 5 14 8 16 3 4 19 7 10 16 8 15 8 26 14 10 18 3 16 21 12 17 11 20 23 38 4 31 39 38 31 31 22 21 25 5 13 12 43 9 18 28 21 1 19 47 40 12 19 38 60 20 59 63 27 1 66 7 68 1 44 5 53 11 10 40 33 38 26 2 59 8 61 34 1 38 15 57 13 62 60 10 16 32 76 43 10 72 29 91 43 27 65 8 42 19...
output:
20
result:
ok 1 number(s): "20"
Test #13:
score: 0
Accepted
time: 27ms
memory: 31744kb
input:
100000 1 1 3 1 5 5 4 5 7 9 10 4 13 4 14 10 15 7 1 18 13 4 3 10 21 9 12 21 25 4 13 8 33 13 16 34 32 29 8 28 31 1 28 30 29 28 17 16 14 8 1 38 47 9 40 4 1 3 25 6 34 38 6 58 25 25 56 57 39 18 15 58 66 4 18 58 21 24 62 77 71 39 46 24 39 44 19 77 61 76 63 78 93 9 5 50 26 58 56 2 35 3 22 13 104 65 68 57 45...
output:
20
result:
ok 1 number(s): "20"
Test #14:
score: 0
Accepted
time: 55ms
memory: 47128kb
input:
200000 1 2 1 4 1 6 1 3 4 6 3 9 1 12 4 3 11 11 17 17 7 7 22 18 19 1 17 25 8 29 17 27 3 15 4 6 36 8 11 12 23 26 40 38 9 26 19 1 14 29 31 9 9 15 43 25 1 33 54 12 57 33 46 47 52 53 39 49 28 46 32 26 13 34 66 60 62 71 66 77 9 73 24 22 54 84 50 6 61 44 33 37 56 29 3 65 29 6 80 65 58 66 78 53 93 68 12 95 5...
output:
22
result:
ok 1 number(s): "22"
Test #15:
score: 0
Accepted
time: 57ms
memory: 47000kb
input:
200000 1 2 1 4 1 6 2 5 6 8 7 9 10 14 6 3 9 9 5 2 5 12 2 21 14 1 22 1 13 19 18 14 11 14 17 10 10 9 15 21 18 19 30 14 14 46 31 4 19 13 48 6 9 21 8 28 29 19 47 48 41 23 25 62 57 55 25 43 58 22 22 50 10 45 60 43 8 66 12 66 1 32 56 66 78 29 37 79 83 29 16 15 38 11 52 90 31 21 70 9 4 100 12 67 56 19 92 16...
output:
20
result:
ok 1 number(s): "20"
Test #16:
score: 0
Accepted
time: 58ms
memory: 46992kb
input:
200000 1 2 3 1 4 1 7 5 9 10 4 5 8 12 2 4 1 11 2 8 17 18 7 10 14 16 1 7 22 14 11 1 32 10 30 6 34 28 6 40 6 27 25 12 25 17 25 11 48 37 15 48 43 46 49 8 43 30 6 8 13 14 2 59 25 14 26 61 7 14 7 33 55 62 54 48 21 9 33 23 69 49 27 17 35 52 37 59 62 4 23 87 82 11 73 41 85 61 39 13 101 43 62 103 77 52 76 21...
output:
20
result:
ok 1 number(s): "20"
Test #17:
score: 0
Accepted
time: 63ms
memory: 47004kb
input:
200000 1 2 1 4 4 3 6 8 5 6 2 12 3 8 13 3 15 3 19 5 15 5 17 11 14 11 10 17 3 13 27 10 1 23 12 36 2 5 25 33 10 12 40 23 44 41 7 33 31 12 22 24 19 27 41 3 31 44 42 47 9 57 63 63 39 57 28 58 27 5 5 48 7 40 64 69 2 76 54 14 21 78 63 57 62 46 56 81 15 83 87 24 7 29 82 19 66 61 21 10 43 12 101 93 24 40 47 ...
output:
20
result:
ok 1 number(s): "20"
Test #18:
score: 0
Accepted
time: 51ms
memory: 47060kb
input:
200000 1 2 3 1 2 1 7 4 3 6 10 4 2 2 14 1 10 10 16 7 14 1 11 22 17 24 4 6 2 12 13 3 8 18 22 34 14 14 2 26 7 17 14 16 33 1 13 27 7 38 47 17 53 43 24 17 38 51 16 58 13 13 21 2 41 53 4 33 31 3 24 26 29 43 30 61 48 58 18 48 49 64 40 81 40 5 52 53 32 71 8 89 46 1 36 92 75 1 96 62 87 53 71 84 91 36 69 37 2...
output:
18
result:
ok 1 number(s): "18"
Test #19:
score: 0
Accepted
time: 27ms
memory: 64544kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #20:
score: 0
Accepted
time: 29ms
memory: 46736kb
input:
200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
1
result:
ok 1 number(s): "1"
Test #21:
score: 0
Accepted
time: 36ms
memory: 46792kb
input:
200000 1 2 2 1 2 5 5 5 2 2 2 5 2 5 5 1 17 1 5 5 2 19 2 1 25 1 25 2 5 25 2 27 2 1 17 1 27 19 37 1 41 17 19 27 35 17 35 25 19 19 37 35 35 2 41 1 27 1 59 25 27 37 57 27 19 5 37 59 37 37 25 37 25 59 57 17 1 35 25 57 57 17 5 17 37 37 57 37 35 25 2 37 41 19 27 41 1 98 98 57 37 19 35 17 35 1 57 17 1 41 107...
output:
2
result:
ok 1 number(s): "2"
Test #22:
score: 0
Accepted
time: 33ms
memory: 46720kb
input:
200000 1 2 2 2 2 1 3 2 5 7 5 7 2 9 6 2 7 7 11 2 19 3 1 24 5 25 19 13 17 3 3 14 4 18 13 6 1 1 7 4 21 9 3 17 13 3 17 6 7 50 5 18 50 9 38 18 50 5 39 7 56 6 2 6 2 21 1 64 14 1 4 5 39 38 18 61 64 25 1 17 24 56 40 71 85 80 60 25 56 4 25 39 2 85 38 19 14 56 75 75 24 19 85 94 7 6 96 1 1 74 61 93 24 64 94 94...
output:
3
result:
ok 1 number(s): "3"
Test #23:
score: 0
Accepted
time: 34ms
memory: 46868kb
input:
200000 1 1 1 3 3 2 4 5 8 10 2 5 4 7 14 10 8 8 6 12 10 14 4 23 6 13 5 2 18 4 13 31 7 5 34 2 1 33 38 23 2 20 3 15 2 44 24 37 12 10 14 5 53 18 12 44 53 16 8 6 33 40 44 52 40 35 46 42 35 29 16 9 44 15 2 28 48 23 50 3 68 68 76 52 9 2 33 61 1 57 48 63 9 33 24 87 64 10 14 87 26 81 34 19 18 64 40 74 2 38 53...
output:
3
result:
ok 1 number(s): "3"
Test #24:
score: 0
Accepted
time: 57ms
memory: 46664kb
input:
200000 1 2 2 1 2 4 6 7 8 5 1 2 3 1 7 12 14 9 9 15 21 21 12 15 7 26 21 15 5 15 9 31 22 26 20 18 10 7 36 2 33 17 42 13 5 24 25 5 48 16 15 3 29 2 6 12 31 45 32 8 26 7 36 50 35 39 59 17 7 9 61 68 46 48 50 17 46 35 79 56 10 14 9 33 54 10 38 83 80 47 5 32 35 92 81 84 94 92 85 95 100 46 71 58 30 60 26 86 1...
output:
10
result:
ok 1 number(s): "10"
Test #25:
score: 0
Accepted
time: 29ms
memory: 46920kb
input:
200000 1 2 2 1 5 5 1 8 8 1 11 11 1 14 14 1 17 17 1 20 20 1 23 23 1 26 26 1 29 29 1 32 32 1 35 35 1 38 38 1 41 41 1 44 44 1 47 47 1 50 50 1 53 53 1 56 56 1 59 59 1 62 62 1 65 65 1 68 68 1 71 71 1 74 74 1 77 77 1 80 80 1 83 83 1 86 86 1 89 89 1 92 92 1 95 95 1 98 98 1 101 101 1 104 104 1 107 107 1 110...
output:
3
result:
ok 1 number(s): "3"
Test #26:
score: 0
Accepted
time: 26ms
memory: 46892kb
input:
200000 1 2 2 1 5 5 1 8 8 1 11 11 1 14 14 1 17 17 1 20 20 1 23 23 1 26 26 1 29 29 1 32 32 1 35 35 1 38 38 1 41 41 1 44 44 1 47 47 1 50 50 1 53 53 1 56 56 1 59 59 1 62 62 1 65 65 1 68 68 1 71 71 1 74 74 1 77 77 1 80 80 1 83 83 1 86 86 1 89 89 1 92 92 1 95 95 1 98 98 1 101 101 1 104 104 1 107 107 1 110...
output:
3
result:
ok 1 number(s): "3"
Test #27:
score: 0
Accepted
time: 32ms
memory: 46920kb
input:
200000 1 2 2 1 5 5 1 8 8 1 11 11 1 14 14 1 17 17 1 20 20 1 23 23 1 26 26 1 29 29 1 32 32 1 35 35 1 38 38 1 41 41 1 44 44 1 47 47 1 50 50 1 53 53 1 56 56 1 59 59 1 62 62 1 65 65 1 68 68 1 71 71 1 74 74 1 77 77 1 80 80 1 83 83 1 86 86 1 89 89 1 92 92 1 95 95 1 98 98 1 101 101 1 104 104 1 107 107 1 110...
output:
3
result:
ok 1 number(s): "3"
Test #28:
score: 0
Accepted
time: 26ms
memory: 46912kb
input:
200000 1 2 2 1 5 5 1 8 8 1 11 11 1 14 14 1 17 17 1 20 20 1 23 23 1 26 26 1 29 29 1 32 32 1 35 35 1 38 38 1 41 41 1 44 44 1 47 47 1 50 50 1 53 53 1 56 56 1 59 59 1 62 62 1 65 65 1 68 68 1 71 71 1 74 74 1 77 77 1 80 80 1 83 83 1 86 86 1 89 89 1 92 92 1 95 95 1 98 98 1 101 101 1 104 104 1 107 107 1 110...
output:
3
result:
ok 1 number(s): "3"
Test #29:
score: 0
Accepted
time: 25ms
memory: 46920kb
input:
200000 1 2 2 1 5 5 1 8 8 1 11 11 1 14 14 1 17 17 1 20 20 1 23 23 1 26 26 1 29 29 1 32 32 1 35 35 1 38 38 1 41 41 1 44 44 1 47 47 1 50 50 1 53 53 1 56 56 1 59 59 1 62 62 1 65 65 1 68 68 1 71 71 1 74 74 1 77 77 1 80 80 1 83 83 1 86 86 1 89 89 1 92 92 1 95 95 1 98 98 1 101 101 1 104 104 1 107 107 1 110...
output:
3
result:
ok 1 number(s): "3"
Test #30:
score: 0
Accepted
time: 787ms
memory: 54252kb
input:
200000 1 2 2 4 4 6 6 8 9 10 11 11 13 13 15 16 16 18 18 20 20 22 23 24 25 25 27 28 29 30 31 31 33 33 35 36 37 38 38 40 40 42 42 44 44 46 46 48 49 49 51 52 52 54 55 55 57 57 59 60 61 61 63 64 64 66 67 67 69 70 71 71 73 74 75 75 77 78 79 79 81 82 82 84 85 86 86 88 88 90 90 92 93 94 94 96 97 97 99 99 10...
output:
100000
result:
ok 1 number(s): "100000"
Test #31:
score: 0
Accepted
time: 805ms
memory: 52236kb
input:
200000 1 2 3 4 3 6 6 8 9 10 11 10 13 14 13 16 17 17 19 20 21 21 23 24 25 25 27 28 28 28 31 32 33 32 35 36 35 38 39 40 41 40 43 44 45 46 46 48 49 50 49 52 53 52 55 56 56 56 59 60 60 60 63 64 63 66 67 68 67 70 71 70 73 73 73 76 76 78 79 80 79 82 83 82 85 86 87 87 89 89 89 92 93 93 93 96 97 96 99 100 9...
output:
44486
result:
ok 1 number(s): "44486"
Test #32:
score: 0
Accepted
time: 797ms
memory: 50808kb
input:
200000 1 2 2 1 5 6 7 8 9 9 11 12 13 11 15 15 15 18 18 20 21 21 20 24 25 26 25 25 29 29 31 32 32 32 32 36 37 37 36 40 41 40 43 44 44 43 47 47 49 50 50 50 53 54 54 56 57 57 56 60 60 60 60 64 64 66 67 68 66 70 71 70 70 74 75 76 77 75 79 79 81 79 83 84 84 83 87 87 89 89 91 92 92 92 95 95 97 98 99 99 98 ...
output:
36108
result:
ok 1 number(s): "36108"
Test #33:
score: 0
Accepted
time: 788ms
memory: 49560kb
input:
200000 1 2 1 4 5 1 7 8 8 10 11 12 13 10 15 16 15 15 19 15 21 21 23 21 25 26 27 28 28 26 31 32 33 34 31 36 37 38 37 40 41 37 43 44 43 43 43 43 49 50 49 52 49 54 54 56 57 58 54 60 61 61 63 64 65 64 67 63 69 70 71 70 69 69 75 76 77 77 76 80 81 82 83 84 82 86 87 88 88 86 91 92 93 94 95 95 97 97 99 100 1...
output:
23811
result:
ok 1 number(s): "23811"
Test #34:
score: 0
Accepted
time: 796ms
memory: 48448kb
input:
200000 1 2 2 4 5 5 7 5 4 10 11 12 13 14 12 10 10 18 19 10 21 22 23 22 22 21 27 27 29 21 21 32 33 34 34 36 36 36 39 36 41 32 43 44 45 45 45 48 43 50 50 52 53 54 55 55 55 54 59 60 61 59 63 63 59 66 66 59 69 70 70 72 72 74 75 75 77 75 75 74 81 74 83 74 85 86 87 85 89 90 91 89 93 93 95 96 97 95 99 99 99...
output:
13049
result:
ok 1 number(s): "13049"
Test #35:
score: 0
Accepted
time: 800ms
memory: 47180kb
input:
200000 1 1 1 4 1 6 7 6 9 10 11 12 10 14 10 9 17 17 19 20 20 22 22 24 20 17 27 27 17 30 31 30 33 33 33 9 6 38 39 6 41 42 42 44 6 46 47 48 49 50 51 51 49 54 55 56 57 58 56 55 55 54 54 64 48 48 67 68 69 67 71 71 73 67 67 47 77 78 79 79 78 82 83 82 85 77 77 88 89 89 77 47 47 94 47 96 97 97 96 100 101 10...
output:
1455
result:
ok 1 number(s): "1455"
Test #36:
score: 0
Accepted
time: 129ms
memory: 47136kb
input:
200000 1 2 3 4 4 6 3 2 2 10 11 11 11 11 11 11 17 17 19 19 21 22 23 23 25 22 22 28 22 21 21 32 33 32 35 21 37 21 39 19 41 42 43 43 43 46 41 48 48 10 2 52 53 54 1 56 56 58 59 60 61 58 63 64 63 66 66 68 58 70 70 72 72 72 72 70 77 77 79 58 58 56 56 84 56 86 86 86 89 89 91 92 91 94 86 86 97 98 98 100 101...
output:
157
result:
ok 1 number(s): "157"
Test #37:
score: 0
Accepted
time: 27ms
memory: 64464kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #38:
score: 0
Accepted
time: 31ms
memory: 64676kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #39:
score: 0
Accepted
time: 34ms
memory: 64380kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #40:
score: 0
Accepted
time: 22ms
memory: 63668kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #41:
score: 0
Accepted
time: 32ms
memory: 55428kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #42:
score: 0
Accepted
time: 21ms
memory: 52116kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #43:
score: 0
Accepted
time: 26ms
memory: 48068kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #44:
score: 0
Accepted
time: 27ms
memory: 64460kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #45:
score: 0
Accepted
time: 39ms
memory: 64560kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #46:
score: 0
Accepted
time: 23ms
memory: 64380kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #47:
score: 0
Accepted
time: 37ms
memory: 62864kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #48:
score: 0
Accepted
time: 28ms
memory: 55880kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #49:
score: 0
Accepted
time: 29ms
memory: 52228kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #50:
score: 0
Accepted
time: 24ms
memory: 49396kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #51:
score: 0
Accepted
time: 30ms
memory: 46988kb
input:
200000 1 2 3 4 5 1 7 8 9 10 8 12 13 12 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 ...
output:
1
result:
ok 1 number(s): "1"
Test #52:
score: 0
Accepted
time: 23ms
memory: 47168kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 6 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 54 97 98 99 100 10...
output:
1
result:
ok 1 number(s): "1"
Test #53:
score: 0
Accepted
time: 19ms
memory: 48020kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #54:
score: 0
Accepted
time: 28ms
memory: 48200kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #55:
score: 0
Accepted
time: 18ms
memory: 47428kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #56:
score: 0
Accepted
time: 26ms
memory: 47736kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #57:
score: 0
Accepted
time: 26ms
memory: 48236kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #58:
score: 0
Accepted
time: 24ms
memory: 48808kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #59:
score: 0
Accepted
time: 25ms
memory: 47912kb
input:
200000 1 2 3 4 5 1 7 8 9 10 8 12 13 12 15 12 17 12 19 12 21 12 23 12 25 12 27 12 29 12 31 12 33 12 35 12 37 12 39 12 41 12 43 12 45 12 47 12 49 12 51 12 53 12 55 12 57 12 59 12 61 12 63 12 65 12 67 12 69 12 71 12 73 12 75 12 77 12 79 12 81 12 83 12 85 12 87 12 89 12 91 12 93 12 95 12 97 12 99 12 101...
output:
2
result:
ok 1 number(s): "2"
Test #60:
score: 0
Accepted
time: 19ms
memory: 47692kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 6 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 54 97 98 99 100 10...
output:
2
result:
ok 1 number(s): "2"
Test #61:
score: 0
Accepted
time: 22ms
memory: 48048kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #62:
score: 0
Accepted
time: 20ms
memory: 48344kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #63:
score: 0
Accepted
time: 21ms
memory: 48412kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #64:
score: 0
Accepted
time: 20ms
memory: 47916kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #65:
score: 0
Accepted
time: 20ms
memory: 48052kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #66:
score: 0
Accepted
time: 26ms
memory: 48560kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #67:
score: 0
Accepted
time: 20ms
memory: 48832kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
2
result:
ok 1 number(s): "2"
Test #68:
score: 0
Accepted
time: 796ms
memory: 46492kb
input:
200000 1 2 3 3 5 5 2 8 9 10 11 11 13 13 10 16 17 17 16 9 21 22 23 24 25 25 27 28 29 29 28 32 33 34 34 33 32 27 24 40 41 42 43 43 45 45 47 47 49 49 51 52 52 54 54 56 57 57 56 60 60 51 63 63 42 41 67 68 69 70 71 72 72 71 70 76 77 78 78 80 80 82 82 77 85 86 86 85 76 90 91 92 93 94 94 96 97 98 99 99 98 ...
output:
1192
result:
ok 1 number(s): "1192"
Test #69:
score: 0
Accepted
time: 426ms
memory: 46420kb
input:
200000 1 2 2 4 5 6 7 8 8 7 11 12 13 14 14 13 17 17 19 20 21 22 23 23 25 25 22 21 20 30 31 31 33 33 35 36 37 37 39 40 40 42 42 44 44 46 47 48 48 50 51 51 53 54 55 56 56 58 58 55 54 53 63 63 65 65 67 67 69 69 71 72 73 73 72 76 76 78 78 80 81 81 83 84 84 83 87 88 89 90 91 92 92 94 94 96 97 98 98 100 10...
output:
534
result:
ok 1 number(s): "534"
Test #70:
score: 0
Accepted
time: 800ms
memory: 46464kb
input:
200000 1 2 3 4 4 6 7 8 9 10 10 12 13 14 14 13 12 9 19 19 21 21 8 7 25 26 27 28 29 30 31 32 32 34 35 36 36 38 39 40 41 42 42 41 45 45 40 39 38 35 51 51 53 53 34 56 56 58 58 31 61 61 63 64 64 63 67 67 69 70 71 71 70 69 75 75 77 78 78 80 80 82 82 77 85 85 30 88 88 90 90 92 93 94 94 93 97 97 92 100 101 ...
output:
792
result:
ok 1 number(s): "792"
Test #71:
score: 0
Accepted
time: 800ms
memory: 46680kb
input:
200000 1 2 2 1 5 5 7 7 9 10 11 11 13 13 15 16 17 17 16 16 16 22 22 16 25 25 16 28 15 30 31 31 33 34 34 36 37 38 38 40 41 41 43 44 44 43 47 48 49 50 51 52 52 51 55 56 56 55 50 49 61 61 48 64 64 47 40 68 68 37 71 71 73 73 36 76 77 78 79 80 80 79 83 83 78 86 86 88 88 77 91 92 93 93 92 96 97 98 99 99 98...
output:
1082
result:
ok 1 number(s): "1082"
Test #72:
score: 0
Accepted
time: 648ms
memory: 46652kb
input:
200000 1 2 3 4 4 6 6 8 9 9 11 12 13 13 15 15 12 18 19 19 21 21 18 24 25 25 27 27 29 30 31 32 33 34 34 33 37 37 39 39 32 42 42 31 30 46 47 47 49 50 51 52 52 54 55 55 57 58 58 60 60 62 63 64 65 65 67 67 64 63 71 71 73 74 74 76 76 78 78 80 80 73 83 84 84 86 86 88 88 83 91 91 62 57 95 96 97 98 99 100 10...
output:
869
result:
ok 1 number(s): "869"
Test #73:
score: 0
Accepted
time: 796ms
memory: 46524kb
input:
200000 1 2 3 3 5 6 7 7 9 9 6 5 13 14 14 13 17 18 19 19 21 22 22 24 25 26 26 25 29 29 24 32 32 34 34 21 18 38 38 17 41 41 2 44 45 46 47 48 48 50 50 52 53 54 54 56 57 57 56 60 60 62 62 53 65 66 67 67 66 65 52 72 72 47 75 76 77 77 79 79 81 81 83 83 85 86 86 85 76 75 46 92 92 94 95 95 94 98 99 99 101 10...
output:
1061
result:
ok 1 number(s): "1061"
Test #74:
score: 0
Accepted
time: 782ms
memory: 46636kb
input:
200000 1 2 3 4 5 5 7 7 9 10 11 12 13 14 15 15 14 13 19 20 20 22 22 24 24 19 27 27 12 30 31 32 32 34 34 36 37 37 39 39 41 41 43 44 44 43 47 48 49 50 51 52 52 54 54 56 57 58 59 60 61 61 63 64 64 66 66 68 69 70 70 69 73 74 75 76 76 75 79 80 80 79 74 84 84 86 87 88 89 90 90 92 92 89 95 95 97 97 99 100 1...
output:
758
result:
ok 1 number(s): "758"
Test #75:
score: 0
Accepted
time: 18ms
memory: 34152kb
input:
131071 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 53 57 57 44 60 61 62 62 61 65 65 60 68 69 69 68 72 72 11 75 76 77 78 79 79 78 82 82 77 85 86 86 85 89 89 76 92 93 94 94 93 97 97 92 100 1...
output:
1
result:
ok 1 number(s): "1"
Test #76:
score: 0
Accepted
time: 46ms
memory: 46856kb
input:
200000 1 2 3 4 5 6 7 7 7 10 11 12 13 14 13 13 17 18 19 20 21 19 23 24 24 26 26 26 26 26 31 24 33 24 23 36 36 19 39 40 40 42 40 40 39 46 46 18 49 50 51 51 50 54 54 49 57 58 58 57 61 61 17 64 65 65 67 65 69 69 71 69 73 74 75 74 73 69 79 79 65 82 83 83 85 85 87 82 89 89 64 92 93 94 94 93 97 98 99 99 97...
output:
11
result:
ok 1 number(s): "11"
Test #77:
score: 0
Accepted
time: 36ms
memory: 46620kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 20 21 22 22 24 24 22 20 28 20 19 14 32 33 33 32 36 36 13 39 40 41 41 40 44 44 39 47 48 48 47 51 51 53 54 53 56 57 58 58 60 57 56 12 64 65 66 67 67 66 70 70 65 73 74 75 76 77 77 79 80 76 75 75 84 74 73 87 87 64 90 91 92 92 91 95 95 90 98 99 99 98...
output:
10
result:
ok 1 number(s): "10"
Test #78:
score: 0
Accepted
time: 41ms
memory: 46732kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 54 57 58 59 59 61 59 63 63 63 66 59 68 69 70 71 72 69 68 75 76 77 68 68 80 58 58 83 84 85 86 86 85 84 84 91 58 93 94 93 96 93 98 99 98 93...
output:
12
result:
ok 1 number(s): "12"
Test #79:
score: 0
Accepted
time: 35ms
memory: 46588kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 53 57 57 44 60 61 62 62 61 65 65 60 68 69 69 68 72 72 11 75 76 77 78 79 79 78 82 82 77 85 86 86 85 89 89 76 92 93 94 94 93 97 97 92 100 1...
output:
15
result:
ok 1 number(s): "15"
Test #80:
score: 0
Accepted
time: 41ms
memory: 46656kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 53 57 57 44 60 61 62 62 61 65 65 60 68 69 69 68 72 72 11 75 76 77 78 79 79 78 82 82 77 85 86 86 85 89 89 76 92 93 94 94 93 97 97 92 100 1...
output:
17
result:
ok 1 number(s): "17"
Test #81:
score: 0
Accepted
time: 27ms
memory: 46568kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 53 57 57 44 60 61 62 62 61 65 65 60 68 69 69 68 72 72 11 75 76 77 78 79 79 78 82 82 77 85 86 86 85 89 89 76 92 93 94 94 93 97 97 92 100 1...
output:
16
result:
ok 1 number(s): "16"
Test #82:
score: 0
Accepted
time: 32ms
memory: 46632kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 53 57 57 44 60 61 62 62 61 65 65 60 68 69 69 68 72 72 11 75 76 77 78 79 79 78 82 82 77 85 86 86 85 89 89 76 92 93 94 94 93 97 97 92 100 1...
output:
17
result:
ok 1 number(s): "17"
Test #83:
score: 0
Accepted
time: 28ms
memory: 46656kb
input:
200000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 15 19 19 14 22 23 23 22 26 26 13 29 30 31 31 30 34 34 29 37 38 38 37 41 41 12 44 45 46 47 47 46 50 50 45 53 54 54 53 57 57 44 60 61 62 62 61 65 65 60 68 69 69 68 72 72 11 75 76 77 78 79 79 78 82 82 77 85 86 86 85 89 89 76 92 93 94 94 93 97 97 92 100 1...
output:
16
result:
ok 1 number(s): "16"
Extra Test:
score: 0
Extra Test Passed