QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#639203#8041. Life is Hard and Undecidable, but...SatonAC ✓0ms3872kbC++201.2kb2024-10-13 18:16:512024-10-13 18:16:52

Judging History

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

  • [2024-10-13 18:16:52]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3872kb
  • [2024-10-13 18:16:51]
  • 提交

answer

///by Saton.
#include<bits/stdc++.h>
#define PI acos(-1)
#define fi first
#define se second 
#define sz(a) ((int)a.size())
#define all(a) a.begin(), a.end()
#define LL long long
#define ll __int128
#define DD double double
#define LD long double
#define rep(i,a,b) for(LL i = (a);i <= (b);i ++)
#define lep(i,a,b) for(LL i = (a);i >= (b);i --)
#define FLUSH fflush(stdout)
using namespace std;
const int N = 1e5 + 10,mod =  1e9+7,P = 131;
const LL inf = 1e9+10,INF = 1e18+10;
typedef pair<int,int> PII;
typedef pair<LL,int> PLI;
typedef pair<LL,LL> PLL;
//__builtin_popcountll()计算整数二进制表示中1的个数
// mt19937_64 rnd(random_device{}());
// uniform_int_distribution<LL> dist(0, LLONG_MAX);//dist(rnd)生成随机数
LL n,m,k;

void solve() {
    cin >> n;
    vector<PII> ans;
    for(int i = 1;i <= 2*n;i += 2) {
        ans.push_back({i,i});
        ans.push_back({i+1,i+1});
    }
    
    cout << sz(ans) << '\n';
    for(auto [u,v] : ans) cout << u << " " << v << '\n';
} 

int main() {
    ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    // int T;
    // cin >> T;
    // while(T --) { 
    //     solve();
    // }
    solve();
       
    return 0;
}  
/*   /\_/\
*   (= ._.)
*   / >  \>
*/

详细

Test #1:

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

input:

1

output:

2
1 1
2 2

result:

ok n=2

Test #2:

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

input:

2

output:

4
1 1
2 2
3 3
4 4

result:

ok n=4

Test #3:

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

input:

3

output:

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

result:

ok n=6

Test #4:

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

input:

4

output:

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

result:

ok n=8

Test #5:

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

input:

5

output:

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

result:

ok n=10

Test #6:

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

input:

6

output:

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

result:

ok n=12

Test #7:

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

input:

7

output:

14
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

result:

ok n=14

Test #8:

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

input:

8

output:

16
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

result:

ok n=16

Test #9:

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

input:

9

output:

18
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

result:

ok n=18

Test #10:

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

input:

10

output:

20
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

result:

ok n=20

Test #11:

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

input:

13

output:

26
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

result:

ok n=26

Test #12:

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

input:

17

output:

34
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

result:

ok n=34

Test #13:

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

input:

23

output:

46
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

result:

ok n=46

Test #14:

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

input:

29

output:

58
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=58

Test #15:

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

input:

31

output:

62
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=62

Test #16:

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

input:

37

output:

74
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=74

Test #17:

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

input:

41

output:

82
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=82

Test #18:

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

input:

43

output:

86
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=86

Test #19:

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

input:

100

output:

200
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=200

Test #20:

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

input:

85

output:

170
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=170

Test #21:

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

input:

97

output:

194
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=194

Test #22:

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

input:

98

output:

196
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=196

Test #23:

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

input:

99

output:

198
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=198

Extra Test:

score: 0
Extra Test Passed