QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#719817#5199. Amazing Trickydzr00000AC ✓580ms5904kbC++171.1kb2024-11-07 09:12:172024-11-07 09:12:18

Judging History

你现在查看的是最新测评结果

  • [2024-11-07 09:12:18]
  • 评测
  • 测评结果:AC
  • 用时:580ms
  • 内存:5904kb
  • [2024-11-07 09:12:17]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int a[100001],t[100001],p[100001],q[100001],pos[100001];
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
inline void solve()
{
    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
        t[a[i]]=i;
    }
    iota(p+1,p+n+1,1);
    for(int R=1;R<=1500;R++)
    {
        shuffle(p+1,p+n+1,rnd);
        bool flg=true;
        for(int j=1;j<=n;j++)
        {
            pos[p[j]]=j;
            if(p[j]==j)
                flg=false;
        }
        for(int j=1;j<=n;j++)
        {
            q[j]=pos[t[j]];
            if(q[j]==j)
                flg=false;
        }
        if(flg)
        {
            puts("Possible");
            for(int i=1;i<=n;i++)
                printf("%d ",p[i]);
            puts("");
            for(int i=1;i<=n;i++)
                printf("%d ",q[i]);
            puts("");
            return;
        }
    }
    puts("Impossible");
}
int main(){
    int t;
    scanf("%d",&t);
    while(t--)
        solve();
    
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3880kb

input:

4
2
2 1
3
1 2 3
4
2 1 4 3
5
5 1 4 2 3

output:

Impossible
Possible
2 3 1 
3 1 2 
Possible
3 4 2 1 
3 4 2 1 
Possible
4 1 2 5 3 
3 1 4 5 2 

result:

ok 3/4 are 'Possible' (4 test cases)

Test #2:

score: 0
Accepted
time: 1ms
memory: 3864kb

input:

50
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:

Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Imp...

result:

ok 0/50 are 'Possible' (50 test cases)

Test #3:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

25
2
2 1
2
2 1
2
2 1
2
1 2
2
2 1
2
1 2
2
1 2
2
1 2
2
1 2
2
1 2
2
2 1
2
2 1
2
1 2
2
1 2
2
2 1
2
2 1
2
2 1
2
1 2
2
1 2
2
1 2
2
2 1
2
2 1
2
2 1
2
2 1
2
2 1

output:

Impossible
Impossible
Impossible
Possible
2 1 
2 1 
Impossible
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Impossible
Impossible
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Impossible
Impossible
Impossible
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 ...

result:

ok 11/25 are 'Possible' (25 test cases)

Test #4:

score: 0
Accepted
time: 1ms
memory: 3832kb

input:

16
3
3 2 1
3
3 1 2
3
3 1 2
3
2 3 1
3
3 1 2
3
2 1 3
3
2 3 1
3
3 2 1
3
3 1 2
3
2 1 3
3
1 2 3
3
1 3 2
3
3 1 2
3
3 1 2
3
3 2 1
3
2 1 3

output:

Impossible
Possible
3 1 2 
3 1 2 
Possible
3 1 2 
3 1 2 
Possible
2 3 1 
2 3 1 
Possible
3 1 2 
3 1 2 
Impossible
Possible
2 3 1 
2 3 1 
Impossible
Possible
3 1 2 
3 1 2 
Impossible
Possible
3 1 2 
2 3 1 
Impossible
Possible
3 1 2 
3 1 2 
Possible
3 1 2 
3 1 2 
Impossible
Impossible

result:

ok 9/16 are 'Possible' (16 test cases)

Test #5:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

12
4
2 4 1 3
4
2 4 1 3
4
1 3 2 4
4
2 4 1 3
4
4 1 2 3
4
2 4 3 1
4
1 3 4 2
4
3 4 2 1
4
2 4 3 1
4
1 3 2 4
4
3 4 1 2
4
1 3 4 2

output:

Possible
2 4 1 3 
4 3 2 1 
Possible
4 3 2 1 
2 4 1 3 
Possible
3 4 1 2 
3 1 4 2 
Possible
2 4 1 3 
4 3 2 1 
Possible
4 1 2 3 
3 4 1 2 
Possible
2 4 1 3 
2 3 4 1 
Possible
2 3 4 1 
4 3 1 2 
Possible
3 4 2 1 
2 1 4 3 
Possible
3 4 2 1 
2 4 1 3 
Possible
2 4 1 3 
3 4 1 2 
Possible
4 1 2 3 
4 1 2 3 
Pos...

result:

ok 12/12 are 'Possible' (12 test cases)

Test #6:

score: 0
Accepted
time: 0ms
memory: 3964kb

input:

10
5
5 4 3 2 1
5
1 5 3 2 4
5
3 1 5 2 4
5
1 5 4 3 2
5
1 3 2 5 4
5
1 2 3 5 4
5
3 1 4 2 5
5
3 4 1 2 5
5
5 1 3 4 2
5
5 3 2 1 4

output:

Possible
3 1 4 5 2 
4 3 1 5 2 
Possible
5 3 1 2 4 
3 5 2 1 4 
Possible
3 5 4 2 1 
4 3 5 2 1 
Possible
5 3 1 2 4 
3 1 5 2 4 
Possible
2 4 5 1 3 
4 5 1 3 2 
Possible
4 5 1 3 2 
3 5 4 2 1 
Possible
4 3 5 1 2 
5 1 4 2 3 
Possible
2 3 5 1 4 
2 5 4 1 3 
Possible
4 1 2 5 3 
3 4 5 1 2 
Possible
2 5 1 3 4 
5...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #7:

score: 0
Accepted
time: 0ms
memory: 3908kb

input:

8
6
5 4 3 6 2 1
6
2 1 3 4 5 6
6
1 6 4 5 2 3
6
1 2 3 4 5 6
6
3 6 1 2 5 4
6
2 6 3 5 4 1
6
1 2 4 5 3 6
6
5 3 4 2 6 1

output:

Possible
4 1 2 5 6 3 
5 4 6 3 2 1 
Possible
4 5 2 6 3 1 
3 6 5 1 2 4 
Possible
3 6 4 2 1 5 
5 6 2 1 3 4 
Possible
6 5 2 3 1 4 
5 3 4 6 2 1 
Possible
5 6 4 2 3 1 
5 3 6 2 1 4 
Possible
5 3 1 6 2 4 
4 3 2 1 6 5 
Possible
3 4 6 2 1 5 
5 4 6 1 2 3 
Possible
5 3 6 1 4 2 
3 5 6 2 4 1 

result:

ok 8/8 are 'Possible' (8 test cases)

Test #8:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

7
7
3 7 6 5 2 1 4
7
6 1 3 2 7 4 5
7
2 4 1 6 7 5 3
7
4 3 5 1 2 6 7
7
3 1 5 7 2 4 6
7
2 3 4 6 7 5 1
7
7 4 2 6 3 1 5

output:

Possible
2 6 7 3 1 5 4 
2 6 5 3 7 4 1 
Possible
3 1 5 2 6 7 4 
4 7 1 5 6 2 3 
Possible
2 6 1 7 3 5 4 
5 3 4 1 2 7 6 
Possible
7 3 6 2 4 1 5 
5 7 4 6 2 3 1 
Possible
7 4 2 3 6 5 1 
3 6 7 5 4 1 2 
Possible
2 4 6 1 7 5 3 
5 4 1 7 3 2 6 
Possible
5 4 6 7 3 1 2 
3 5 1 7 4 2 6 

result:

ok 7/7 are 'Possible' (7 test cases)

Test #9:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

6
8
6 1 5 3 7 8 4 2
8
4 5 8 1 3 6 2 7
8
6 5 8 2 4 1 3 7
8
4 2 5 3 7 1 8 6
8
5 7 2 6 3 8 4 1
8
4 1 5 3 7 2 8 6

output:

Possible
6 3 7 5 8 2 1 4 
6 5 8 3 2 7 4 1 
Possible
7 3 8 2 1 4 6 5 
6 1 8 5 4 7 3 2 
Possible
5 8 6 1 3 7 4 2 
3 7 6 1 8 4 2 5 
Possible
4 8 5 6 7 3 1 2 
4 8 1 7 6 2 3 5 
Possible
5 7 8 3 6 2 1 4 
3 4 1 2 7 8 6 5 
Possible
5 8 7 3 1 4 6 2 
8 7 6 5 4 2 1 3 

result:

ok 6/6 are 'Possible' (6 test cases)

Test #10:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

5
9
2 8 5 3 4 6 9 7 1
9
5 8 2 6 4 7 1 9 3
9
4 5 1 6 9 8 7 3 2
9
9 5 7 6 4 2 8 3 1
9
7 3 2 5 8 9 6 4 1

output:

Possible
8 9 7 1 6 3 2 5 4 
2 4 9 8 6 5 1 7 3 
Possible
8 1 5 2 6 7 3 9 4 
6 7 8 3 2 9 5 4 1 
Possible
7 6 9 8 4 3 1 5 2 
6 3 4 7 9 5 1 2 8 
Possible
5 1 6 3 9 7 4 2 8 
5 3 9 1 8 7 4 6 2 
Possible
2 5 7 6 9 4 8 1 3 
5 9 1 7 6 3 8 2 4 

result:

ok 5/5 are 'Possible' (5 test cases)

Test #11:

score: 0
Accepted
time: 0ms
memory: 3964kb

input:

5
10
10 5 3 8 9 6 1 7 4 2
10
10 9 4 8 6 1 7 3 5 2
10
4 10 7 3 6 9 5 1 8 2
10
6 1 8 10 7 5 3 4 2 9
10
8 10 9 1 2 4 7 6 3 5

output:

Possible
6 8 1 5 10 2 9 3 7 4 
9 5 8 7 6 1 2 10 4 3 
Possible
2 6 1 5 4 8 9 7 10 3 
2 9 6 10 7 4 8 5 1 3 
Possible
4 5 2 6 8 10 9 3 1 7 
5 6 1 9 10 2 8 7 4 3 
Possible
7 8 4 10 2 3 9 1 5 6 
5 7 1 2 10 8 9 6 4 3 
Possible
3 8 4 2 1 7 9 10 6 5 
3 10 7 9 8 2 6 5 1 4 

result:

ok 5/5 are 'Possible' (5 test cases)

Test #12:

score: 0
Accepted
time: 580ms
memory: 3828kb

input:

100000
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:

Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Impossible
Imp...

result:

ok 0/100000 are 'Possible' (100000 test cases)

Test #13:

score: 0
Accepted
time: 371ms
memory: 3964kb

input:

50000
2
1 2
2
1 2
2
1 2
2
1 2
2
2 1
2
1 2
2
2 1
2
2 1
2
1 2
2
1 2
2
1 2
2
2 1
2
2 1
2
1 2
2
2 1
2
2 1
2
1 2
2
2 1
2
2 1
2
1 2
2
2 1
2
2 1
2
1 2
2
2 1
2
1 2
2
2 1
2
2 1
2
1 2
2
2 1
2
1 2
2
2 1
2
2 1
2
2 1
2
2 1
2
2 1
2
2 1
2
2 1
2
2 1
2
2 1
2
1 2
2
1 2
2
2 1
2
2 1
2
1 2
2
2 1
2
1 2
2
2 1
2
2 1
2
2 1
...

output:

Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Impossible
Possible
2 1 
2 1 
Impossible
Impossible
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Possible
2 1 
2 1 
Impossible
Impossible
Possible
2 1 
2 1 
Impossible
Impossible
Possible
2 1 
2 1 
Impossible
Impossible
Possible
2 ...

result:

ok 25064/50000 are 'Possible' (50000 test cases)

Test #14:

score: 0
Accepted
time: 317ms
memory: 3956kb

input:

33333
3
3 2 1
3
2 3 1
3
2 3 1
3
3 1 2
3
2 1 3
3
2 3 1
3
2 3 1
3
2 3 1
3
2 1 3
3
1 2 3
3
2 1 3
3
2 3 1
3
3 1 2
3
1 3 2
3
2 1 3
3
1 2 3
3
1 3 2
3
2 1 3
3
1 2 3
3
2 3 1
3
1 3 2
3
2 3 1
3
3 2 1
3
1 3 2
3
3 1 2
3
3 1 2
3
2 1 3
3
3 1 2
3
3 1 2
3
3 1 2
3
1 3 2
3
3 2 1
3
3 2 1
3
3 2 1
3
3 1 2
3
2 3 1
3
1 3 ...

output:

Impossible
Possible
2 3 1 
2 3 1 
Possible
2 3 1 
2 3 1 
Possible
3 1 2 
3 1 2 
Impossible
Possible
2 3 1 
2 3 1 
Possible
2 3 1 
2 3 1 
Possible
2 3 1 
2 3 1 
Impossible
Possible
2 3 1 
3 1 2 
Impossible
Possible
2 3 1 
2 3 1 
Possible
3 1 2 
3 1 2 
Impossible
Impossible
Possible
3 1 2 
2 3 1 
Impo...

result:

ok 16621/33333 are 'Possible' (33333 test cases)

Test #15:

score: 0
Accepted
time: 17ms
memory: 3952kb

input:

25000
4
1 4 2 3
4
1 2 4 3
4
4 3 1 2
4
2 3 4 1
4
2 3 1 4
4
4 1 2 3
4
4 3 2 1
4
4 1 2 3
4
4 2 3 1
4
3 4 1 2
4
3 2 1 4
4
1 2 3 4
4
1 2 4 3
4
4 1 3 2
4
3 2 1 4
4
4 2 1 3
4
2 4 3 1
4
3 1 4 2
4
4 2 1 3
4
1 2 4 3
4
4 1 2 3
4
3 4 1 2
4
1 3 2 4
4
2 1 3 4
4
1 3 4 2
4
1 2 4 3
4
4 1 3 2
4
2 4 3 1
4
1 3 2 4
4
4 ...

output:

Possible
4 1 2 3 
2 4 1 3 
Possible
3 4 1 2 
3 4 2 1 
Possible
2 1 4 3 
4 3 1 2 
Possible
2 3 4 1 
3 4 1 2 
Possible
2 4 1 3 
4 3 1 2 
Possible
3 4 1 2 
4 1 2 3 
Possible
3 1 4 2 
3 1 4 2 
Possible
3 4 1 2 
4 1 2 3 
Possible
2 4 1 3 
2 1 4 3 
Possible
4 1 2 3 
4 1 2 3 
Possible
2 1 4 3 
4 1 2 3 
Pos...

result:

ok 25000/25000 are 'Possible' (25000 test cases)

Test #16:

score: 0
Accepted
time: 16ms
memory: 3956kb

input:

20000
5
2 3 5 4 1
5
2 3 5 1 4
5
4 5 1 3 2
5
5 3 2 1 4
5
5 4 3 1 2
5
2 5 4 3 1
5
2 5 3 1 4
5
1 3 5 4 2
5
1 5 4 3 2
5
4 1 3 5 2
5
3 4 5 1 2
5
2 5 1 4 3
5
5 4 3 1 2
5
3 2 5 4 1
5
5 3 2 4 1
5
3 2 1 4 5
5
3 5 1 2 4
5
2 3 5 1 4
5
5 4 2 3 1
5
4 5 2 1 3
5
4 5 2 1 3
5
3 1 5 4 2
5
4 3 5 2 1
5
2 4 5 3 1
5
2 3 ...

output:

Possible
4 3 5 1 2 
3 4 5 1 2 
Possible
5 3 1 2 4 
5 3 4 1 2 
Possible
4 3 5 2 1 
2 3 1 5 4 
Possible
2 4 5 1 3 
2 5 1 3 4 
Possible
3 4 5 1 2 
2 3 1 5 4 
Possible
4 5 2 1 3 
2 4 1 5 3 
Possible
3 5 2 1 4 
5 4 1 2 3 
Possible
2 3 1 5 4 
3 4 1 5 2 
Possible
5 3 1 2 4 
3 1 5 2 4 
Possible
3 4 2 5 1 
3...

result:

ok 20000/20000 are 'Possible' (20000 test cases)

Test #17:

score: 0
Accepted
time: 20ms
memory: 3952kb

input:

16666
6
5 4 6 1 2 3
6
5 3 2 1 4 6
6
1 5 3 4 2 6
6
4 5 1 2 3 6
6
2 6 1 4 3 5
6
4 1 3 2 5 6
6
3 1 6 2 5 4
6
3 5 4 2 1 6
6
4 3 1 6 5 2
6
5 3 2 4 6 1
6
1 6 2 3 5 4
6
3 1 5 6 4 2
6
5 4 2 1 3 6
6
2 6 5 1 4 3
6
5 6 3 4 2 1
6
2 3 1 4 5 6
6
1 3 4 2 6 5
6
4 6 3 5 2 1
6
1 6 2 4 5 3
6
4 5 2 3 1 6
6
5 3 6 4 1 2
...

output:

Possible
5 6 1 3 2 4 
6 1 2 5 3 4 
Possible
5 1 6 3 4 2 
5 4 6 1 2 3 
Possible
4 3 1 5 6 2 
3 4 2 1 6 5 
Possible
6 1 2 5 3 4 
5 6 4 2 3 1 
Possible
4 6 2 1 3 5 
5 4 6 1 2 3 
Possible
5 6 1 2 3 4 
4 6 5 3 1 2 
Possible
3 6 2 5 1 4 
3 6 5 2 4 1 
Possible
2 5 4 1 6 3 
2 3 4 6 1 5 
Possible
2 5 6 3 4 1...

result:

ok 16666/16666 are 'Possible' (16666 test cases)

Test #18:

score: 0
Accepted
time: 18ms
memory: 3964kb

input:

14285
7
3 1 2 4 7 5 6
7
5 2 1 3 4 7 6
7
2 1 6 4 7 3 5
7
5 3 7 2 4 1 6
7
2 4 3 5 7 1 6
7
2 4 7 3 6 1 5
7
2 3 5 1 4 6 7
7
7 2 6 5 1 3 4
7
5 7 6 2 1 4 3
7
1 3 4 6 2 7 5
7
7 6 3 5 4 2 1
7
7 4 2 6 3 5 1
7
7 5 4 2 3 6 1
7
6 1 7 5 3 2 4
7
1 6 3 5 4 7 2
7
6 7 1 3 5 2 4
7
5 7 4 6 2 1 3
7
4 7 3 6 2 5 1
7
5 6 ...

output:

Possible
6 5 4 2 7 1 3 
4 7 6 3 1 5 2 
Possible
6 1 2 3 7 5 4 
4 3 7 6 2 5 1 
Possible
5 7 2 6 4 1 3 
3 6 4 5 2 7 1 
Possible
3 5 4 7 2 1 6 
7 3 5 2 6 4 1 
Possible
4 7 6 3 1 5 2 
3 5 4 7 1 2 6 
Possible
5 3 2 6 1 7 4 
4 5 7 3 6 1 2 
Possible
7 6 4 3 2 5 1 
3 7 5 6 4 2 1 
Possible
7 6 5 2 1 4 3 
3 4...

result:

ok 14285/14285 are 'Possible' (14285 test cases)

Test #19:

score: 0
Accepted
time: 18ms
memory: 3812kb

input:

12500
8
7 4 6 3 1 5 2 8
8
8 1 6 7 2 5 4 3
8
8 5 2 4 6 7 1 3
8
3 2 1 8 4 6 7 5
8
7 2 4 5 3 6 1 8
8
3 5 7 8 2 4 1 6
8
2 4 7 6 1 8 5 3
8
8 4 1 3 5 6 7 2
8
6 2 7 8 1 4 5 3
8
5 8 1 2 4 3 6 7
8
8 5 6 7 1 2 4 3
8
7 1 5 8 4 6 3 2
8
8 1 2 4 6 7 5 3
8
5 3 2 1 6 4 7 8
8
1 8 5 3 4 7 2 6
8
7 1 8 4 6 3 2 5
8
8 7 ...

output:

Possible
8 6 5 7 2 1 3 4 
3 4 8 5 2 7 6 1 
Possible
7 1 6 2 8 5 3 4 
4 6 5 1 3 7 8 2 
Possible
6 1 7 2 3 8 5 4 
3 5 6 8 4 7 1 2 
Possible
5 6 8 1 2 4 3 7 
7 5 4 1 3 2 8 6 
Possible
6 4 7 5 2 1 8 3 
3 5 4 8 2 1 6 7 
Possible
6 4 8 3 1 2 5 7 
8 7 5 1 6 3 4 2 
Possible
6 5 4 8 2 3 1 7 
2 7 4 5 8 3 6 1 ...

result:

ok 12500/12500 are 'Possible' (12500 test cases)

Test #20:

score: 0
Accepted
time: 18ms
memory: 3948kb

input:

11111
9
8 9 5 7 6 1 4 2 3
9
2 1 7 8 3 6 4 9 5
9
7 5 9 8 4 1 3 2 6
9
4 3 9 2 1 6 7 8 5
9
4 1 8 7 9 2 3 5 6
9
1 9 8 6 2 7 4 5 3
9
3 6 1 9 2 7 5 4 8
9
9 1 3 4 7 2 6 5 8
9
2 7 1 5 3 4 6 9 8
9
6 2 1 7 9 5 4 3 8
9
6 1 3 4 7 9 8 5 2
9
3 7 5 8 6 4 1 2 9
9
2 5 3 9 4 1 8 7 6
9
6 5 1 8 3 2 9 7 4
9
1 7 5 9 2 6 ...

output:

Possible
2 4 7 5 9 8 1 6 3 
8 6 5 3 9 4 2 7 1 
Possible
4 7 6 2 8 5 9 3 1 
4 9 6 2 7 3 8 1 5 
Possible
8 7 9 1 4 3 5 6 2 
8 1 2 7 9 3 4 5 6 
Possible
7 8 6 5 4 2 3 9 1 
4 5 6 9 8 3 1 2 7 
Possible
8 1 4 9 6 5 3 2 7 
8 5 9 2 1 4 3 7 6 
Possible
8 7 4 6 9 3 2 5 1 
9 8 5 2 1 3 4 6 7 
Possible
5 7 9 1 6...

result:

ok 11111/11111 are 'Possible' (11111 test cases)

Test #21:

score: 0
Accepted
time: 19ms
memory: 3964kb

input:

10000
10
4 1 5 7 2 9 10 3 8 6
10
8 7 9 4 5 3 10 1 2 6
10
2 9 10 4 8 6 1 7 3 5
10
7 2 8 5 4 3 1 10 6 9
10
1 9 5 10 6 7 4 3 8 2
10
5 3 9 1 10 4 8 2 7 6
10
2 1 9 8 7 6 4 3 5 10
10
3 1 5 8 7 9 10 4 6 2
10
2 3 1 5 10 9 4 8 6 7
10
3 8 5 10 7 4 6 9 1 2
10
2 9 10 3 6 1 7 8 4 5
10
3 10 6 5 4 2 8 1 9 7
10
6 7...

output:

Possible
4 10 5 8 2 3 9 6 7 1 
5 3 4 10 6 2 1 7 8 9 
Possible
9 4 2 6 7 5 1 3 10 8 
10 1 4 2 6 9 3 7 8 5 
Possible
3 6 10 1 8 4 2 9 5 7 
10 4 8 6 3 2 5 9 7 1 
Possible
2 5 8 10 6 3 9 1 4 7 
10 1 5 2 9 7 8 6 4 3 
Possible
6 9 2 5 4 7 10 1 3 8 
8 7 10 6 9 4 1 2 3 5 
Possible
5 6 8 10 9 3 1 2 7 4 
10 3...

result:

ok 10000/10000 are 'Possible' (10000 test cases)

Test #22:

score: 0
Accepted
time: 14ms
memory: 3808kb

input:

5000
20
4 12 9 1 10 14 16 15 5 19 13 2 20 17 6 7 18 8 3 11
20
2 14 9 5 19 1 6 16 8 3 13 11 15 18 20 7 10 17 4 12
20
3 12 16 19 13 5 7 15 10 2 14 1 6 20 11 17 4 18 9 8
20
8 14 12 3 15 1 6 2 19 9 10 16 11 17 18 20 7 5 4 13
20
20 14 17 13 2 6 8 1 9 16 5 18 7 11 10 15 3 19 12 4
20
14 4 12 13 17 18 5 1 3...

output:

Possible
16 8 2 20 15 19 3 13 17 11 14 4 1 5 10 12 7 9 18 6 
12 16 6 13 18 5 1 19 7 14 4 3 10 20 2 17 11 9 15 8 
Possible
16 20 18 5 13 14 9 17 11 6 15 4 8 7 1 10 2 12 3 19 
10 15 16 20 12 14 1 7 19 8 18 2 9 17 5 13 3 6 4 11 
Possible
6 18 15 14 17 9 11 2 16 8 4 5 12 20 10 13 3 7 1 19 
13 15 19 5 1 ...

result:

ok 5000/5000 are 'Possible' (5000 test cases)

Test #23:

score: 0
Accepted
time: 17ms
memory: 3812kb

input:

2000
50
14 32 18 15 19 25 38 17 35 39 45 1 23 26 16 41 27 44 6 3 48 33 46 47 36 31 22 24 34 21 7 50 42 28 8 10 9 20 37 2 40 5 29 13 43 30 11 49 12 4
50
7 34 49 27 22 8 17 35 50 4 45 48 10 13 16 18 31 44 3 11 25 28 20 19 30 33 12 42 38 40 23 14 2 24 47 37 9 21 43 29 36 15 39 6 5 46 41 26 32 1
50
26 3...

output:

Possible
26 30 21 46 6 32 25 5 12 33 45 47 34 50 18 28 38 40 14 2 10 35 31 19 39 15 3 24 8 22 11 1 17 41 42 29 16 43 48 37 7 4 23 9 13 27 44 20 36 49 
9 18 48 14 35 24 23 22 40 49 12 50 47 32 42 26 29 27 8 17 2 46 45 16 5 19 33 13 38 4 1 20 30 36 44 7 25 41 21 34 37 10 11 15 31 43 28 3 39 6 
Possibl...

result:

ok 2000/2000 are 'Possible' (2000 test cases)

Test #24:

score: 0
Accepted
time: 16ms
memory: 3968kb

input:

1000
100
22 42 35 33 69 89 18 99 74 26 10 32 2 29 4 21 71 1 48 15 75 3 8 88 95 36 6 87 57 5 63 25 14 41 98 44 47 39 92 40 31 27 28 96 83 81 68 100 53 13 56 72 65 70 52 49 11 50 97 77 76 93 54 43 46 12 62 78 17 34 45 84 91 51 73 30 64 58 85 86 20 19 7 66 55 61 16 60 37 24 59 9 38 80 23 94 67 82 79 90...

output:

Possible
79 70 7 8 59 3 12 32 38 26 13 88 66 81 90 18 40 24 39 1 54 36 29 37 47 75 92 89 65 99 33 85 20 84 76 61 11 86 10 95 80 60 35 41 72 4 46 62 74 5 55 68 2 31 49 6 100 83 64 44 97 30 98 50 14 45 93 56 51 15 16 27 78 21 63 73 52 82 57 19 34 58 94 77 25 22 67 17 28 42 9 71 69 43 53 48 96 87 91 23...

result:

ok 1000/1000 are 'Possible' (1000 test cases)

Test #25:

score: 0
Accepted
time: 17ms
memory: 3956kb

input:

200
500
77 436 150 381 283 26 376 479 28 247 432 220 18 468 31 161 278 49 344 121 396 405 360 193 101 211 367 242 397 419 190 326 312 126 288 164 276 97 98 341 133 488 137 16 358 261 93 287 484 196 209 96 212 103 207 450 223 200 117 129 316 85 239 427 213 51 89 62 299 83 27 8 357 218 307 342 36 370 ...

output:

Possible
171 77 402 66 405 264 389 69 454 215 259 164 475 360 58 94 385 411 263 26 406 436 421 343 465 289 422 363 265 137 10 85 478 331 128 90 170 53 229 383 414 73 442 163 236 437 352 108 238 188 148 185 322 92 330 408 427 394 220 119 294 1 41 204 351 74 446 113 91 150 42 500 397 155 489 99 425 27...

result:

ok 200/200 are 'Possible' (200 test cases)

Test #26:

score: 0
Accepted
time: 16ms
memory: 3896kb

input:

100
999
492 317 271 238 165 666 407 461 861 645 957 35 4 505 40 522 223 816 402 786 766 1 597 978 698 574 246 8 825 159 630 582 904 93 104 837 959 14 393 247 541 961 281 168 826 118 111 67 211 433 284 136 415 31 838 734 520 449 995 203 437 468 976 482 302 578 320 365 877 152 902 47 762 779 32 926 98...

output:

Possible
469 861 944 133 193 776 550 659 980 513 167 151 220 704 267 898 987 995 481 742 303 166 346 9 38 685 187 823 735 760 120 573 239 953 892 32 388 686 821 362 439 375 774 415 502 853 649 409 916 52 277 702 484 146 406 470 433 761 849 486 478 666 108 392 687 664 886 66 752 22 284 721 705 10 908...

result:

ok 100/100 are 'Possible' (100 test cases)

Test #27:

score: 0
Accepted
time: 19ms
memory: 4108kb

input:

10
10000
3111 9882 6693 1688 8131 1069 7097 714 8452 9810 3869 1071 729 8854 4427 5384 85 6139 4846 6702 9502 7068 4059 2105 9491 1770 5224 6581 4166 3999 2335 3218 2668 5457 4910 3214 5844 7261 6649 6271 3041 8709 7866 6145 3463 3566 2989 462 7977 9614 981 8807 7698 4206 7411 4177 4847 9099 6432 92...

output:

Possible
7748 9322 5670 6867 8866 9910 4906 9795 6241 5741 9264 428 2872 7426 7287 4190 1568 4356 7283 4438 5272 6000 1512 9774 6854 1710 1128 8114 4603 5937 5056 9122 9256 1834 4335 6716 45 1364 8502 115 7556 7590 5867 8244 9042 3095 7168 9780 5472 8632 4987 9898 3002 5576 945 127 7358 2816 1076 18...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #28:

score: 0
Accepted
time: 21ms
memory: 4416kb

input:

4
25000
6613 4159 5077 6416 10853 11758 19627 3323 13008 9184 24741 15029 23038 5888 13877 5159 19819 548 11043 7270 23193 10331 4614 20092 14776 4140 1242 12624 5245 9350 18136 16339 10085 144 10843 22439 1999 17054 8601 5862 4359 23951 17309 19743 17748 11856 16787 12426 15536 15452 8084 3441 1124...

output:

Possible
6546 11340 6393 2811 13599 19411 17161 16789 3264 1265 20494 167 5431 10654 10528 8398 21535 14355 3853 11169 3536 19770 23285 21300 15315 1604 7760 23325 24172 2265 16646 3081 10027 20689 5644 13346 9637 5124 20448 16143 13561 621 16138 3159 5361 109 21132 17241 16592 20099 19951 2375 1516...

result:

ok 4/4 are 'Possible' (4 test cases)

Test #29:

score: 0
Accepted
time: 28ms
memory: 4944kb

input:

2
50000
5329 24260 36130 8263 35267 32974 10730 5906 40902 11705 34044 1969 19662 22885 12991 17360 37276 2776 42315 20422 42407 15540 15343 37918 33817 17008 3819 43482 47574 2295 38031 48887 34560 4433 63 40770 38505 38533 20662 4570 48598 40935 17641 38040 21430 44656 20895 12229 37373 16553 1899...

output:

Possible
16689 4488 47382 4833 9974 44063 43110 13767 16425 32005 42921 488 25006 12775 34905 30859 16699 37741 42290 18106 2284 46067 43186 25285 25262 11763 27852 14227 47629 25839 18270 46874 11179 14895 25980 130 28933 12532 11743 6213 40851 35727 4370 14968 675 10146 40661 9360 9608 17727 15993...

result:

ok 2/2 are 'Possible' (2 test cases)

Test #30:

score: 0
Accepted
time: 23ms
memory: 5704kb

input:

1
100000
1456 10467 94596 93046 95142 5409 19197 52637 61524 20378 74780 30541 95011 8643 1935 79348 81628 5730 51030 2312 97930 12785 95868 27975 73166 19014 87353 19042 92944 15402 71296 8034 87026 16769 84343 52312 83816 56882 26772 1677 96185 84098 77869 84708 44840 97529 63101 33635 32991 72941...

output:

Possible
62034 63614 84208 14606 55774 23198 28271 49901 27766 97988 13940 77100 48307 41339 7963 9093 89395 74384 9708 60627 71127 82556 57813 62661 1674 49236 31934 43132 77528 85413 46060 62519 10183 30184 6575 25491 34767 41772 6140 4108 36123 95846 82348 42376 73189 94172 38292 11473 44350 5405...

result:

ok 1/1 are 'Possible' (1 test case)

Test #31:

score: 0
Accepted
time: 20ms
memory: 4076kb

input:

10
10000
9496 8510 5460 3882 9615 1884 9371 1347 2879 2204 1543 900 5335 7779 7158 9126 3389 2229 5657 9220 8544 292 7228 7694 6697 8481 4895 5629 2223 1042 747 4220 2587 2589 1797 4720 5129 8687 9083 2076 645 261 6409 4763 3550 8977 9687 6622 1772 6109 8593 9900 1160 5451 580 9252 4132 8214 8831 26...

output:

Possible
33 1269 3164 1720 3088 7313 9408 6272 6929 6136 6562 5008 3202 6022 4988 7930 1449 4411 8895 1715 4454 5249 4418 7357 1762 2103 9370 85 8408 9171 6905 5346 9673 4747 2914 4780 334 9741 1635 4208 2205 5757 3077 7822 8726 5471 7752 6052 7626 157 307 1139 8941 1957 3032 3655 3512 9373 6345 138...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #32:

score: 0
Accepted
time: 19ms
memory: 4096kb

input:

10
10000
2178 9218 7790 6366 8922 8404 4623 6637 3277 1874 915 9957 4033 7453 1816 5053 9847 5965 5715 4415 2216 9210 1761 8601 2444 3984 3709 853 2766 7651 7721 3449 3630 1316 8822 3779 7268 1794 2824 5596 1612 8132 2267 4317 5800 1975 1555 7042 3374 2174 2792 4275 1465 1152 1664 1299 8439 4566 393...

output:

Possible
2500 4830 8896 4020 9391 7743 4913 6536 7027 1959 4140 4123 1698 2938 3934 4501 6599 788 7597 4489 7246 318 5864 1861 4283 7905 7701 7372 6751 6443 3093 7893 6944 7010 1350 5233 713 581 7248 5167 6353 2781 5251 3684 7046 3166 366 4644 5933 3217 2421 3620 6289 3024 928 3179 1831 1432 7738 14...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #33:

score: 0
Accepted
time: 18ms
memory: 4148kb

input:

10
10000
1567 6252 6443 7699 5492 1842 5405 7366 5587 3056 823 2622 1657 8753 3495 8410 3647 4249 4082 3119 707 3854 7694 784 7418 4856 839 7692 396 1383 1981 5426 8682 2034 206 7122 1159 6858 7121 9028 2891 685 8678 9171 2704 6389 1691 9932 1059 3896 5603 6714 6524 368 7905 78 1591 8160 9729 754 74...

output:

Possible
9535 7430 1654 9527 5362 8121 5349 8250 5044 5577 8384 7547 7875 7918 2436 7269 5923 8799 8346 2047 4339 827 2505 3356 2651 6511 1200 7610 536 948 5357 4613 9555 8257 7820 6808 1269 6587 6533 5324 9997 7334 5807 6086 2097 3185 1366 6518 880 4805 7989 541 6182 457 7003 4203 6669 4080 4227 22...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #34:

score: 0
Accepted
time: 19ms
memory: 3972kb

input:

10
10000
4162 9101 9530 2624 3295 4976 2222 5812 6275 4390 1091 9646 7781 9877 9289 9643 1501 1663 4556 1782 7746 8721 993 9177 3081 3633 7243 8477 9458 2546 996 5746 558 7802 8078 2409 6141 2706 1948 2944 6185 3436 5910 4260 185 5584 6409 8392 5007 3815 1452 7181 8849 7937 9709 4059 9237 6013 5154 ...

output:

Possible
5460 456 8418 3508 6027 7982 3980 9159 5712 495 867 6780 7572 9482 1689 1204 345 4527 1085 504 2333 7644 5377 2472 1487 8493 8420 8333 5854 6513 503 7592 940 5429 6488 9777 7816 8118 3136 2681 9880 1176 3283 6584 3678 4514 9601 9254 9587 4686 5813 7885 5889 7460 1011 5300 1161 4008 1298 820...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #35:

score: 0
Accepted
time: 19ms
memory: 4160kb

input:

10
10000
7169 9888 3050 8344 6010 7824 9030 8457 8512 9823 9850 5216 6614 6527 1137 7044 2122 5052 5373 2616 8293 307 3075 7926 774 2501 9717 3719 69 8190 2413 97 5898 7720 1699 9045 1080 6644 5138 752 3353 9457 4587 2101 5997 970 3009 365 6674 8299 1291 241 6725 7421 235 2938 207 6417 8647 4982 515...

output:

Possible
1460 7805 5477 2071 1148 4830 9003 1564 263 2271 7841 6440 395 2697 7873 8357 3109 2368 6972 7345 1661 682 9693 219 7676 45 7077 9688 4707 5842 2912 9802 4535 137 4854 449 9689 8934 2637 7604 8810 5746 336 1081 6493 9813 6328 8133 4160 3857 3724 2445 329 5344 5404 4151 5984 6165 9963 4842 1...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #36:

score: 0
Accepted
time: 12ms
memory: 4080kb

input:

10
10000
4218 344 9453 2250 6540 174 5484 7282 5757 10000 7819 6405 1570 6813 5519 6500 2164 9737 7708 9517 6059 5969 3481 1963 8644 2957 717 5872 1966 3391 8293 3199 7147 6667 6146 5545 7635 6348 818 4785 6291 3478 2677 431 3934 1878 7228 2711 6850 9995 5922 3144 7235 8773 4271 2232 5820 2375 725 7...

output:

Possible
2393 3769 1810 7380 2617 8576 6694 7324 5936 9623 1252 6755 5120 393 7576 752 42 8457 4831 4785 1329 3651 3488 9688 1618 1519 3843 521 8707 9182 3225 9032 8367 5388 3334 230 3321 4765 2812 9492 8019 9387 9082 2212 8040 6250 7348 9239 9168 6844 9429 7644 9820 4122 6571 867 412 4671 3200 2221...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #37:

score: 0
Accepted
time: 19ms
memory: 4160kb

input:

10
10000
4510 8103 8711 5998 7077 4929 4717 8436 4500 2241 6776 4322 528 7714 7357 1411 8862 3226 7694 9239 4118 9336 5424 3055 4796 1260 2569 4967 6361 6452 7687 8565 3083 6256 9369 963 5140 344 8358 6603 8293 1222 2486 5667 8568 3027 7683 7855 6489 2424 3312 5086 9224 3769 3952 5566 9849 2778 1088...

output:

Possible
2791 6329 2179 9639 5016 3742 769 355 4939 6579 3285 4346 35 3869 5654 564 8187 8426 1401 5525 1186 8111 660 9648 8819 8078 1364 4026 5106 1766 3919 6895 6553 707 6108 6994 4027 3550 8414 8610 8886 5156 6165 2616 68 5528 7698 2646 9436 1455 5974 8923 3333 8742 7790 240 8778 2200 3446 481 68...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #38:

score: 0
Accepted
time: 17ms
memory: 4152kb

input:

10
10000
7627 4696 3738 4879 7371 1232 6843 5355 8688 5927 8229 1973 509 5349 4523 1269 9603 1902 8294 9679 3066 5702 6749 168 855 9149 2615 5826 5373 585 4768 8194 5977 4418 6556 2850 9475 5651 5756 293 1993 8637 367 6975 3377 889 4867 3130 8847 2668 2854 5466 9765 1895 230 439 4416 7213 4888 8060 ...

output:

Possible
6072 744 4641 698 2064 3465 3817 1190 7089 9854 4636 1120 1803 1122 369 3339 6818 3604 1458 8118 993 3786 223 2238 6548 2334 2879 7787 6494 6812 5424 737 1010 5464 8977 1837 7659 7536 3433 7352 5726 2497 9690 5316 1065 5443 3432 6633 2885 5520 434 9178 2590 8643 8334 3844 1263 5637 4666 687...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #39:

score: 0
Accepted
time: 19ms
memory: 4152kb

input:

10
10000
3717 2786 9484 9828 3759 346 5412 5491 2997 6494 7048 7489 6711 278 9539 619 3780 1167 2457 9173 180 6257 3085 9695 7034 8748 4260 9925 2654 6969 2663 2176 1114 9476 1405 306 6548 9601 4534 5879 7800 4523 3132 8461 796 6364 9689 2345 2496 5862 9478 6605 6306 1964 1846 6623 2502 742 5326 417...

output:

Possible
1424 2703 3862 7880 3214 1484 9060 4541 4629 6019 6603 6275 6158 9599 6546 8325 402 3855 5399 3978 94 4772 6005 9093 925 7566 9180 4237 8317 2445 7548 9542 8877 971 458 1287 4925 7814 8767 1575 5211 4883 5618 9892 5944 2027 3678 587 6182 4356 3005 1747 8080 9856 6404 5173 877 4035 2850 6506...

result:

ok 10/10 are 'Possible' (10 test cases)

Test #40:

score: 0
Accepted
time: 23ms
memory: 5880kb

input:

1
100000
7210 30744 81874 6285 69296 6115 79138 52424 44282 14840 1587 38580 10637 93401 83715 42733 75136 14685 64770 3552 44547 86767 94004 99217 2250 68390 11413 7847 90110 73187 70660 79544 7994 78601 79203 34166 47060 92554 22975 17834 25249 63503 18594 15442 31402 21637 9208 82986 75248 10369 ...

output:

Possible
63454 72734 54877 27486 51815 11772 59437 71533 15147 51277 13226 66107 53012 68146 10192 57724 35409 2234 89101 26919 13297 30109 93650 7775 70623 60367 69292 22680 28265 8111 54075 12898 80977 67335 70342 92396 95661 19991 59236 66755 98251 17888 70670 15032 42750 86126 91900 26722 49220 ...

result:

ok 1/1 are 'Possible' (1 test case)

Test #41:

score: 0
Accepted
time: 17ms
memory: 5704kb

input:

1
100000
70563 7751 11771 31815 69604 71562 95485 40936 31055 25792 34133 2630 27332 48674 7074 88282 46065 36326 48345 45816 81539 98511 5048 72788 49835 88788 59711 45304 22969 61410 68373 78297 93370 19304 22236 23681 48019 17714 30702 18951 22114 57144 73821 92614 16405 23902 53004 36729 29213 9...

output:

Possible
62238 8559 87340 50227 39178 46317 41779 28113 25513 12132 44955 87694 54192 28087 96383 82131 89703 8897 75065 4577 88051 21241 82917 80406 42136 36142 28895 64968 29536 56609 36075 99580 77673 79458 65068 26658 33222 70363 24614 28337 14990 63238 33086 62567 18979 3397 30160 65765 96876 6...

result:

ok 1/1 are 'Possible' (1 test case)

Test #42:

score: 0
Accepted
time: 21ms
memory: 5904kb

input:

1
100000
33413 95902 66707 37171 63717 97678 10879 3614 34432 20249 89228 27610 94980 80741 33412 55214 41220 52034 92244 16703 23322 64378 89911 94268 48792 70327 31398 74518 38251 72313 17385 90894 32244 4118 33031 22074 73597 51522 18274 49387 15317 43002 18849 63998 36602 55730 85751 93866 86271...

output:

Possible
28330 41089 43076 95949 84253 94483 17101 3130 65756 87801 46092 4047 20869 63523 28995 17831 34537 35784 16668 75581 1472 38198 59729 24268 8662 57378 51505 43747 68357 58657 13587 8715 99721 19038 62413 88085 40009 46251 45634 30022 69564 56654 65244 79796 8664 68224 10870 7433 48707 7869...

result:

ok 1/1 are 'Possible' (1 test case)

Test #43:

score: 0
Accepted
time: 16ms
memory: 5880kb

input:

1
100000
38939 36462 49236 11864 41866 9135 83157 68975 57929 22445 15930 71622 6685 74844 63484 21437 36291 19858 96434 77081 5526 27871 28539 29249 81884 33811 86021 19329 4667 40618 83290 68312 3253 19686 13848 64686 67676 20614 87922 14493 2686 23288 80722 55653 55053 42533 20505 82814 3906 7159...

output:

Possible
96716 17360 22973 50831 89081 84033 14080 65462 4455 59649 28459 25509 8120 45908 31579 7567 33309 14996 96924 41716 72520 77901 33436 39019 69304 46889 20671 90892 71077 234 37048 49530 50384 47357 43007 53833 3861 99753 33132 2163 28809 45579 31028 52011 66159 7892 16750 70963 32624 48613...

result:

ok 1/1 are 'Possible' (1 test case)

Test #44:

score: 0
Accepted
time: 21ms
memory: 5876kb

input:

1
100000
56410 55223 89128 10706 65945 98487 8157 37051 23481 13806 5708 53223 41255 72197 4250 33306 82551 92413 78735 24394 33722 62458 49977 19569 15457 97352 68219 60151 33432 36755 29808 18535 91202 559 26286 32530 45839 58284 3132 92142 31443 64432 45232 60417 75658 93565 66480 95677 93242 353...

output:

Possible
21081 79398 61893 68833 94329 7982 852 73903 77028 37621 89649 39738 2988 6927 69476 15448 14323 4282 88687 58447 33789 62512 26894 17436 74432 41138 94561 27953 14864 64195 10973 92236 98202 31658 7144 37946 68357 83056 9609 46367 49273 963 81189 7596 58022 90514 35177 14207 14635 86848 98...

result:

ok 1/1 are 'Possible' (1 test case)

Test #45:

score: 0
Accepted
time: 16ms
memory: 5888kb

input:

1
100000
92846 36298 94102 74728 62298 17712 70468 29085 26866 74943 50194 68114 23001 42022 1534 67883 22067 31802 76367 40 10506 5204 6633 47834 14730 42455 57533 57800 69803 85998 87243 39377 14734 4609 14172 68549 15757 44430 47282 66093 37600 6662 80279 54115 61844 39518 2508 88635 30432 16795 ...

output:

Possible
69812 60559 27562 62197 94896 75448 80367 89916 61225 86471 56385 67154 54323 93318 19476 62341 44987 75669 31982 35583 27433 63287 59118 12385 70053 88757 84845 93205 83203 82157 10969 62405 29756 84915 15929 26703 5810 23173 93093 8940 39269 26118 21789 28991 67063 85416 43845 96043 89613...

result:

ok 1/1 are 'Possible' (1 test case)

Test #46:

score: 0
Accepted
time: 13ms
memory: 5848kb

input:

1
100000
80249 61559 4136 5015 44391 76486 13189 7497 82608 50643 67643 98730 1372 52259 53113 69217 81937 63901 49868 23522 20692 79953 83998 38103 11847 94930 84641 55771 27259 62537 48000 86586 60900 86524 54701 15031 89203 24691 97682 73417 59806 35351 26783 95563 34915 61247 88409 42983 21153 8...

output:

Possible
98505 79327 9198 13913 8425 97129 56645 57887 51490 67744 61263 92846 12254 34819 7877 70848 66963 90092 2287 54391 41445 30026 26209 57882 91332 83918 9633 83283 37838 75639 37332 59906 24215 98625 45227 9356 81 96289 11774 7915 27683 41442 80144 53751 68638 4985 99859 37272 79753 16519 78...

result:

ok 1/1 are 'Possible' (1 test case)

Test #47:

score: 0
Accepted
time: 21ms
memory: 5840kb

input:

1
100000
47933 91823 8680 38452 98002 50208 28599 87139 73543 26971 73442 64562 24616 52949 43109 48263 71188 90073 98556 71141 35002 1318 47482 55519 52705 70983 13651 91244 53258 35004 5173 13432 8649 2930 60237 98310 56868 28611 2019 3477 57819 51659 892 49301 47016 7551 23697 89821 47998 32736 2...

output:

Possible
58247 56718 41214 12665 86245 14980 17227 34963 77314 32925 68719 16747 22174 38636 57063 22476 25009 86194 37668 52783 89862 29254 89848 10088 90515 2748 71672 18314 95348 50640 10481 81582 73529 27027 2209 95378 75094 43670 74105 87922 92957 88079 89427 87531 28457 90017 46072 14721 68950...

result:

ok 1/1 are 'Possible' (1 test case)

Test #48:

score: 0
Accepted
time: 16ms
memory: 5820kb

input:

1
100000
32591 31819 18269 4992 95481 15309 82223 37862 64829 8548 75956 40622 68213 26870 47574 85646 30288 67079 66288 87221 77650 65875 41974 90346 11987 3782 5691 18237 99521 48974 70063 21886 33587 72262 97090 66592 82785 88943 8082 47016 25506 64005 84545 32684 32875 5661 93415 12006 81882 453...

output:

Possible
89906 47109 81025 23040 33060 44017 14875 49854 97059 18512 49535 51344 92194 49763 86852 87406 23992 8589 4767 84695 99278 76670 54210 75230 47111 45082 54504 61914 81860 70470 71841 98420 78919 85808 56165 29088 30050 16725 73363 79380 45269 67926 37237 23844 49058 8284 43530 60063 65724 ...

result:

ok 1/1 are 'Possible' (1 test case)