QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#84414#5528. Least Annoying Constructive Problem_slbTL 18ms3456kbC++17804b2023-03-06 14:45:412023-03-06 14:45:56

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-06 14:45:56]
  • 评测
  • 测评结果:TL
  • 用时:18ms
  • 内存:3456kb
  • [2023-03-06 14:45:41]
  • 提交

answer

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
using namespace std;

namespace solve
{
    const int maxn = 1000;

    void out(int x, int y)
    {
        cout << min(x, y) + 1 << " " << max(x, y) + 1 << endl;
    }

    void main()
    {
        int n;
        cin >> n;
        int flag = n % 2 == 0;
        if (flag)
            n--;
        for (int i = 0; i < n; i++)
        {
            for (int j = 1; j <= n / 2; j++)
            {
                out((i - j + n) % n, (i + j) % n);
            }
            if (flag)
                out(i, n - 0);
        }
    }
}

int main()
{
    ios::sync_with_stdio(false), cin.tie(0);
    int T = 1;
    // cin >> T;
    while (T--)
        solve::main();
}

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3300kb

input:

3

output:

2 3
1 3
1 2

result:

ok Correct

Test #2:

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

input:

4

output:

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

result:

ok Correct

Test #3:

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

input:

5

output:

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

result:

ok Correct

Test #4:

score: 0
Accepted
time: 2ms
memory: 3340kb

input:

6

output:

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

result:

ok Correct

Test #5:

score: 0
Accepted
time: 2ms
memory: 3324kb

input:

7

output:

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

result:

ok Correct

Test #6:

score: 0
Accepted
time: 2ms
memory: 3444kb

input:

8

output:

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

result:

ok Correct

Test #7:

score: 0
Accepted
time: 2ms
memory: 3452kb

input:

9

output:

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

result:

ok Correct

Test #8:

score: 0
Accepted
time: 2ms
memory: 3324kb

input:

10

output:

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

result:

ok Correct

Test #9:

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

input:

11

output:

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

result:

ok Correct

Test #10:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

12

output:

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

result:

ok Correct

Test #11:

score: 0
Accepted
time: 3ms
memory: 3300kb

input:

13

output:

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

result:

ok Correct

Test #12:

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

input:

14

output:

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

result:

ok Correct

Test #13:

score: 0
Accepted
time: 2ms
memory: 3272kb

input:

15

output:

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

result:

ok Correct

Test #14:

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

input:

16

output:

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

result:

ok Correct

Test #15:

score: 0
Accepted
time: 3ms
memory: 3328kb

input:

17

output:

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

result:

ok Correct

Test #16:

score: 0
Accepted
time: 3ms
memory: 3256kb

input:

18

output:

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

result:

ok Correct

Test #17:

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

input:

19

output:

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

result:

ok Correct

Test #18:

score: 0
Accepted
time: 2ms
memory: 3424kb

input:

20

output:

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

result:

ok Correct

Test #19:

score: 0
Accepted
time: 3ms
memory: 3336kb

input:

21

output:

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

result:

ok Correct

Test #20:

score: 0
Accepted
time: 4ms
memory: 3452kb

input:

22

output:

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

result:

ok Correct

Test #21:

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

input:

23

output:

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

result:

ok Correct

Test #22:

score: 0
Accepted
time: 5ms
memory: 3336kb

input:

24

output:

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

result:

ok Correct

Test #23:

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

input:

25

output:

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

result:

ok Correct

Test #24:

score: 0
Accepted
time: 4ms
memory: 3300kb

input:

26

output:

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

result:

ok Correct

Test #25:

score: 0
Accepted
time: 6ms
memory: 3212kb

input:

27

output:

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

result:

ok Correct

Test #26:

score: 0
Accepted
time: 6ms
memory: 3304kb

input:

28

output:

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

result:

ok Correct

Test #27:

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

input:

29

output:

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

result:

ok Correct

Test #28:

score: 0
Accepted
time: 5ms
memory: 3452kb

input:

30

output:

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

result:

ok Correct

Test #29:

score: 0
Accepted
time: 8ms
memory: 3292kb

input:

90

output:

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

result:

ok Correct

Test #30:

score: 0
Accepted
time: 5ms
memory: 3280kb

input:

91

output:

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

result:

ok Correct

Test #31:

score: 0
Accepted
time: 11ms
memory: 3340kb

input:

92

output:

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

result:

ok Correct

Test #32:

score: 0
Accepted
time: 8ms
memory: 3324kb

input:

93

output:

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

result:

ok Correct

Test #33:

score: 0
Accepted
time: 6ms
memory: 3272kb

input:

94

output:

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

result:

ok Correct

Test #34:

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

input:

95

output:

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

result:

ok Correct

Test #35:

score: 0
Accepted
time: 8ms
memory: 3340kb

input:

96

output:

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

result:

ok Correct

Test #36:

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

input:

97

output:

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

result:

ok Correct

Test #37:

score: 0
Accepted
time: 6ms
memory: 3300kb

input:

98

output:

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

result:

ok Correct

Test #38:

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

input:

99

output:

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

result:

ok Correct

Test #39:

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

input:

100

output:

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

result:

ok Correct

Test #40:

score: -100
Time Limit Exceeded

input:

490

output:

2 489
3 488
4 487
5 486
6 485
7 484
8 483
9 482
10 481
11 480
12 479
13 478
14 477
15 476
16 475
17 474
18 473
19 472
20 471
21 470
22 469
23 468
24 467
25 466
26 465
27 464
28 463
29 462
30 461
31 460
32 459
33 458
34 457
35 456
36 455
37 454
38 453
39 452
40 451
41 450
42 449
43 448
44 447
45 446
...

result: