QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#509098#8041. Life is Hard and Undecidable, but...333zhanAC ✓0ms3944kbC++20669b2024-08-08 10:08:552024-08-08 10:08:57

Judging History

This is the latest submission verdict.

  • [2024-08-08 10:08:57]
  • Judged
  • Verdict: AC
  • Time: 0ms
  • Memory: 3944kb
  • [2024-08-08 10:08:55]
  • Submitted

answer

#include <bits/stdc++.h>
#define int long long

using namespace std;

inline int read () {
    int w = 1, s = 0; char ch = getchar ();
    for (; ! isdigit (ch); ch = getchar ()) if (ch == '-') w = -1;
    for (; isdigit (ch); ch = getchar ()) s = (s << 1) + (s << 3) + (ch ^ 48);
    return s * w;
}

void solve () {
	int n = read ();

    printf ("%lld\n", 2 * n - 1);
    for (int i = 1; i <= 2 * n - 1; i ++) {
        printf ("%lld %lld\n", i, i);
    }
} 

signed main () {
	// ios::sync_with_stdio (false);
    // cin.tie (nullptr);
    
	int T = 1; 
	// cin >> T;
	// T = read ();

	while (T --) {
		solve ();
	}
	
	return 0;
}

详细

Test #1:

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

input:

1

output:

1
1 1

result:

ok n=1

Test #2:

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

input:

2

output:

3
1 1
2 2
3 3

result:

ok n=3

Test #3:

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

input:

3

output:

5
1 1
2 2
3 3
4 4
5 5

result:

ok n=5

Test #4:

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

input:

4

output:

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

result:

ok n=7

Test #5:

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

input:

5

output:

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

result:

ok n=9

Test #6:

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

input:

6

output:

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

result:

ok n=11

Test #7:

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

input:

7

output:

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

result:

ok n=13

Test #8:

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

input:

8

output:

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

result:

ok n=15

Test #9:

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

input:

9

output:

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

result:

ok n=17

Test #10:

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

input:

10

output:

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

result:

ok n=19

Test #11:

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

input:

13

output:

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

result:

ok n=25

Test #12:

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

input:

17

output:

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

result:

ok n=33

Test #13:

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

input:

23

output:

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

result:

ok n=45

Test #14:

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

input:

29

output:

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

result:

ok n=57

Test #15:

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

input:

31

output:

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

result:

ok n=61

Test #16:

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

input:

37

output:

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

result:

ok n=73

Test #17:

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

input:

41

output:

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

result:

ok n=81

Test #18:

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

input:

43

output:

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

result:

ok n=85

Test #19:

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

input:

100

output:

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

result:

ok n=199

Test #20:

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

input:

85

output:

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

result:

ok n=169

Test #21:

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

input:

97

output:

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

result:

ok n=193

Test #22:

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

input:

98

output:

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

result:

ok n=195

Test #23:

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

input:

99

output:

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

result:

ok n=197

Extra Test:

score: 0
Extra Test Passed