QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#303691 | #7688. Alea Iacta Est | zhouhuanyi | WA | 132ms | 26404kb | C++14 | 2.0kb | 2024-01-12 21:11:01 | 2024-01-12 21:11:01 |
Judging History
answer
#include<iostream>
#include<cstdio>
#define N 3000000
using namespace std;
const int inf=(int)(1e9);
int read()
{
char c=0;
int sum=0;
while (c<'0'||c>'9') c=getchar();
while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
return sum;
}
int gcd(int x,int y)
{
if (!y) return x;
return gcd(y,x%y);
}
int T,n,m,v[N+1],F[N+1],tong[N+1],tong2[N+1],length,length2;
bool nprime[N+1];
long long res,ans;
int main()
{
int rt,x,y,a,b;
T=read();
while (T--)
{
n=read(),m=read(),res=1ll*n*m,ans=n+m+min(n,m),rt=a=b=x=y=length=length2=0;
for (int i=2;i<=n-1;++i)
if (n%i==0)
{
for (int j=0;j<n/i;++j)
if (1ll*i*j<=m&&(m-i*j)%(n/i)==0)
ans=n+m,a=i,b=n/i;
}
for (int i=2;i<=m-1;++i)
if (m%i==0)
{
for (int j=0;j<m/i;++j)
if (1ll*i*j<=n&&(n-i*j)%(m/i)==0)
ans=n+m,a=i,b=m/i;
}
for (int i=1;1ll*i*i<=res;++i)
if (i!=n&&i!=m&&res%i==0&&i+res/i<ans)
ans=i+res/i,rt=i;
if (rt)
{
x=gcd(rt,n),y=rt/x;
for (int i=0;i<x;++i)
for (int j=0;j<y;++j)
tong[++length]=i+j+1;
for (int i=0;i<n/x;++i)
for (int j=0;j<m/y;++j)
tong2[++length2]=x*i+y*j+1;
}
else if (a)
{
for (int i=0;i<a;++i)
for (int j=0;j<b;++j)
tong[++length]=i+j+1;
for (int i=0;i<=n+m;++i) F[i]=0;
F[0]=1,F[n]=-1,F[m]-=1,F[n+m]=1;
for (int i=a;i<=n+m;++i) F[i]+=F[i-a];
for (int i=b;i<=n+m;++i) F[i]+=F[i-b];
for (int i=0;i<=n+m;++i)
for (int j=1;j<=F[i];++j)
tong2[++length2]=i+1;
}
else
{
if (n<m)
{
for (int i=0;i<n;++i) tong[++length]=i+1,tong[++length]=i+1;
for (int i=0;i<m;++i) tong2[++length2]=i+1;
}
else
{
for (int i=0;i<n;++i) tong[++length]=i+1;
for (int i=0;i<m;++i) tong2[++length2]=i+1,tong2[++length2]=i+1;
}
}
printf("%d ",length);
for (int i=1;i<=length;++i) printf("%d ",tong[i]);
puts("");
printf("%d ",length2);
for (int i=1;i<=length2;++i) printf("%d ",tong2[i]);
puts("");
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 8020kb
input:
3 2 8 1 9 2 9
output:
4 1 2 2 3 4 1 3 5 7 3 1 2 3 3 1 4 7 3 1 2 3 6 1 4 7 2 5 8
result:
ok Correct. (3 test cases)
Test #2:
score: 0
Accepted
time: 7ms
memory: 7912kb
input:
1 40013 40013
output:
40013 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 10...
result:
ok Correct. (1 test case)
Test #3:
score: 0
Accepted
time: 0ms
memory: 9948kb
input:
1 40013 1
output:
40013 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 10...
result:
ok Correct. (1 test case)
Test #4:
score: 0
Accepted
time: 0ms
memory: 7804kb
input:
1 2 40013
output:
4 1 1 2 2 40013 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 9...
result:
ok Correct. (1 test case)
Test #5:
score: 0
Accepted
time: 3ms
memory: 9936kb
input:
1 3 40013
output:
6 1 1 2 2 3 3 40013 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 ...
result:
ok Correct. (1 test case)
Test #6:
score: 0
Accepted
time: 3ms
memory: 7812kb
input:
1 4 40013
output:
8 1 1 2 2 3 3 4 4 40013 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...
result:
ok Correct. (1 test case)
Test #7:
score: 0
Accepted
time: 132ms
memory: 20188kb
input:
1 999983 999983
output:
999983 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...
result:
ok Correct. (1 test case)
Test #8:
score: 0
Accepted
time: 41ms
memory: 12112kb
input:
1 1 999983
output:
2 1 1 999983 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 9...
result:
ok Correct. (1 test case)
Test #9:
score: 0
Accepted
time: 45ms
memory: 11972kb
input:
1 2 999983
output:
4 1 1 2 2 999983 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 ...
result:
ok Correct. (1 test case)
Test #10:
score: 0
Accepted
time: 46ms
memory: 11996kb
input:
1 999983 3
output:
999983 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...
result:
ok Correct. (1 test case)
Test #11:
score: 0
Accepted
time: 46ms
memory: 11992kb
input:
1 999983 4
output:
999983 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...
result:
ok Correct. (1 test case)
Test #12:
score: 0
Accepted
time: 102ms
memory: 26304kb
input:
1 1000000 1000000
output:
1000000 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 ...
result:
ok Correct. (1 test case)
Test #13:
score: 0
Accepted
time: 0ms
memory: 7884kb
input:
1 1000000 1
output:
1000 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 101...
result:
ok Correct. (1 test case)
Test #14:
score: 0
Accepted
time: 4ms
memory: 7952kb
input:
1 1000000 2
output:
1250 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 101...
result:
ok Correct. (1 test case)
Test #15:
score: 0
Accepted
time: 4ms
memory: 7904kb
input:
1 3 1000000
output:
1600 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 101...
result:
ok Correct. (1 test case)
Test #16:
score: 0
Accepted
time: 2ms
memory: 7960kb
input:
1 4 1000000
output:
2000 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 101...
result:
ok Correct. (1 test case)
Test #17:
score: 0
Accepted
time: 94ms
memory: 24332kb
input:
1 988027 988027
output:
988027 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...
result:
ok Correct. (1 test case)
Test #18:
score: 0
Accepted
time: 0ms
memory: 7956kb
input:
1 988027 1
output:
991 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 101 ...
result:
ok Correct. (1 test case)
Test #19:
score: 0
Accepted
time: 3ms
memory: 7844kb
input:
1 2 988027
output:
997 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 101 ...
result:
ok Correct. (1 test case)
Test #20:
score: 0
Accepted
time: 0ms
memory: 7892kb
input:
1 3 988027
output:
997 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 101 ...
result:
ok Correct. (1 test case)
Test #21:
score: 0
Accepted
time: 0ms
memory: 7908kb
input:
1 4 988027
output:
1982 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 101...
result:
ok Correct. (1 test case)
Test #22:
score: 0
Accepted
time: 99ms
memory: 24216kb
input:
1 995779 995779
output:
995779 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...
result:
ok Correct. (1 test case)
Test #23:
score: 0
Accepted
time: 3ms
memory: 7960kb
input:
1 1 995779
output:
983 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 101 ...
result:
ok Correct. (1 test case)
Test #24:
score: 0
Accepted
time: 3ms
memory: 8016kb
input:
1 995779 2
output:
1013 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 101...
result:
ok Correct. (1 test case)
Test #25:
score: 0
Accepted
time: 3ms
memory: 7956kb
input:
1 995779 3
output:
1013 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 101...
result:
ok Correct. (1 test case)
Test #26:
score: 0
Accepted
time: 3ms
memory: 7964kb
input:
1 995779 4
output:
1966 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 ...
result:
ok Correct. (1 test case)
Test #27:
score: 0
Accepted
time: 88ms
memory: 22228kb
input:
1 720720 720720
output:
720720 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Correct. (1 test case)
Test #28:
score: 0
Accepted
time: 4ms
memory: 7828kb
input:
1 720720 1
output:
840 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 101 ...
result:
ok Correct. (1 test case)
Test #29:
score: 0
Accepted
time: 4ms
memory: 7864kb
input:
1 2 720720
output:
1170 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 101...
result:
ok Correct. (1 test case)
Test #30:
score: 0
Accepted
time: 0ms
memory: 7804kb
input:
1 3 720720
output:
1456 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 101...
result:
ok Correct. (1 test case)
Test #31:
score: 0
Accepted
time: 4ms
memory: 7896kb
input:
1 4 720720
output:
1680 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 101...
result:
ok Correct. (1 test case)
Test #32:
score: 0
Accepted
time: 61ms
memory: 18132kb
input:
1 524288 524288
output:
524288 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Correct. (1 test case)
Test #33:
score: 0
Accepted
time: 0ms
memory: 7864kb
input:
1 1 524288
output:
512 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 101 ...
result:
ok Correct. (1 test case)
Test #34:
score: 0
Accepted
time: 0ms
memory: 7952kb
input:
1 2 524288
output:
1024 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 101...
result:
ok Correct. (1 test case)
Test #35:
score: 0
Accepted
time: 2ms
memory: 7872kb
input:
1 3 524288
output:
1024 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 101...
result:
ok Correct. (1 test case)
Test #36:
score: 0
Accepted
time: 2ms
memory: 7908kb
input:
1 524288 4
output:
1024 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 101...
result:
ok Correct. (1 test case)
Test #37:
score: 0
Accepted
time: 57ms
memory: 18064kb
input:
1 531441 531441
output:
531441 1 2 3 2 3 4 3 4 5 4 5 6 5 6 7 6 7 8 7 8 9 8 9 10 9 10 11 10 11 12 11 12 13 12 13 14 13 14 15 14 15 16 15 16 17 16 17 18 17 18 19 18 19 20 19 20 21 20 21 22 21 22 23 22 23 24 23 24 25 24 25 26 25 26 27 26 27 28 27 28 29 28 29 30 29 30 31 30 31 32 31 32 33 32 33 34 33 34 35 34 35 36 35 36 37 36...
result:
ok Correct. (1 test case)
Test #38:
score: 0
Accepted
time: 2ms
memory: 7892kb
input:
1 1 531441
output:
729 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 101 ...
result:
ok Correct. (1 test case)
Test #39:
score: 0
Accepted
time: 0ms
memory: 7860kb
input:
1 2 531441
output:
729 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 101 ...
result:
ok Correct. (1 test case)
Test #40:
score: 0
Accepted
time: 0ms
memory: 7832kb
input:
1 531441 3
output:
729 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 101 ...
result:
ok Correct. (1 test case)
Test #41:
score: 0
Accepted
time: 2ms
memory: 7752kb
input:
1 531441 4
output:
1458 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 ...
result:
ok Correct. (1 test case)
Test #42:
score: 0
Accepted
time: 56ms
memory: 18200kb
input:
1 510510 510510
output:
510510 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Correct. (1 test case)
Test #43:
score: 0
Accepted
time: 3ms
memory: 7824kb
input:
1 510510 1
output:
714 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 101 ...
result:
ok Correct. (1 test case)
Test #44:
score: 0
Accepted
time: 3ms
memory: 7888kb
input:
1 510510 2
output:
1001 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 101...
result:
ok Correct. (1 test case)
Test #45:
score: 0
Accepted
time: 3ms
memory: 7832kb
input:
1 3 510510
output:
1190 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 101...
result:
ok Correct. (1 test case)
Test #46:
score: 0
Accepted
time: 3ms
memory: 7832kb
input:
1 4 510510
output:
1428 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 101...
result:
ok Correct. (1 test case)
Test #47:
score: 0
Accepted
time: 33ms
memory: 16092kb
input:
1 279936 279936
output:
279936 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Correct. (1 test case)
Test #48:
score: 0
Accepted
time: 0ms
memory: 8020kb
input:
1 279936 1
output:
486 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 101 ...
result:
ok Correct. (1 test case)
Test #49:
score: 0
Accepted
time: 2ms
memory: 7900kb
input:
1 279936 2
output:
729 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 101 ...
result:
ok Correct. (1 test case)
Test #50:
score: 0
Accepted
time: 2ms
memory: 7812kb
input:
1 279936 3
output:
864 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 101 ...
result:
ok Correct. (1 test case)
Test #51:
score: 0
Accepted
time: 2ms
memory: 7808kb
input:
1 4 279936
output:
972 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 101 ...
result:
ok Correct. (1 test case)
Test #52:
score: 0
Accepted
time: 82ms
memory: 24280kb
input:
1 871933 871933
output:
871933 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 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1...
result:
ok Correct. (1 test case)
Test #53:
score: 0
Accepted
time: 3ms
memory: 7956kb
input:
1 871933 1
output:
101 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 101 ...
result:
ok Correct. (1 test case)
Test #54:
score: 0
Accepted
time: 3ms
memory: 7876kb
input:
1 2 871933
output:
202 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 101 ...
result:
ok Correct. (1 test case)
Test #55:
score: 0
Accepted
time: 3ms
memory: 7888kb
input:
1 3 871933
output:
303 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 101 ...
result:
ok Correct. (1 test case)
Test #56:
score: 0
Accepted
time: 3ms
memory: 7864kb
input:
1 4 871933
output:
404 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 101 ...
result:
ok Correct. (1 test case)
Test #57:
score: 0
Accepted
time: 110ms
memory: 26252kb
input:
1 1000000 999999
output:
999999 1 2 3 4 5 6 7 2 3 4 5 6 7 8 3 4 5 6 7 8 9 4 5 6 7 8 9 10 5 6 7 8 9 10 11 6 7 8 9 10 11 12 7 8 9 10 11 12 13 8 9 10 11 12 13 14 9 10 11 12 13 14 15 10 11 12 13 14 15 16 11 12 13 14 15 16 17 12 13 14 15 16 17 18 13 14 15 16 17 18 19 14 15 16 17 18 19 20 15 16 17 18 19 20 21 16 17 18 19 20 21 22...
result:
ok Correct. (1 test case)
Test #58:
score: 0
Accepted
time: 107ms
memory: 24252kb
input:
1 1000000 999998
output:
999998 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Correct. (1 test case)
Test #59:
score: 0
Accepted
time: 93ms
memory: 24276kb
input:
1 1000000 999983
output:
1000000 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 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 ...
result:
ok Correct. (1 test case)
Test #60:
score: 0
Accepted
time: 95ms
memory: 16092kb
input:
1 1000000 900000
output:
937500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 8 9 10 11 12 13 14 1...
result:
ok Correct. (1 test case)
Test #61:
score: 0
Accepted
time: 67ms
memory: 11964kb
input:
1 500000 1000000
output:
640000 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 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 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 4 5 6 7 8 9 10 11 12 13 14 15...
result:
ok Correct. (1 test case)
Test #62:
score: 0
Accepted
time: 68ms
memory: 14044kb
input:
1 524288 1000000
output:
655360 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 6 7 8 9 10 7 8 9 10 11 8 9 10 11 12 9 10 11 12 13 10 11 12 13 14 11 12 13 14 15 12 13 14 15 16 13 14 15 16 17 14 15 16 17 18 15 16 17 18 19 16 17 18 19 20 17 18 19 20 21 18 19 20 21 22 19 20 21 22 23 20 21 22 23 24 21 22 23 24 25 22 23 24 25 2...
result:
ok Correct. (1 test case)
Test #63:
score: 0
Accepted
time: 76ms
memory: 16064kb
input:
6 1 4 531441 999983 2 2 1 1 1 6 4 3
output:
2 1 2 2 1 3 1062882 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50...
result:
ok Correct. (6 test cases)
Test #64:
score: 0
Accepted
time: 90ms
memory: 18120kb
input:
7 1 1 7 6 1 1 3 3 1 1 4 4 999983 524288
output:
1 1 2 1 1 6 1 2 2 3 3 4 7 1 3 4 5 6 7 9 1 1 2 1 1 3 1 2 3 6 1 1 2 2 3 3 1 1 2 1 1 4 1 2 2 3 4 1 3 3 5 999983 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...
result:
ok Correct. (7 test cases)
Test #65:
score: 0
Accepted
time: 85ms
memory: 14032kb
input:
42 4698 12061 519 18 4 11 1 1 1 1 30 105 106 18 53 45 14230 7541 15 15 36035 39105 7430 11797 101 269 1 1 11 39 12 12 1677 1550 38 54 15974 33669 4 3 14928 32774 27 20 1354 2368 7 49 1 1 1 11 1 1 37 192 1604 1970 135 114 22095 16791 12317 28762 524288 531441 125 18 35746 16893 921 3453 344 42 70290 ...
output:
5481 1 2 3 4 5 6 7 2 3 4 5 6 7 8 3 4 5 6 7 8 9 4 5 6 7 8 9 10 5 6 7 8 9 10 11 6 7 8 9 10 11 12 7 8 9 10 11 12 13 8 9 10 11 12 13 14 9 10 11 12 13 14 15 10 11 12 13 14 15 16 11 12 13 14 15 16 17 12 13 14 15 16 17 18 13 14 15 16 17 18 19 14 15 16 17 18 19 20 15 16 17 18 19 20 21 16 17 18 19 20 21 22 1...
result:
ok Correct. (42 test cases)
Test #66:
score: 0
Accepted
time: 87ms
memory: 22288kb
input:
9 1 1 1 1 1 1 2 2 1 2 999983 720720 1 1 8 4 1 1
output:
1 1 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 4 1 2 2 3 2 1 1 2 1 2 720720 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 6 7 8 9 10 7 8 9 10 11 8 9 10 11 12 9 10 11 12 13 10 11 12 13 14 11 12 13 14 15 12 13 14 15 16 13 14 15 16 17 14 15 16 17 18 15 16 17 18 19 16 17 18 19 20 17 18 19 20 21 18 19 2...
result:
ok Correct. (9 test cases)
Test #67:
score: 0
Accepted
time: 100ms
memory: 20148kb
input:
38 1427 1873 2 4 1537 896 1 1 1750 1553 1 1 5610 31561 35 2 332 354 6 173 4 6 181 71 3647 3589 6 1 5331 3265 48 965 111270 88190 8097 3502 2 1 17 30 30 50 3 2 1801 1152 720720 720703 101 101 70821 44842 2 3 70 316 1 8 7 7 739 1024 4 21 586 12898 1 2 257 132 19172 1718 5283 5970 2 2
output:
2854 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 5...
result:
ok Correct. (38 test cases)
Test #68:
score: 0
Accepted
time: 117ms
memory: 18140kb
input:
8 1 1 999983 720703 2 2 3 3 1 1 3 4 5 4 1 1
output:
1 1 2 1 1 999983 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...
result:
ok Correct. (8 test cases)
Test #69:
score: 0
Accepted
time: 91ms
memory: 18048kb
input:
29 1 1 41 42 2 22 1220 451 8 2 58 94 2 4 1 1 255 179 5 1 3514 591 3 4 22 4 232 702 1 2 358 320 2768 497 928 525 2 51 1 9 85 207 41 47 221 174 5 5 988027 986040 1251 80 217 220 2 11 1 1
output:
1 1 2 1 1 42 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 41 1 3 5 7 9 11 13 15 17 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 45 47 49 51 53 55 57 59 61 4 1 2 2 3 11 1 3 5 7 9 11 13 15 17 19 21 671 1 2 3 ...
result:
ok Correct. (29 test cases)
Test #70:
score: 0
Accepted
time: 104ms
memory: 26300kb
input:
25 84 35 1 1 110 118 1163 724 1 2 1 1 19 6 38 55 62 50 4 151 5866 4399 2 3 5 3 13 13 986039 988027 1 1 184 869 255 717 1 1 67 57 6 15 21 24 4 3 2474 284 258 145
output:
49 1 2 3 4 5 6 7 2 3 4 5 6 7 8 3 4 5 6 7 8 9 4 5 6 7 8 9 10 5 6 7 8 9 10 11 6 7 8 9 10 11 12 7 8 9 10 11 12 13 60 1 8 15 22 29 8 15 22 29 36 15 22 29 36 43 22 29 36 43 50 29 36 43 50 57 36 43 50 57 64 43 50 57 64 71 50 57 64 71 78 57 64 71 78 85 64 71 78 85 92 71 78 85 92 99 78 85 92 99 106 1 1 2...
result:
ok Correct. (25 test cases)
Test #71:
score: 0
Accepted
time: 103ms
memory: 26320kb
input:
34 59 174 406 33 1 1 7 7 16 11 1 1 2 6 168 897 9 10 442 292 1 1 86 120 821 424 40 14 68 2758 367 449 3 4 148 243 20 4 184 142 1 2 2 1 1 9 107 129 173 636 6 2 3 14 1531 405 131 142 633 2649 23 59 18 50 988027 986023 57 144
output:
87 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 118 1 88 2 89 3 90 4 91 5 92 6 93 7 94 8 95 ...
result:
ok Correct. (34 test cases)
Test #72:
score: 0
Accepted
time: 97ms
memory: 26404kb
input:
28 708 966 59 13 6 10 6 16 30 38 9 2 2 2 8 8 1 142 10 20 5 20 393 77 230 465 210 9 622 329 1276 1402 1 1 72 380 3 1 264 364 880 679 1 1 11 42 21 27 986041 988027 2175 468 2680 427 66 1038
output:
826 1 2 3 4 5 6 7 2 3 4 5 6 7 8 3 4 5 6 7 8 9 4 5 6 7 8 9 10 5 6 7 8 9 10 11 6 7 8 9 10 11 12 7 8 9 10 11 12 13 8 9 10 11 12 13 14 9 10 11 12 13 14 15 10 11 12 13 14 15 16 11 12 13 14 15 16 17 12 13 14 15 16 17 18 13 14 15 16 17 18 19 14 15 16 17 18 19 20 15 16 17 18 19 20 21 16 17 18 19 20 21 22 17...
result:
ok Correct. (28 test cases)
Test #73:
score: 0
Accepted
time: 113ms
memory: 18052kb
input:
4 1 1 2 3 999995 799991 1 1
output:
1 1 2 1 1 4 1 1 2 2 3 1 2 3 999995 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 ...
result:
ok Correct. (4 test cases)
Test #74:
score: 0
Accepted
time: 83ms
memory: 16060kb
input:
6 1 1 1 1 1 1 1 1 1 1 999995 799992
output:
1 1 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 1 1 799996 1 2 3 4 2 3 4 5 3 4 5 6 4 5 6 7 5 6 7 8 6 7 8 9 7 8 9 10 8 9 10 11 9 10 11 12 10 11 12 13 11 12 13 14 12 13 14 15 13 14 15 16 14 15 16 17 15 16 17 18 16 17 18 19 17 18 19 20 18 19 20 21 19 20 21 22 20 21 22 23 21 22 23 24 22 23 24 25...
result:
ok Correct. (6 test cases)
Test #75:
score: 0
Accepted
time: 88ms
memory: 22196kb
input:
5 2 2 1 1 1 1 1 1 799993 999995
output:
1 1 4 1 2 2 3 1 1 2 1 1 1 1 2 1 1 1 1 2 1 1 999995 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 6 7 8 9 10 7 8 9 10 11 8 9 10 11 12 9 10 11 12 13 10 11 12 13 14 11 12 13 14 15 12 13 14 15 16 13 14 15 16 17 14 15 16 17 18 15 16 17 18 19 16 17 18 19 20 17 18 19 20 21 18 19 20 21 22 19 20 ...
result:
ok Correct. (5 test cases)
Test #76:
score: -100
Wrong Answer
time: 63ms
memory: 16008kb
input:
47 1 1 22 26 2883 3705 3 21 3184 132 287 521 4024 8251 5411 995 262144 524288 13 7 108 160 10999 146603 5695 4137 211 130 64 542 2 6 91 10 159 223 27 46 4 3 37992 10217 1292 1509 130194 143457 3924 1771 53 76 68 137 15 12 6 6 1 1 1264 307 13283 76 62 15 1 1 5 9 1295 1592 6 2 352 288 1 1 10526 25592 ...
output:
1 1 2 1 1 26 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 22 1 3 5 7 9 11 13 14 15 16 17 18 19 20 21 22 24 26 28 30 32 34 2945 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 ...
result:
wrong answer Jury has a better answer. (test case 25)