QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#19590#2425. The Collection Gamehualian50 69ms3828kbC++20572b2022-02-06 11:42:542022-05-06 06:13:18

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-05-06 06:13:18]
  • 评测
  • 测评结果:50
  • 用时:69ms
  • 内存:3828kb
  • [2022-02-06 11:42:54]
  • 提交

answer

#include "swaps.h"
#include <bits/stdc++.h>
#define pi pair<int,int>
#define mk make_pair
#define rep(i,  a) for(register int i=1,i##end=a;i<=i##end;i++)
using namespace std;
void solve(int n, int D) {
	vector<int>ans;ans.resize(n);
	rep(i,n)ans[i-1]=i;
	for (int i=0;i<500;i++) {
		vector<pi>A;
		for(int j=i%2;j+1<ans.size();j+=2) {
			schedule(ans[j],ans[j+1]);
			A.push_back(mk(j,j+1));
		}
		if(!A.empty()){
			auto res=visit();
			for(int j=0;j<A.size();j++)
				if(!res[j])swap(ans[A[j].first],ans[A[j].second]);
		}
	}
	answer(ans);return;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3756kb

input:

4 50
2 0 0
1 1
2 0 0
1 1
2 1 1
1 1
2 0 0
1 0
2 0 1
1 1
2 0 1
1 0
2 0 0
1 1
2 0 0
1 1
2 1 1
1 1
2 0 1
1 0
2 0 1
1 1
2 1 1
1 0
2 0 1
1 0
2 0 1
1 1
2 0 1
1 0
2 1 0
1 1
2 0 0
1 1
2 0 1
1 0
2 0 1
1 1
2 1 0
1 1
2 0 1
1 1
2 0 0
1 0
2 0 1
1 1
2 1 1
1 1
2 1 0
1 1

output:

946149565 1 2
946149565 3 4
547293220
946149565 1 4
547293220
946149565 2 1
946149565 4 3
547293220
946149565 2 3
547293220
946149565 1 2
946149565 3 4
547293220
946149565 2 3
547293220
946149565 1 2
946149565 3 4
547293220
946149565 1 4
547293220
946149565 2 4
946149565 1 3
547293220
946149565 2 1
...

result:

points 0.0 points  0.0 Not correct

Subtask #2:

score: 5
Accepted

Test #2:

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

input:

10 5000
5 0 0 0 0 0
4 0 0 0 0
5 0 0 1 0 0
4 0 0 0 0
5 0 1 0 0 1
4 1 0 0 1
5 1 1 1 0 1
4 1 1 1 0
5 1 1 1 1 0
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 ...

output:

946149565 1 2
946149565 3 4
946149565 5 6
946149565 7 8
946149565 9 10
547293220
946149565 1 4
946149565 3 6
946149565 5 8
946149565 7 10
547293220
946149565 2 4
946149565 1 6
946149565 3 8
946149565 5 10
946149565 7 9
547293220
946149565 2 6
946149565 1 3
946149565 8 10
946149565 5 9
547293220
9461...

result:

points 1.0 points  1.0 Correct

Test #3:

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

input:

100 5000
50 0 1 0 1 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 1 1 1 0
49 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0
50 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 ...

output:

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

result:

points 1.0 points  1.0 Correct

Test #4:

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

input:

250 5000
125 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0
124 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #5:

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

input:

500 5000
250 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #6:

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

input:

500 5000
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:

points 1.0 points  1.0 Correct

Test #7:

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

input:

500 5000
250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #8:

score: 0
Accepted
time: 64ms
memory: 3816kb

input:

500 5000
250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #9:

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

input:

500 5000
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:

points 1.0 points  1.0 Correct

Subtask #3:

score: 10
Accepted

Test #10:

score: 10
Accepted
time: 58ms
memory: 3824kb

input:

500 1000
250 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #11:

score: 0
Accepted
time: 37ms
memory: 3720kb

input:

500 1000
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:

points 1.0 points  1.0 Correct

Test #12:

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

input:

500 1000
250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #13:

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

input:

500 1000
250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #14:

score: 0
Accepted
time: 66ms
memory: 3692kb

input:

500 1000
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:

points 1.0 points  1.0 Correct

Subtask #4:

score: 3
Accepted

Test #15:

score: 3
Accepted
time: 5ms
memory: 3740kb

input:

10 5000
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 1 1 1
4 1 1 1 1
5 1 1 ...

output:

946149565 1 2
946149565 3 4
946149565 5 6
946149565 7 8
946149565 9 10
547293220
946149565 2 3
946149565 4 5
946149565 6 7
946149565 8 9
547293220
946149565 1 2
946149565 3 4
946149565 5 6
946149565 7 8
946149565 9 10
547293220
946149565 2 3
946149565 4 5
946149565 6 7
946149565 8 9
547293220
946149...

result:

points 1.0 points  1.0 Correct

Test #16:

score: 0
Accepted
time: 10ms
memory: 3684kb

input:

100 5000
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
49 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
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 ...

output:

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

result:

points 1.0 points  1.0 Correct

Subtask #5:

score: 2
Accepted

Dependency #4:

100%
Accepted

Test #17:

score: 2
Accepted
time: 24ms
memory: 3712kb

input:

10 5000
5 1 0 1 0 0
4 0 1 1 0
5 1 0 0 1 1
4 1 0 0 1
5 1 0 0 1 0
4 0 0 0 1
5 0 1 0 1 1
4 1 0 1 0
5 0 0 1 0 1
4 0 1 0 0
5 0 0 1 0 0
4 0 1 0 1
5 0 1 0 0 0
4 0 0 1 0
5 0 1 0 1 1
4 1 0 1 0
5 0 0 1 0 0
4 1 1 0 1
5 1 0 1 1 0
4 1 0 0 1
5 1 1 1 0 0
4 0 1 1 0
5 0 1 0 1 0
4 0 0 1 1
5 1 1 1 0 1
4 1 1 0 1
5 1 0 ...

output:

946149565 1 2
946149565 3 4
946149565 5 6
946149565 7 8
946149565 9 10
547293220
946149565 2 4
946149565 3 5
946149565 6 8
946149565 7 10
547293220
946149565 1 4
946149565 2 3
946149565 5 6
946149565 8 10
946149565 7 9
547293220
946149565 4 3
946149565 2 6
946149565 5 8
946149565 10 7
547293220
9461...

result:

points 1.0 points  1.0 Correct

Test #18:

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

input:

100 5000
50 0 0 0 0 1 1 1 0 0 1 1 0 1 0 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1
49 0 1 0 1 1 1 1 1 1 0 1 1 0 0 1 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 0 1
50 0 1 0 1 0 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 1 1 1 ...

output:

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

result:

points 1.0 points  1.0 Correct

Subtask #6:

score: 9
Accepted

Dependency #4:

100%
Accepted

Test #19:

score: 9
Accepted
time: 32ms
memory: 3716kb

input:

250 5000
125 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
124 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

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

result:

points 1.0 points  1.0 Correct

Test #20:

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

input:

500 5000
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:

points 1.0 points  1.0 Correct

Subtask #7:

score: 6
Accepted

Dependency #2:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Test #21:

score: 6
Accepted
time: 31ms
memory: 3748kb

input:

250 5000
125 0 0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 1 1 1 1 1 0 0 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 0 1 1 0 1 1 0 1 0 1
124 0 1 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0...

output:

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

result:

points 1.0 points  1.0 Correct

Test #22:

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

input:

500 5000
250 0 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 1 0 0 1 1 0 1 0 1 1 0 0 1...

output:

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

result:

points 1.0 points  1.0 Correct

Subtask #8:

score: 9
Accepted

Dependency #4:

100%
Accepted

Dependency #6:

100%
Accepted

Test #23:

score: 9
Accepted
time: 39ms
memory: 3748kb

input:

500 500
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:

points 1.0 points  1.0 Correct

Subtask #9:

score: 6
Accepted

Dependency #3:

100%
Accepted

Dependency #7:

100%
Accepted

Dependency #8:

100%
Accepted

Test #24:

score: 6
Accepted
time: 52ms
memory: 3748kb

input:

500 500
250 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 0 1 0 0 1 0 1 1 0 1 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 ...

output:

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

result:

points 1.0 points  1.0 Correct

Subtask #10:

score: 0
Runtime Error

Dependency #8:

100%
Accepted

Test #25:

score: 0
Runtime Error

input:

500 100
250 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

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

result:


Subtask #11:

score: 0
Skipped

Dependency #9:

100%
Accepted

Dependency #10:

0%

Subtask #12:

score: 0
Skipped

Dependency #10:

0%

Subtask #13:

score: 0
Skipped

Dependency #1:

0%