QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#325780#4902. 聚会DaiRuiChen00745.454545 160ms7844kbC++17557b2024-02-11 22:41:002024-02-11 22:41:01

Judging History

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

  • [2024-02-11 22:41:01]
  • 评测
  • 测评结果:45.454545
  • 用时:160ms
  • 内存:7844kb
  • [2024-02-11 22:41:00]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int a[1005][1005],id[1005][3];
signed main() {
	int n;
	scanf("%d",&n);
	if(n%6==3) {
		int m=n/3;
		for(int i=0,t=0;i<m;++i) {
			for(int j:{0,1,2}) id[i][j]=++t;
			printf("%d %d %d\n",id[i][0],id[i][1],id[i][2]);
		}
		for(int i=0;i<m;++i) {
			for(int x=i,y=i,j=0;j<m;++j) {
				a[x][y]=i,x=(x+1)%m,y=(y+m-1)%m;
			}
		}
		for(int i=0;i<m;++i) for(int j=i+1;j<m;++j) {
			for(int k:{0,1,2}) printf("%d %d %d\n",id[i][k],id[j][k],id[a[i][j]][(k+1)%3]);
		}
	} else {
		
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1

output:


result:

ok accepted

Test #2:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #3:

score: -9.09091
Wrong Answer
time: 0ms
memory: 3704kb

input:

7

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #2:

score: 9.09091
Accepted

Test #12:

score: 9.09091
Accepted
time: 0ms
memory: 3852kb

input:

3

output:

1 2 3

result:

ok accepted

Test #13:

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

input:

9

output:

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

result:

ok accepted

Test #14:

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

input:

27

output:

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

result:

ok accepted

Test #15:

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

input:

81

output:

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

result:

ok accepted

Test #16:

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

input:

243

output:

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

result:

ok accepted

Test #17:

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

input:

729

output:

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

result:

ok accepted

Test #18:

score: 0
Accepted
time: 79ms
memory: 6640kb

input:

2187

output:

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

result:

ok accepted

Subtask #3:

score: 0
Wrong Answer

Test #19:

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

input:

1

output:


result:

ok accepted

Test #20:

score: -9.09091
Wrong Answer
time: 0ms
memory: 3648kb

input:

25

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #4:

score: 0
Wrong Answer

Test #24:

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

input:

7

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #5:

score: 0
Wrong Answer

Test #29:

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

input:

13

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #6:

score: 0
Wrong Answer

Test #34:

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

input:

19

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #7:

score: 9.09091
Accepted

Test #39:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #40:

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

input:

27

output:

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

result:

ok accepted

Test #41:

score: 0
Accepted
time: 160ms
memory: 7820kb

input:

2979

output:

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

result:

ok accepted

Test #42:

score: 0
Accepted
time: 146ms
memory: 7732kb

input:

2955

output:

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

result:

ok accepted

Test #43:

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

input:

1419

output:

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

result:

ok accepted

Subtask #8:

score: 9.09091
Accepted

Test #44:

score: 9.09091
Accepted
time: 0ms
memory: 3748kb

input:

21

output:

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

result:

ok accepted

Test #45:

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

input:

45

output:

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

result:

ok accepted

Test #46:

score: 0
Accepted
time: 151ms
memory: 7844kb

input:

2997

output:

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

result:

ok accepted

Test #47:

score: 0
Accepted
time: 157ms
memory: 7708kb

input:

2973

output:

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

result:

ok accepted

Test #48:

score: 0
Accepted
time: 55ms
memory: 6868kb

input:

1869

output:

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

result:

ok accepted

Subtask #9:

score: 9.09091
Accepted

Test #49:

score: 9.09091
Accepted
time: 0ms
memory: 3920kb

input:

9

output:

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

result:

ok accepted

Test #50:

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

input:

33

output:

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

result:

ok accepted

Test #51:

score: 0
Accepted
time: 137ms
memory: 7768kb

input:

2985

output:

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

result:

ok accepted

Test #52:

score: 0
Accepted
time: 139ms
memory: 7736kb

input:

2961

output:

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

result:

ok accepted

Test #53:

score: 0
Accepted
time: 63ms
memory: 6384kb

input:

2025

output:

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

result:

ok accepted

Subtask #10:

score: 9.09091
Accepted

Test #54:

score: 9.09091
Accepted
time: 0ms
memory: 3932kb

input:

15

output:

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

result:

ok accepted

Test #55:

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

input:

39

output:

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

result:

ok accepted

Test #56:

score: 0
Accepted
time: 150ms
memory: 7696kb

input:

2991

output:

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

result:

ok accepted

Test #57:

score: 0
Accepted
time: 156ms
memory: 7752kb

input:

2967

output:

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

result:

ok accepted

Test #58:

score: 0
Accepted
time: 53ms
memory: 7500kb

input:

1719

output:

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

result:

ok accepted

Subtask #11:

score: 0
Skipped

Dependency #1:

0%