QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#43585#4243. Good ColoringLevenAC ✓117ms21380kbC++1.7kb2022-08-09 19:23:212022-08-09 19:23:23

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-08-09 19:23:23]
  • 评测
  • 测评结果:AC
  • 用时:117ms
  • 内存:21380kb
  • [2022-08-09 19:23:21]
  • 提交

answer

// #pragma GCC optimize("Ofast")
// #pragma GCC optimize(2)
// #pragma GCC optimize(3)
// #pragma GCC optimize("inline")
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
// #define getchar() (frS==frT&&(frT=(frS=frBB)+fread(frBB,1,1<<15,stdin),frS==frT)?EOF:*frS++)
char frBB[1<<15],*frS=frBB,*frT=frBB;
inline int read(){
  int ans=0,f=1;char chr=getchar();
  while(!isdigit(chr)){if(chr=='-')f=-1;chr=getchar();}
  while(isdigit(chr)){ans=(ans<<3)+(ans<<1)+chr-48;chr=getchar();}
  return ans*f;
}
inline void cmax(int &a,int b){a<b?a=b:0;}
inline void cmin(int &a,int b){a>b?a=b:0;}
const int M = 3e5+5;
int n,m,k,T,ans,col[M],dp[M];
vector<int>g[M],Ans;
// auto dfs = [=](int x){
//     for(int y:g[x])
//         dfs(y),cmax(dp[x],dp[y]+1);
// }
void dfs(int x){
    dp[x]=1;
    for(int y:g[x])
        if(!dp[y])dfs(y),cmax(dp[x],dp[y]+1);
        else cmax(dp[x],dp[y]+1);
}
void dfs1(int x){
    Ans.emplace_back(x);
    for(int y:g[x])
        if(dp[y]==dp[x]-1){
            dfs1(y);
            break;
        }
}
signed main(){
    T=read();
    while(T--){
        n=read(),m=read(),k=read();Ans.clear();
        for(int i=1;i<=n;i++)col[i]=read(),dp[i]=0,g[i].clear();
        for(int i=1,x,y;i<=m;i++){
            x=read(),y=read();
            if(col[x]<col[y])swap(x,y);
            g[x].push_back(y);
        }
        for(int i=1;i<=n;i++)
            if(!dp[i])dfs(i);
        int S,ans=0;
        for(int i=1;i<=n;i++)
            if(dp[i]>ans)
                ans=dp[i],S=i;
        dfs1(S);
        printf("%lld ",ans);
        for(int i=1;i<=n;i++)printf("%lld ",dp[i]);puts("");
        for(auto x:Ans)printf("%lld ",x);puts("");
    }
    return 0;
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
3 3 3
1 2 3
1 2
2 3
3 1
3 1 3
1 2 3
1 2

output:

3 1 2 3 
3 2 1 
2 1 2 1 
2 1 

result:

ok good job (2 test cases)

Test #2:

score: 0
Accepted
time: 61ms
memory: 14052kb

input:

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

output:

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

result:

ok good job (50000 test cases)

Test #3:

score: 0
Accepted
time: 40ms
memory: 13160kb

input:

20000
14 17 2
1 2 1 2 1 1 1 2 1 1 1 2 2 2
9 4
13 1
1 12
2 11
14 5
6 12
1 14
12 9
13 11
14 9
13 9
11 14
10 8
2 3
2 6
13 3
5 13
14 11 4
1 3 1 4 3 2 2 3 1 2 4 1 4 3
14 4
14 13
11 10
9 10
1 7
9 7
12 7
12 13
2 6
11 2
10 13
14 17 2
2 1 1 1 2 2 2 2 1 2 1 2 2 1
1 2
10 14
4 7
10 2
8 3
14 13
11 7
13 9
12 4
1 ...

output:

2 1 2 1 2 1 1 1 2 1 1 1 2 2 2 
2 11 
3 1 2 1 2 1 1 2 1 1 2 3 1 3 1 
11 10 9 
2 2 1 1 1 2 2 2 2 1 2 1 2 2 1 
1 2 
3 2 2 1 2 3 3 3 3 1 2 1 1 2 1 
5 1 9 
5 3 4 1 1 1 2 3 3 2 2 1 5 
12 2 8 9 5 
2 2 1 1 1 1 2 1 1 1 2 1 2 1 1 
1 14 
5 3 2 1 2 5 3 1 1 5 2 4 2 1 3 
5 11 1 4 13 
3 1 1 1 2 1 3 2 2 2 1 2 1 1 1...

result:

ok good job (20000 test cases)

Test #4:

score: 0
Accepted
time: 43ms
memory: 14228kb

input:

25000
10 13 8
1 3 3 8 6 6 7 4 2 4
6 7
4 5
3 1
3 8
4 1
5 1
9 4
7 4
10 5
6 4
5 8
9 1
4 2
10 14 10
8 8 9 6 4 3 7 10 2 10
6 8
2 10
8 2
8 3
7 10
4 8
3 4
5 9
9 8
2 4
5 6
1 3
1 8
10 4
10 11 8
2 1 5 4 5 3 1 7 3 8
2 10
2 1
9 3
8 9
10 7
3 6
8 1
8 2
9 1
1 10
2 3
10 6 3
1 1 3 3 1 2 3 1 1 3
3 8
6 8
6 1
5 10
8 10...

output:

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

result:

ok good job (25000 test cases)

Test #5:

score: 0
Accepted
time: 32ms
memory: 13048kb

input:

5000
61 7 19
2 15 8 12 12 11 14 4 19 3 18 14 1 9 18 10 18 3 17 8 9 9 16 13 16 17 6 19 13 4 16 13 19 11 18 13 8 13 15 10 17 9 4 4 4 18 2 12 5 7 16 5 7 5 9 3 8 5 12 2 14
43 23
2 10
54 12
48 23
24 49
24 4
17 54
63 81 25
21 4 12 16 2 24 9 17 25 24 9 1 4 24 24 25 20 4 14 25 18 19 3 4 17 7 13 19 14 6 14 1...

output:

2 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
2 10 
6 5 1 4 1 1 5 2 4 5 5 2 1 1 4 4 6 2 1 2 3 3 3 2 1 1 1 1 3 1 3 3 1 2 1 2 1 2 4 5 2 2 3 2 1 3 2 1 2 4 2 1 1 2 3 2 1 2 2 3 5 4 1 1 
16 10 49 30 41 5 
6 2 1 1 2 3 2 2 4 2 1 ...

result:

ok good job (5000 test cases)

Test #6:

score: 0
Accepted
time: 47ms
memory: 14600kb

input:

5000
55 12 40
14 23 25 2 29 16 19 33 15 33 30 38 28 33 7 32 21 9 6 29 13 12 17 12 27 9 35 27 7 16 38 7 15 39 11 14 31 13 23 27 2 20 21 29 37 12 9 25 31 21 3 3 24 37 37
46 10
42 54
48 33
53 13
24 14
9 17
25 34
52 6
6 46
35 17
50 18
36 3
53 37 17
10 9 14 15 10 16 10 12 16 12 6 3 9 17 15 15 13 10 5 11 ...

output:

2 1 1 2 1 1 2 1 1 1 2 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 2 1 
3 36 
4 2 1 1 1 1 2 2 2 1 1 1 1 2 4 1 2 3 2 1 2 1 1 2 2 3 1 3 1 2 1 1 4 3 1 1 2 1 1 2 1 1 3 1 3 1 2 1 1 4 1 2 2 1 
14 25 39 31 
4 1 3 2 1 1 1 2 1 1 1 1 1 1 1 3 1 2 3 1 1 1 1 4 1 1 1 1 1 1...

result:

ok good job (5000 test cases)

Test #7:

score: 0
Accepted
time: 49ms
memory: 14788kb

input:

5000
59 13 29
17 8 27 4 12 9 19 23 13 4 7 27 25 9 14 10 6 7 10 19 18 4 5 1 26 8 17 27 15 26 14 26 6 4 18 11 9 21 15 20 25 15 17 24 29 6 22 28 8 3 26 20 23 11 23 27 10 6 18
52 5
31 24
43 15
10 45
53 24
46 40
37 29
33 2
46 13
34 33
23 15
38 11
22 45
55 77 18
10 16 13 4 9 12 14 6 8 16 17 1 9 16 10 13 9...

output:

3 1 3 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 2 1 1 1 1 2 1 2 1 1 3 1 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 
2 33 34 
5 2 1 3 3 2 1 2 1 3 4 5 1 3 5 3 2 4 2 1 5 1 2 5 4 2 4 2 2 1 1 1 5 4 3 3 1 2 3 1 2 3 3 1 2 2 1 5 4 2 2 2 1 4 2 2 
11 10 4 37 30 
4 1 2 2 3 3 1 2 2 2 3 1 1 1 1 1 2 1 1 2 1 ...

result:

ok good job (5000 test cases)

Test #8:

score: 0
Accepted
time: 46ms
memory: 13032kb

input:

5000
44 77 32
19 2 23 24 9 28 23 19 7 8 19 32 18 17 2 32 18 27 10 20 18 3 26 13 16 8 21 11 30 26 7 15 14 30 22 21 4 30 31 32 22 17 31 15
24 11
26 38
36 33
41 27
41 36
24 17
27 14
2 7
18 8
28 43
18 41
26 2
31 16
35 42
12 14
31 43
5 42
22 17
37 20
32 33
23 33
27 26
19 18
3 13
19 23
3 39
14 35
5 18
14 ...

output:

7 1 1 5 5 3 6 5 4 2 1 3 6 1 2 1 3 3 5 1 2 3 1 2 2 3 2 3 1 7 3 2 2 1 6 5 2 1 3 7 5 4 4 7 2 
29 6 35 42 5 26 2 
6 1 3 1 1 1 5 2 3 4 4 2 1 1 2 3 3 1 5 1 1 2 2 4 2 2 5 1 6 1 2 3 1 1 1 1 1 1 2 1 3 2 1 1 2 
28 26 10 31 22 32 
7 1 4 1 1 1 2 1 7 5 5 3 2 2 1 1 1 2 3 3 1 3 1 4 5 5 2 2 4 1 4 3 7 2 1 6 3 2 2 1 ...

result:

ok good job (5000 test cases)

Test #9:

score: 0
Accepted
time: 34ms
memory: 12912kb

input:

1000
135 126 10
8 2 5 6 1 9 3 7 4 10 10 8 4 5 1 8 10 1 8 10 1 5 8 7 4 1 5 6 6 4 8 8 1 3 7 2 1 4 8 1 10 2 3 6 8 7 4 4 6 2 6 1 7 3 3 6 7 9 8 2 10 1 9 9 3 8 9 9 2 3 8 2 7 1 2 10 5 5 5 1 3 1 1 6 6 7 3 6 8 1 10 10 8 8 4 2 4 5 7 9 4 7 1 1 3 6 10 2 10 1 1 9 1 9 1 6 10 4 2 6 9 3 3 9 7 10 2 8 7 3 10 8 3 3 7
...

output:

6 4 1 2 3 1 3 2 4 1 1 3 3 2 2 1 3 6 1 3 3 1 2 1 2 1 1 1 2 1 3 1 5 1 2 1 1 1 3 1 1 2 1 1 1 2 1 2 1 2 1 2 1 1 2 2 2 1 1 1 1 3 1 3 1 1 2 2 1 2 1 3 1 3 1 1 3 1 1 3 1 1 1 1 4 2 2 1 3 2 1 4 1 3 2 2 1 1 2 2 5 2 1 1 1 2 4 3 2 6 1 1 2 1 3 1 2 1 2 1 3 3 1 2 2 1 3 1 3 2 1 3 1 1 1 3 
17 32 84 38 108 37 
10 2 7 ...

result:

ok good job (1000 test cases)

Test #10:

score: 0
Accepted
time: 33ms
memory: 14428kb

input:

1000
134 703 112
69 50 79 65 63 89 61 25 28 104 81 110 96 18 93 105 63 35 56 22 25 39 84 43 34 4 90 24 75 98 37 21 42 98 42 61 17 84 108 95 46 6 35 22 109 5 39 54 18 105 104 96 27 87 100 14 80 44 21 43 62 94 60 85 106 85 89 5 70 37 76 24 71 73 26 68 51 36 12 38 74 95 91 106 83 76 32 90 58 87 69 111 ...

output:

16 11 6 12 10 11 11 10 2 4 13 11 13 14 3 13 15 6 5 8 4 3 8 12 5 5 1 14 4 12 12 6 3 7 12 1 9 2 12 14 15 9 1 1 3 15 2 1 9 2 14 13 13 2 12 16 3 6 8 3 8 7 15 10 11 14 13 13 1 11 4 10 5 11 10 2 10 6 6 2 7 10 15 14 14 13 12 6 13 9 12 9 16 10 2 7 6 8 5 15 16 2 10 3 14 10 5 1 3 11 6 2 7 12 5 1 15 3 7 4 8 1 ...

result:

ok good job (1000 test cases)

Test #11:

score: 0
Accepted
time: 30ms
memory: 14368kb

input:

1000
147 745 6
1 3 2 5 5 6 4 6 1 6 4 6 4 4 5 3 5 4 6 3 1 4 6 3 2 5 2 5 1 6 1 1 6 3 6 5 5 5 5 3 2 6 1 4 2 1 5 5 6 1 3 3 2 3 1 1 2 4 4 6 6 5 3 1 3 4 3 2 2 5 5 3 5 3 2 5 1 3 1 2 2 2 5 2 4 5 5 1 2 1 6 1 3 4 6 2 6 4 3 6 6 6 6 3 3 5 1 4 6 5 5 5 3 2 4 6 5 5 5 6 2 2 6 5 1 4 4 2 5 5 6 3 3 6 4 6 5 6 5 6 2 2 3...

output:

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

result:

ok good job (1000 test cases)

Test #12:

score: 0
Accepted
time: 39ms
memory: 14360kb

input:

1000
156 669 112
107 25 100 2 63 43 81 60 14 54 83 91 73 21 74 49 81 17 71 60 66 72 96 57 51 60 78 19 30 49 87 23 55 62 43 26 53 80 76 10 66 76 81 7 49 10 99 101 35 99 86 17 80 38 23 24 92 77 2 9 13 110 76 17 48 63 106 79 110 44 4 40 42 9 29 54 98 58 52 89 83 26 103 75 87 9 36 84 96 1 111 27 84 75 1...

output:

14 12 5 11 1 8 4 8 8 3 7 7 10 10 1 7 6 10 2 8 6 9 7 9 6 7 6 7 3 4 6 11 2 7 8 6 4 7 8 7 1 8 10 9 2 3 2 9 12 4 11 11 1 7 5 4 1 11 9 1 1 2 13 7 4 6 7 12 9 13 5 1 5 5 1 5 8 13 7 5 10 8 2 11 6 12 2 4 9 12 1 13 2 10 10 12 2 8 10 2 6 9 6 11 3 11 1 6 4 4 7 7 3 1 11 6 5 6 6 11 9 3 5 8 11 9 4 10 9 8 3 1 2 5 1...

result:

ok good job (1000 test cases)

Test #13:

score: 0
Accepted
time: 35ms
memory: 15516kb

input:

100
745 3559 5
2 2 3 4 5 1 1 3 1 3 5 3 2 1 3 2 4 2 3 1 3 3 1 1 3 4 3 3 2 2 4 1 1 2 1 2 1 1 3 4 4 1 4 1 5 2 2 2 5 2 3 4 2 3 4 5 5 5 2 1 2 5 4 2 3 5 1 1 1 2 4 1 5 1 1 5 4 2 4 4 4 5 4 5 5 5 5 3 5 1 4 4 4 1 5 4 4 5 4 2 2 5 1 2 4 1 4 3 3 4 1 3 2 4 4 5 3 2 1 1 1 1 4 1 4 3 4 3 2 1 1 1 1 5 5 1 5 3 5 1 4 2 2...

output:

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

result:

ok good job (100 test cases)

Test #14:

score: 0
Accepted
time: 32ms
memory: 14712kb

input:

100
680 6831 2
2 2 2 2 2 1 2 2 2 2 1 1 1 1 2 2 2 2 2 1 2 2 1 1 1 1 2 1 2 1 2 1 2 1 1 1 2 1 2 2 1 1 2 2 1 2 1 1 1 2 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 2 1 1 2 1 2 2 1 2 1 1 1 1 1 2 2 2 2 1 1 1 1 2 1 2 2 1 1 2 2 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 2 1 2 1 2 1 2 2...

output:

2 2 2 2 2 2 1 2 2 2 2 1 1 1 1 2 2 2 2 2 1 2 2 1 1 1 1 2 1 2 1 2 1 2 1 1 1 2 1 2 2 1 1 2 2 1 2 1 1 1 2 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 2 1 1 2 1 2 2 1 2 1 1 1 1 1 2 2 2 2 1 1 1 1 2 1 2 2 1 1 2 2 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 2 1 2 1 2 1 2 2 2 2 2 1 2 2 ...

result:

ok good job (100 test cases)

Test #15:

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

input:

100
747 5965 4
1 4 1 3 2 4 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2 1 3 1 3 2 5 1 4 5 4 3 5 1 5 4 4 3 3 4 4 4 2 1 1 1 1 3 2 2 1 2 3 2 5 3 5 4 2 5 5 1 1 5 1 3 4 2 1 4 4 4 5 1 5 1 5 5 2 2 5 5 1 4 3 5 3 2 3 5 5 5 2 5 2 3 5 4 3 4 5 1 4 5 2 5 4 2 4 5 1 5 1 1 2 5 5 1 1 3 1 1 4 ...

result:

ok good job (100 test cases)

Test #17:

score: 0
Accepted
time: 30ms
memory: 16456kb

input:

10
7218 51995 4
1 4 2 2 1 2 4 4 2 1 2 2 4 4 1 3 2 2 2 4 4 2 1 4 3 1 4 1 1 4 1 2 2 3 3 1 3 4 1 4 4 3 3 2 2 4 2 2 4 2 4 1 3 3 2 2 2 3 4 2 3 1 1 1 2 1 2 2 4 2 1 4 1 1 4 2 3 4 4 3 1 2 3 4 3 4 3 4 2 2 4 4 2 3 4 4 3 1 2 2 1 4 4 1 4 4 2 1 3 2 3 2 4 2 1 3 2 2 1 3 1 2 1 2 1 3 3 2 2 4 2 4 2 3 3 4 2 2 1 4 1 2 ...

output:

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

result:

ok good job (10 test cases)

Test #18:

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

input:

10
4778 43832 2945
2936 1374 2101 578 1699 2610 1449 2653 2508 2302 681 2649 1431 1148 908 2536 557 1554 562 1661 2660 958 2837 1862 1788 2007 2808 933 191 993 2160 1243 372 1226 1768 864 1054 2528 681 658 159 141 460 2848 678 1161 2168 1467 2735 1948 1124 1058 2332 1544 1064 1589 2863 1738 41 452 2...

output:

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

result:

ok good job (10 test cases)

Test #19:

score: 0
Accepted
time: 50ms
memory: 15936kb

input:

10
5339 46364 5109
4306 4160 4567 3831 4939 5091 2222 936 3667 2239 790 4781 2874 4200 4984 851 5010 3575 915 1380 4941 4922 3995 2771 4808 3733 3068 1440 818 1810 4553 1382 1974 683 3887 140 1649 1608 635 317 5089 1996 1909 493 5092 2075 2202 2883 2216 3521 3948 935 4544 4244 1504 4557 3337 2772 35...

output:

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

result:

ok good job (10 test cases)

Test #20:

score: 0
Accepted
time: 40ms
memory: 15684kb

input:

10
4391 58577 4
4 3 1 3 2 2 1 4 2 3 2 3 4 4 2 3 3 1 3 4 3 4 4 3 1 2 3 3 3 1 1 3 3 1 1 2 2 1 4 1 3 3 3 2 1 3 3 3 4 2 3 2 2 4 1 4 3 4 4 3 1 3 3 4 3 2 1 2 1 2 4 3 1 2 3 2 4 4 4 2 2 3 2 2 2 1 2 4 4 4 1 1 4 2 2 2 1 2 1 2 1 3 2 4 2 4 2 3 3 3 4 1 2 3 3 1 3 1 3 1 1 1 2 2 1 2 4 1 2 3 2 3 4 1 1 1 4 1 4 2 2 2 ...

output:

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

result:

ok good job (10 test cases)

Test #21:

score: 0
Accepted
time: 29ms
memory: 15992kb

input:

10
7288 44997 600
180 409 155 178 42 262 418 273 545 326 416 592 449 38 521 218 342 94 121 423 229 547 553 25 402 596 360 441 550 442 407 294 93 296 472 171 105 145 425 95 251 466 27 106 319 439 487 269 172 250 408 238 590 313 479 239 105 362 546 592 454 441 273 563 177 455 120 17 289 458 188 402 17...

output:

33 8 19 2 5 2 9 14 8 23 6 11 27 14 1 25 9 17 6 1 21 13 24 24 1 20 28 19 19 26 21 8 13 3 12 23 9 4 4 20 5 7 15 1 7 12 17 20 8 6 3 17 6 23 16 19 10 1 19 22 23 17 20 9 18 6 18 6 1 12 19 8 18 6 1 7 15 23 18 2 8 23 5 10 10 5 20 7 3 15 4 1 14 15 3 8 21 1 1 21 23 1 3 21 4 18 5 5 7 16 2 22 13 12 23 10 24 1 ...

result:

ok good job (10 test cases)

Test #22:

score: 0
Accepted
time: 35ms
memory: 16656kb

input:

10
9026 43096 5774
2327 3530 304 3560 5186 925 5452 2103 4460 2708 3555 1295 760 5126 3070 4391 3260 437 331 1399 3955 5154 1074 3736 596 1110 1639 1857 523 2992 5194 775 2243 1891 826 1128 4882 4532 2045 1411 1778 3238 852 3428 5144 4596 5108 688 345 1011 464 1019 2050 4449 2102 671 163 2356 2668 3...

output:

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

result:

ok good job (10 test cases)

Test #23:

score: 0
Accepted
time: 49ms
memory: 16200kb

input:

10
5239 43999 850
544 176 534 783 144 369 57 186 458 779 119 585 50 401 658 524 495 296 504 552 57 742 192 453 187 813 585 379 647 302 459 709 473 687 75 731 551 314 654 293 122 668 88 525 128 546 464 482 18 450 142 107 234 272 559 844 133 100 550 91 82 482 307 796 469 193 251 114 363 449 739 203 80...

output:

41 22 8 24 32 7 17 2 5 20 34 3 22 2 7 26 24 17 13 22 23 3 32 7 9 5 35 24 14 30 8 11 34 15 31 2 28 25 13 24 4 4 26 3 24 5 19 24 20 2 21 3 6 7 8 26 34 4 5 24 4 4 19 10 31 18 3 10 5 16 19 33 9 31 2 21 35 7 19 32 29 34 30 12 33 35 12 6 5 26 3 12 16 22 20 29 13 34 25 5 8 15 14 5 14 27 6 11 8 25 11 3 27 3...

result:

ok good job (10 test cases)

Test #24:

score: 0
Accepted
time: 43ms
memory: 16260kb

input:

10
1589 49515 1521
47 1290 1406 1479 116 785 147 317 1364 1263 830 541 60 814 789 949 899 1092 1155 283 1375 500 132 1520 129 995 1384 1109 940 1146 523 698 53 715 1116 926 956 429 892 866 369 223 266 971 509 1242 229 800 532 1519 455 1115 460 1079 1171 831 448 385 173 538 736 343 1 862 1281 243 101...

output:

117 6 98 107 111 11 61 15 24 101 93 65 38 6 64 62 71 65 84 90 25 104 39 14 117 9 79 105 82 71 89 37 59 3 56 85 70 72 36 68 66 28 17 23 77 41 96 8 63 44 117 33 86 36 83 90 67 35 31 15 44 58 30 1 66 97 20 73 82 85 71 3 31 51 11 60 39 58 27 20 43 117 75 12 85 78 94 63 47 27 15 36 5 24 73 74 30 65 49 45...

result:

ok good job (10 test cases)

Test #25:

score: 0
Accepted
time: 50ms
memory: 16380kb

input:

10
7945 43085 5554
1585 2838 2293 2495 3016 4728 3975 4498 5010 1268 5385 906 2648 4022 923 4663 4976 2262 5064 1838 3398 4637 752 537 946 408 3878 5194 4355 2914 1502 843 298 5363 1112 5084 810 714 4264 4635 4967 1684 2858 1477 3696 184 709 2151 1522 4215 3301 1353 178 4801 5470 3211 1015 3900 4665...

output:

28 3 14 9 11 15 19 16 18 23 7 17 4 12 17 3 21 8 6 18 4 12 21 2 4 7 1 10 23 16 13 8 4 3 25 2 19 4 2 15 8 18 8 12 6 18 1 2 7 4 17 10 2 1 23 24 2 3 16 19 20 6 5 7 24 10 19 9 14 7 5 11 9 20 22 19 2 25 21 2 14 5 4 11 19 21 19 15 12 19 9 8 21 8 18 1 10 1 8 2 21 6 21 23 14 23 2 12 16 14 22 19 3 1 10 22 13 ...

result:

ok good job (10 test cases)

Test #26:

score: 0
Accepted
time: 35ms
memory: 16696kb

input:

10
7941 58853 1914
997 1207 1376 1184 798 149 821 1862 833 1476 579 1263 939 1523 184 1893 72 891 1043 272 875 1094 1319 1843 1911 1400 1869 1430 883 449 1566 992 902 621 631 300 948 1432 45 629 1511 43 464 441 373 961 989 1477 823 1132 447 1355 1826 888 1789 1567 9 72 669 990 229 1173 1875 269 1459...

output:

44 11 20 20 17 11 3 4 26 14 24 7 22 12 30 4 30 2 17 12 5 17 16 27 36 37 31 33 26 16 3 27 10 15 7 8 6 17 24 1 10 28 1 1 8 8 21 13 30 13 22 4 30 33 12 25 27 1 1 9 11 4 27 40 2 24 30 8 8 19 4 12 25 6 4 16 28 3 28 28 10 12 15 5 31 9 27 11 29 38 4 7 13 5 30 17 15 11 20 7 6 35 20 11 25 7 3 41 6 23 1 8 9 2...

result:

ok good job (10 test cases)

Test #27:

score: 0
Accepted
time: 40ms
memory: 17420kb

input:

10
2714 40416 289
187 94 251 136 91 212 44 31 258 148 254 32 28 236 182 146 286 238 217 101 265 142 144 167 58 42 141 284 92 181 253 187 162 164 276 112 176 104 99 223 7 40 239 74 237 130 189 230 153 142 107 83 56 121 203 21 270 214 63 186 69 27 258 178 20 53 142 61 286 129 198 26 143 153 206 57 185...

output:

56 39 13 45 23 19 40 5 6 48 20 48 2 5 46 30 25 49 45 41 20 48 28 26 31 9 6 22 51 18 32 42 38 32 30 51 21 32 12 15 41 1 8 46 15 45 28 38 43 29 24 20 11 11 24 40 3 51 38 8 33 11 4 47 34 4 5 26 6 51 26 38 4 29 30 40 9 37 48 53 9 3 49 52 35 21 49 20 38 21 48 12 1 11 15 35 38 30 23 19 4 25 40 28 17 14 45...

result:

ok good job (10 test cases)

Test #28:

score: 0
Accepted
time: 45ms
memory: 15228kb

input:

10
4502 50984 4151
3323 2923 3668 983 3693 3833 2557 2968 376 1453 1286 80 608 3590 1124 3097 1856 2296 1248 3147 169 3640 979 4112 4098 265 2651 1276 3286 2219 3646 3194 3460 1192 2556 1607 2600 3550 2845 518 726 3070 35 132 2997 3010 355 2986 2267 3183 2056 2715 1249 3980 4099 4079 2662 641 288 13...

output:

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

result:

ok good job (10 test cases)

Test #29:

score: 0
Accepted
time: 42ms
memory: 15692kb

input:

10
4334 54883 2
2 1 1 2 1 2 2 1 2 2 2 2 1 2 1 1 1 2 2 2 2 2 1 2 1 2 1 2 2 1 1 2 1 1 2 1 1 2 1 2 2 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 1 9 2 1 6 9 7 2 7 7 1 2 8 3 1 2 5 6 9 2 5 4 3 2 3 8 6 1 5 7 9 5 8 6 7 8 1 9 6 5 7 2 2 8 7 1 8 6 2 3 1 7 5 6 7 9 9 7 1 4 2 4 8 3 4 6 9 2 ...

result:

ok good job (10 test cases)

Test #31:

score: 0
Accepted
time: 36ms
memory: 15028kb

input:

10
2848 52774 4
3 1 1 4 3 1 1 3 1 4 2 2 3 1 2 1 4 2 3 2 1 2 3 4 1 4 1 3 4 4 2 4 1 1 1 3 1 4 1 4 2 3 3 1 1 2 3 4 4 4 4 3 4 1 1 2 3 1 3 1 2 3 4 1 2 4 1 2 2 3 4 3 1 4 2 3 1 2 2 2 3 2 1 1 3 1 4 4 1 4 2 3 4 4 4 2 1 4 4 4 2 1 3 2 3 3 2 4 3 2 1 2 1 4 1 2 2 2 4 3 2 4 4 3 2 2 1 3 1 1 4 4 3 2 4 2 3 4 1 1 4 2 ...

output:

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

result:

ok good job (10 test cases)

Test #32:

score: 0
Accepted
time: 51ms
memory: 16936kb

input:

5
12556 130840 5
3 1 2 4 5 5 1 1 5 1 3 5 3 3 3 4 1 5 2 5 5 1 4 3 3 1 3 4 1 5 4 3 5 3 5 5 5 2 5 4 5 1 2 4 5 4 2 5 2 3 3 4 4 5 5 3 1 2 4 1 1 1 3 2 5 3 4 5 2 2 3 2 1 3 4 4 2 3 1 2 1 2 2 4 4 1 5 4 5 1 1 5 5 4 5 1 1 5 5 2 5 5 5 3 5 5 3 3 1 1 1 2 1 3 5 1 4 5 4 3 1 5 1 2 4 1 2 4 3 5 3 1 3 4 5 5 2 1 2 3 3 5...

output:

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

result:

ok good job (5 test cases)

Test #33:

score: 0
Accepted
time: 61ms
memory: 18104kb

input:

5
13368 58753 5911
4711 2863 3713 645 4547 525 3769 234 141 3528 2113 1208 1500 610 5783 5030 894 5125 26 4535 4478 4551 3760 518 2987 5004 5855 1225 3067 3001 4084 4090 1321 1951 3747 1407 5151 3781 607 3215 1510 5223 3129 2594 890 4271 2123 993 4938 5630 2825 5040 1789 908 1183 4040 685 2465 3147 ...

output:

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

result:

ok good job (5 test cases)

Test #34:

score: 0
Accepted
time: 82ms
memory: 20732kb

input:

1
273530 300000 4
3 2 1 4 2 2 2 4 4 4 1 2 2 2 1 4 1 2 2 4 3 4 4 3 3 2 2 1 2 4 1 3 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1 3 1 2 3 2 2 1 3 2 1 1 3 1 3 3 1 1 1 1 1 2 1 1 1 3 1 2 1 2 3 1 1 1 3 2 2 2 3 3 1 3 3 1 2 2 3 1 2 2 3 2 3 3 1 3 2 1 2 2 3 3 3 3 1 2 1 1 1 1 2 3 1 3 3 ...

result:

ok good job (1 test case)

Test #36:

score: 0
Accepted
time: 103ms
memory: 18576kb

input:

3
41788 214631 23661
12454 21501 16329 8928 13645 5571 16349 1632 9800 16695 23199 21059 10968 2356 12608 2449 13224 16878 21732 4643 6129 23018 15240 18596 4921 5646 21012 12275 14813 4984 1198 14397 12602 23270 17029 4810 13081 19632 13649 7302 14701 17969 20553 3665 2587 5469 3159 11699 10698 658...

output:

33 12 25 11 6 18 6 11 1 6 18 22 21 10 4 8 1 9 20 16 3 3 17 10 14 4 2 20 13 14 1 1 8 13 19 14 1 12 21 19 6 17 19 13 5 3 1 3 8 12 6 3 1 25 11 4 8 14 12 25 3 1 13 8 8 8 9 17 8 10 3 6 1 16 3 9 20 3 23 15 9 18 31 1 15 3 2 3 3 18 19 15 18 1 11 6 1 26 19 13 18 3 12 5 1 1 2 11 9 14 11 4 8 5 9 14 1 9 18 22 7...

result:

ok good job (3 test cases)

Test #37:

score: 0
Accepted
time: 69ms
memory: 19752kb

input:

1
82735 300000 3
3 3 1 1 1 2 2 2 2 1 2 2 1 3 2 1 1 1 2 2 1 3 2 2 2 2 2 3 1 1 2 1 2 3 2 2 1 1 2 3 2 2 3 3 3 3 1 2 1 3 3 2 2 3 1 3 1 2 1 2 3 1 2 2 2 3 3 3 3 1 2 2 1 2 3 3 2 2 1 1 2 1 2 2 1 2 2 2 2 3 3 3 1 1 1 1 2 1 2 2 1 3 1 3 3 1 1 3 2 3 2 1 2 3 3 1 2 1 1 1 3 2 2 1 1 3 1 3 2 1 3 2 2 3 2 3 2 3 3 2 3 3...

output:

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

result:

ok good job (1 test case)

Test #38:

score: 0
Accepted
time: 43ms
memory: 19856kb

input:

1
100000 300000 3
1 2 2 1 1 1 2 3 1 1 3 1 2 1 2 1 3 3 3 1 2 1 2 1 1 2 2 3 1 2 2 1 2 2 2 1 1 1 1 2 2 2 3 1 2 1 2 2 2 3 1 2 1 2 3 2 3 3 3 2 2 2 2 1 3 2 3 1 1 2 2 2 2 3 3 2 2 2 2 1 1 2 2 2 2 3 1 1 2 2 1 2 3 3 1 1 2 3 2 3 1 3 3 2 3 2 1 1 2 1 2 1 1 3 2 2 1 1 3 2 1 1 3 2 2 2 1 1 1 2 1 2 3 2 2 1 1 2 3 3 3 ...

output:

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

result:

ok good job (1 test case)

Test #39:

score: 0
Accepted
time: 63ms
memory: 16856kb

input:

1
100000 300000 4
1 1 1 1 3 2 4 4 2 2 2 4 2 4 2 2 3 3 2 4 1 1 1 3 3 4 1 4 2 1 4 1 3 4 3 1 2 1 1 4 3 1 1 4 4 1 1 3 1 1 1 3 1 1 3 1 2 1 3 1 1 1 4 3 1 3 1 3 4 1 3 4 1 4 4 1 3 2 4 2 4 1 1 2 3 3 4 3 1 1 4 4 3 2 3 2 1 1 3 2 1 3 3 1 4 4 1 3 4 1 2 2 2 3 1 2 3 3 2 2 4 3 2 3 2 3 4 1 3 2 1 2 2 2 2 4 1 2 4 2 3 ...

output:

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

result:

ok good job (1 test case)

Test #40:

score: 0
Accepted
time: 50ms
memory: 17056kb

input:

1
100000 300000 34719
32526 577 19390 1923 22779 19979 8794 32634 19898 33999 25503 18041 15604 16996 15704 30524 14084 17529 17302 3618 34047 34703 17185 10284 6885 33066 33359 4288 5686 19984 26656 4128 8297 5203 21686 24827 28339 33208 31277 33671 29355 15744 7304 14365 20768 9905 10219 24781 315...

output:

23 15 2 3 1 6 4 3 8 6 7 9 6 2 4 2 10 5 7 6 1 11 12 8 3 3 6 13 3 5 9 12 1 3 2 4 6 2 11 9 14 10 7 2 5 5 3 4 6 11 10 7 5 4 6 2 8 5 7 8 6 2 3 7 3 1 2 6 9 6 8 11 14 1 1 6 1 1 2 3 15 6 2 2 4 2 11 3 5 4 5 13 14 2 8 2 1 1 2 10 5 11 4 2 2 6 7 2 1 2 4 2 3 1 10 1 3 13 12 7 7 4 1 2 6 2 9 2 5 2 12 3 6 2 10 2 8 1...

result:

ok good job (1 test case)

Test #41:

score: 0
Accepted
time: 54ms
memory: 17068kb

input:

1
100000 300000 64831
49877 44313 44185 29008 59448 59278 25732 36764 1579 30644 4402 46765 20103 3018 42338 2541 61937 26348 27438 28189 40898 23822 25295 37626 49171 15959 25725 2647 9924 63051 64494 28554 46797 11015 21169 1836 41223 31586 60684 16304 48191 52191 56598 15454 11178 30633 39720 374...

output:

23 10 5 8 6 12 8 2 4 1 4 1 15 4 1 2 2 7 5 1 1 8 2 3 4 3 3 4 1 1 12 10 2 5 2 3 2 7 5 8 2 6 10 7 1 2 4 6 3 1 10 3 1 3 1 5 15 13 3 11 8 4 1 8 8 3 1 3 10 2 2 4 7 8 16 1 6 5 2 10 6 13 10 5 1 1 1 10 6 1 13 4 1 9 8 8 11 9 1 8 11 10 5 1 1 4 1 3 3 9 13 11 2 3 8 5 9 8 9 6 10 13 4 7 3 8 8 2 10 1 1 7 8 10 6 6 1...

result:

ok good job (1 test case)

Test #42:

score: 0
Accepted
time: 57ms
memory: 16920kb

input:

1
100000 300000 79565
18959 30475 20048 67071 14016 54012 50609 77702 3323 9995 16198 75043 4349 20194 32477 56352 59641 59384 19361 37179 41457 30966 37750 24564 55435 44456 12048 16470 40745 70268 43096 21573 38628 16212 17363 51503 22605 26547 22001 39664 39606 79479 15589 24576 42992 50475 4414 ...

output:

21 3 3 2 9 5 8 9 12 1 1 4 4 1 3 3 7 4 9 3 6 4 1 6 2 7 1 4 2 5 11 8 3 5 4 1 6 2 5 1 4 6 11 2 4 9 8 1 10 9 1 9 3 1 4 8 5 4 6 3 17 7 5 4 1 3 11 1 6 7 7 1 3 9 1 5 5 13 10 1 1 11 14 10 10 10 12 2 1 2 1 2 4 4 2 10 1 8 3 10 3 9 7 4 8 9 6 4 1 1 1 7 1 6 3 8 5 5 2 1 4 1 1 4 1 8 1 7 12 1 5 2 5 5 3 5 10 5 6 2 1...

result:

ok good job (1 test case)

Test #43:

score: 0
Accepted
time: 41ms
memory: 16880kb

input:

1
100000 300000 3
2 3 1 1 2 1 2 1 1 3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 1 3 3 2 3 1 1 1 1 1 3 2 1 2 3 2 3 3 3 2 2 2 3 1 1 3 3 2 1 2 2 2 1 3 2 1 2 2 2 1 2 1 2 2 3 1 2 1 1 2 3 2 3 1 3 1 3 1 1 2 1 2 3 1 2 1 3 3 3 1 3 3 1 1 3 2 1 3 3 2 2 1 3 2 3 1 1 1 2 1 1 1 2 2 1 3 1 ...

result:

ok good job (1 test case)

Test #45:

score: 0
Accepted
time: 48ms
memory: 16872kb

input:

1
100000 300000 3
3 1 2 3 2 1 2 2 3 1 2 2 3 1 2 1 2 3 1 1 2 1 3 3 1 1 2 3 1 3 2 1 2 3 2 2 3 3 2 2 3 3 2 1 2 1 3 3 1 1 1 1 3 2 2 3 1 1 2 2 1 1 1 1 1 2 2 2 1 3 1 3 3 1 1 2 2 1 2 1 2 2 3 1 2 1 2 1 3 2 2 1 3 2 3 2 2 2 1 3 2 1 3 2 3 3 1 3 1 3 1 2 1 2 1 2 1 1 3 1 2 2 3 3 3 1 2 3 1 2 3 2 3 1 1 2 1 2 1 1 1 ...

output:

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

result:

ok good job (1 test case)

Test #46:

score: 0
Accepted
time: 68ms
memory: 17076kb

input:

1
100000 300000 12380
10126 2733 5582 1746 5353 8026 9361 5083 4997 5945 7674 8987 4318 1058 1910 12343 11335 1903 129 1025 6084 9695 10752 7737 7504 1396 2769 11207 871 10740 6309 2264 2253 7252 6708 10858 1042 5976 9666 10535 4448 9203 12287 1072 7929 10327 7302 4708 9410 10179 8646 9301 6934 7740...

output:

20 9 4 6 4 5 5 9 6 2 3 4 9 4 1 1 9 13 1 1 1 5 7 11 4 7 1 3 6 2 9 7 2 2 5 9 6 1 2 11 15 9 12 7 1 6 8 5 4 10 6 9 8 8 11 6 8 5 3 2 10 3 2 1 12 4 9 7 3 3 3 9 6 11 1 9 8 6 11 8 9 3 8 4 1 1 12 6 1 9 10 5 12 10 8 5 8 6 6 3 3 7 8 7 9 2 15 1 8 10 10 4 8 4 9 4 6 1 5 5 4 1 13 4 8 5 2 6 9 12 11 4 2 3 9 1 2 5 1 ...

result:

ok good job (1 test case)

Test #47:

score: 0
Accepted
time: 53ms
memory: 17064kb

input:

1
100000 300000 9270
8321 8236 9193 2193 3735 4971 3406 1257 8526 4259 7204 1108 5846 8514 8528 4379 8681 3009 7802 467 6743 8015 2600 5835 8521 4354 2865 852 3548 4325 6388 485 8982 6723 442 7676 6824 6544 7296 9152 4119 4421 1195 4025 3074 4625 8068 915 8224 7712 1914 4311 3503 2772 4207 2894 3540...

output:

22 13 8 6 4 1 6 6 2 12 7 15 1 6 11 13 2 13 6 9 1 9 12 1 9 16 5 4 1 5 6 3 3 5 9 1 9 2 7 10 13 7 4 3 3 6 5 10 1 11 9 2 9 6 1 6 3 3 6 4 5 5 6 2 11 11 10 7 9 4 4 8 2 11 2 5 8 1 7 8 11 7 3 10 3 17 1 1 2 8 5 7 2 5 5 4 1 1 11 11 9 5 7 1 1 10 1 13 13 2 8 7 15 4 1 10 5 6 10 1 5 14 4 1 1 7 6 4 2 5 5 7 4 5 1 1...

result:

ok good job (1 test case)

Test #48:

score: 0
Accepted
time: 43ms
memory: 16856kb

input:

1
100000 300000 3
3 3 2 1 3 2 1 2 3 2 1 1 2 1 1 2 2 3 2 3 1 1 3 1 3 2 3 1 1 3 1 3 3 3 2 2 1 1 1 3 3 3 2 2 2 2 1 2 2 3 1 1 1 2 3 1 1 1 1 3 3 1 3 1 3 3 2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 6 6 1 3 2 2 2 2 4 1 1 5 5 1 3 3 3 6 6 2 3 3 5 4 6 1 4 5 1 3 5 3 1 1 1 5 3 3 6 5 ...

result:

ok good job (1 test case)

Test #50:

score: 0
Accepted
time: 63ms
memory: 16952kb

input:

1
100000 300000 4
3 4 2 4 3 4 4 4 2 2 4 1 3 1 3 2 2 3 3 1 3 2 4 1 4 3 2 3 1 3 4 2 2 2 4 3 2 1 2 3 2 2 1 1 2 2 4 3 1 3 1 2 2 4 2 1 3 1 1 1 3 1 3 2 3 3 4 4 1 4 2 1 4 2 2 2 1 2 2 4 3 3 2 4 3 3 3 2 2 2 1 2 1 4 2 2 3 1 1 2 2 4 4 3 4 2 4 2 3 2 3 1 3 3 3 2 3 4 2 2 4 3 1 3 2 4 3 2 1 1 2 4 4 1 3 2 1 1 2 3 4 ...

output:

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

result:

ok good job (1 test case)

Test #51:

score: 0
Accepted
time: 46ms
memory: 16616kb

input:

1
100000 300000 2
2 1 2 1 1 1 2 1 1 1 2 1 1 2 1 2 1 1 1 1 2 2 2 2 1 1 1 2 1 1 1 2 2 2 2 2 1 1 2 1 1 2 2 1 2 2 2 1 1 1 2 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 1 2 2 1 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 2 1 2 1 1 1 2 1 1 1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Test #53:

score: 0
Accepted
time: 60ms
memory: 16700kb

input:

1
100000 300000 2
2 2 2 2 2 1 2 1 2 1 1 2 1 1 2 1 1 2 2 1 2 1 2 2 1 2 1 2 2 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 2 1 1 2 1 1 2 2 2 2 2 2 1 1 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1 1 2 1 2 2 1 1 2 2 2 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 1 2 1 2 2 2 1 1 1 2 2 2 1 2 1 2 2 2 2 1 2 2 2 1 1 1 1 2 2 2 1 2 1 1 2 2 2 2 ...

output:

2 2 2 2 2 2 1 2 1 2 1 1 2 1 1 2 1 1 2 2 1 2 1 2 2 1 2 1 2 2 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 2 1 1 2 1 1 2 2 2 2 2 2 1 1 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1 1 2 1 2 2 1 1 2 2 2 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 1 2 1 2 2 1 1 1 1 2 2 2 1 2 1 2 2 2 2 1 2 2 2 1 1 1 1 2 2 2 1 2 1 1 2 2 2 2 1 1 1 2 1 1 2 1 ...

result:

ok good job (1 test case)

Test #54:

score: 0
Accepted
time: 48ms
memory: 16936kb

input:

1
100000 300000 4
4 1 4 4 4 3 3 2 1 2 3 4 3 2 4 1 3 3 3 1 1 4 4 1 1 4 4 4 1 3 4 2 1 3 2 2 4 4 1 2 2 3 1 4 3 4 3 2 3 2 1 4 4 3 4 1 2 4 1 4 2 2 3 3 4 4 1 1 3 2 2 4 1 4 2 2 4 3 2 2 2 3 4 3 1 1 1 1 3 4 2 3 4 3 2 1 1 4 2 1 2 1 2 3 3 1 4 4 4 3 4 2 3 4 4 1 4 4 4 4 3 4 3 2 3 2 4 1 1 1 1 4 1 1 3 4 4 3 3 3 1 ...

output:

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

result:

ok good job (1 test case)

Test #55:

score: 0
Accepted
time: 49ms
memory: 16912kb

input:

1
100000 300000 5
1 3 5 2 5 1 1 4 3 5 4 5 2 1 5 3 5 1 1 4 5 4 3 2 4 2 3 2 5 3 5 1 4 1 5 5 1 4 1 3 1 2 2 5 2 5 4 2 4 5 1 5 4 1 3 5 3 4 4 5 3 2 5 5 4 2 4 5 5 5 1 1 4 1 3 1 1 3 2 5 4 1 1 2 3 5 2 2 4 5 3 1 3 4 2 1 3 3 1 4 3 1 5 2 3 5 4 5 3 2 4 1 5 2 5 5 1 1 1 1 4 3 3 3 4 3 1 3 4 3 2 2 3 5 5 2 5 2 1 2 3 ...

output:

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

result:

ok good job (1 test case)

Test #56:

score: 0
Accepted
time: 99ms
memory: 21380kb

input:

1
296799 300000 213685
86099 159588 138902 93725 195387 97846 20737 45184 158792 103625 2481 54023 52522 6834 12309 102317 8872 24146 148974 16377 3164 12159 176717 212755 117413 144381 159439 121653 152642 129495 206631 32047 174988 146774 107360 196940 73817 105526 196972 137546 35405 23163 138491...

output:

11 3 6 3 1 4 1 1 1 3 1 1 1 2 1 2 3 1 1 2 1 1 2 2 5 2 1 3 2 1 3 5 1 3 1 4 1 1 1 3 1 1 1 3 1 1 1 3 1 1 3 3 3 3 1 1 1 3 1 2 1 1 2 1 2 1 1 3 3 1 3 1 2 6 1 1 1 2 2 2 1 1 1 4 1 1 2 2 3 5 5 2 1 1 3 1 2 1 2 3 2 3 1 4 2 1 1 1 2 3 1 4 4 3 4 1 1 6 4 2 1 3 2 2 1 2 1 3 1 2 2 1 2 1 1 1 2 1 1 2 4 1 2 2 1 5 3 1 3 5...

result:

ok good job (1 test case)

Test #57:

score: 0
Accepted
time: 82ms
memory: 19684kb

input:

1
233959 300000 4
1 4 4 3 4 3 3 1 1 2 3 3 1 2 4 3 4 4 3 2 3 2 3 1 1 1 4 1 3 4 3 3 1 3 4 2 1 4 4 1 1 3 4 4 2 1 2 1 1 3 4 3 4 4 3 2 1 2 1 1 2 2 2 2 2 3 3 3 4 2 4 1 2 2 2 1 2 4 4 4 1 4 2 4 3 1 1 4 3 2 2 1 1 1 3 1 1 3 2 1 2 4 3 4 4 1 3 3 4 3 1 4 4 3 2 3 4 4 4 3 4 3 2 1 3 2 4 1 1 4 3 1 1 4 3 3 2 3 2 3 2 ...

output:

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

result:

ok good job (1 test case)

Test #58:

score: 0
Accepted
time: 49ms
memory: 16784kb

input:

1
89583 300000 8
4 1 4 3 5 1 5 4 3 3 2 2 1 2 5 2 4 7 4 6 6 6 7 5 7 8 4 4 5 3 4 1 6 5 2 1 1 5 5 5 7 3 6 1 1 5 7 3 6 5 3 3 1 7 6 5 1 3 4 1 3 2 4 8 2 3 3 3 6 5 5 8 6 4 5 4 3 8 8 4 8 8 2 6 5 2 1 8 3 3 8 4 5 7 3 6 6 2 1 5 7 5 5 8 6 3 7 4 5 8 5 5 4 3 7 2 8 5 3 7 8 2 7 5 7 6 7 2 1 1 3 3 7 1 7 4 8 3 5 8 1 6...

output:

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

result:

ok good job (1 test case)

Test #59:

score: 0
Accepted
time: 42ms
memory: 17580kb

input:

1
123406 300000 49302
5552 15387 32129 23624 37138 33292 37753 30610 35069 48458 7811 48492 12524 2793 22199 38447 12327 3564 43227 41539 49118 48267 15101 47188 46229 27461 17772 35447 10588 46929 19360 25174 46620 29667 26276 34240 41570 34306 1349 43154 9874 8377 19907 978 41310 35979 24905 14374...

output:

18 2 4 8 4 10 5 4 8 8 8 1 5 3 1 4 9 1 1 6 9 11 10 4 6 13 7 2 4 3 3 5 2 4 7 2 10 5 5 1 9 5 3 6 2 7 5 3 2 9 13 2 4 4 6 5 10 1 7 6 1 6 2 1 4 7 4 7 4 1 3 6 1 1 1 4 9 8 4 1 4 2 2 5 7 7 7 6 1 4 5 3 6 11 3 5 5 6 5 4 9 1 3 1 3 8 2 3 1 3 11 4 6 2 4 8 6 9 1 8 2 11 4 2 3 5 1 3 6 10 1 7 7 1 1 1 4 5 9 1 4 1 2 7 ...

result:

ok good job (1 test case)

Test #60:

score: 0
Accepted
time: 71ms
memory: 17112kb

input:

1
105965 300000 33639
16925 10238 16704 3697 26367 20540 26919 32060 20291 11020 4499 14074 19456 27510 29286 32299 22152 20478 13072 15808 21087 18990 5938 23036 16709 26183 25354 26367 7882 19700 27458 16830 29993 24758 9767 1228 12350 22570 15784 25721 13784 32467 14995 23825 20052 10617 14424 17...

output:

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

result:

ok good job (1 test case)

Test #61:

score: 0
Accepted
time: 117ms
memory: 21280kb

input:

1
299313 300000 215667
193818 106802 31419 214463 197012 209936 171008 94024 90175 14428 48730 120714 163958 73539 117736 206662 111215 31407 100212 53755 169337 17744 161866 53097 195950 194163 20322 59291 140800 163147 49663 180559 27232 35514 204573 180792 168030 82977 42843 129722 75396 176929 1...

output:

10 1 2 1 4 4 1 3 2 1 1 1 4 4 1 1 2 2 2 3 2 6 1 3 3 2 6 1 3 1 2 1 4 2 1 6 9 2 2 2 1 2 3 4 1 3 2 1 1 1 1 5 5 2 1 1 1 3 4 2 2 1 3 2 1 1 4 1 2 2 1 1 1 2 3 2 3 1 1 1 1 5 2 1 2 4 3 4 1 4 1 2 1 1 1 4 1 1 2 1 3 1 2 3 1 4 1 2 2 2 1 3 1 1 3 2 3 1 3 1 3 1 2 4 6 3 1 1 3 1 1 1 1 1 1 2 2 1 2 1 1 3 1 1 2 3 2 1 2 2...

result:

ok good job (1 test case)

Test #62:

score: 0
Accepted
time: 72ms
memory: 20604kb

input:

1
278379 300000 5
4 5 4 5 4 5 3 1 2 4 4 2 1 4 1 4 3 4 5 4 4 4 3 2 1 1 3 5 2 4 3 4 3 1 3 4 3 5 4 2 1 5 1 1 2 5 4 3 2 4 5 2 2 2 3 1 5 4 5 1 2 5 1 2 2 5 3 3 3 2 3 3 3 3 2 4 4 2 1 2 2 1 1 3 5 4 4 1 1 4 3 4 4 5 3 3 3 3 4 3 2 5 4 5 2 2 4 3 2 2 4 2 3 5 1 1 2 4 5 3 5 5 2 3 4 2 4 1 5 2 1 2 5 3 1 2 3 4 2 3 1 ...

output:

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

result:

ok good job (1 test case)

Test #63:

score: 0
Accepted
time: 41ms
memory: 18024kb

input:

1
71881 300000 3
3 2 1 3 1 1 1 2 1 2 3 1 3 1 2 2 3 1 1 3 2 1 2 1 2 1 2 2 3 3 3 3 2 1 1 1 1 2 1 1 2 1 3 2 3 1 1 1 3 1 1 3 1 1 1 3 3 3 2 2 3 3 3 1 3 2 3 2 2 3 1 3 3 1 2 3 2 1 1 1 1 3 2 3 2 2 3 3 2 3 2 3 1 3 3 2 1 2 1 1 1 1 3 2 1 1 2 2 1 1 2 3 1 2 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