QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#133395#3269. 末日魔法少女计划zhouhuanyi0 13ms5924kbC++23788b2023-08-02 07:41:032023-08-02 07:41:03

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-02 07:41:03]
  • 评测
  • 测评结果:0
  • 用时:13ms
  • 内存:5924kb
  • [2023-08-02 07:41:03]
  • 提交

answer

#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#define N 1000000
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
struct reads
{
	int x,y;
};
reads tong[N+1];
int n,k,length,st[N+1],leng;
void adder(int x,int y)
{
	tong[++length]=(reads){x,y};
	return;
}
int main()
{
	int ps=0,rst;
	n=read(),k=read();
	while (1)
	{
		rst=1;
		for (int i=1;i<=k;++i) rst=min(rst*ps,n-1);
		if (rst>=n-1) break;
		ps++;
	}
	for (int i=1;i<=n-1;i*=ps)
		for (int j=1;j<=ps-1;++j)
			for (int k=1;k+i*j<=n;++k)
				if (i*j!=1)
					adder(k,k+i*j);
	for (int i=1;i<=length;++i) printf("%d %d\n",tong[i].x,tong[i].y);
	return 0;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 13ms
memory: 5860kb

input:

2000 2

output:

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

result:

wrong answer Integer 2 violates the range [5, 2000]

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 5688kb

input:

1936 3

output:

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

result:

wrong answer Integer 2 violates the range [5, 1936]

Subtask #3:

score: 0
Wrong Answer

Test #11:

score: 0
Wrong Answer
time: 5ms
memory: 5716kb

input:

2000 4

output:

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

result:

wrong answer Integer 2 violates the range [5, 2000]

Subtask #4:

score: 0
Wrong Answer

Test #16:

score: 0
Wrong Answer
time: 3ms
memory: 5684kb

input:

2000 5

output:

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

result:

wrong answer Integer 2 violates the range [5, 2000]

Subtask #5:

score: 0
Wrong Answer

Test #21:

score: 0
Wrong Answer
time: 4ms
memory: 5856kb

input:

2000 6

output:

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

result:

wrong answer Integer 2 violates the range [5, 2000]

Subtask #6:

score: 0
Wrong Answer

Test #26:

score: 0
Wrong Answer
time: 3ms
memory: 5644kb

input:

1999 7

output:

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

result:

wrong answer Integer 2 violates the range [5, 1999]

Subtask #7:

score: 0
Wrong Answer

Test #31:

score: 0
Wrong Answer
time: 3ms
memory: 5688kb

input:

1995 8

output:

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

result:

wrong answer Integer 2 violates the range [5, 1995]

Subtask #8:

score: 0
Wrong Answer

Test #36:

score: 0
Wrong Answer
time: 3ms
memory: 5644kb

input:

1997 9

output:

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

result:

wrong answer Integer 2 violates the range [5, 1997]

Subtask #9:

score: 0
Wrong Answer

Test #41:

score: 0
Wrong Answer
time: 3ms
memory: 5844kb

input:

1995 10

output:

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

result:

wrong answer Integer 2 violates the range [5, 1995]

Subtask #10:

score: 0
Wrong Answer

Test #46:

score: 0
Wrong Answer
time: 3ms
memory: 5688kb

input:

1993 11

output:

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

result:

wrong answer Integer 2 violates the range [5, 1993]

Subtask #11:

score: 0
Wrong Answer

Test #51:

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

input:

1999 12

output:

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

result:

wrong answer Integer 2 violates the range [5, 1999]

Subtask #12:

score: 0
Wrong Answer

Test #56:

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

input:

1981 13

output:

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

result:

wrong answer Integer 2 violates the range [5, 1981]

Subtask #13:

score: 0
Wrong Answer

Test #61:

score: 0
Wrong Answer
time: 3ms
memory: 5924kb

input:

1979 14

output:

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

result:

wrong answer Integer 2 violates the range [5, 1979]

Subtask #14:

score: 0
Wrong Answer

Test #66:

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

input:

2000 15

output:

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

result:

wrong answer Integer 2 violates the range [5, 2000]