QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#325784#4902. 聚会DaiRuiChen007100 ✓166ms7840kbC++171.1kb2024-02-11 22:48:412024-02-11 22:48:41

Judging History

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

  • [2024-02-11 22:48:41]
  • 评测
  • 测评结果:100
  • 用时:166ms
  • 内存:7840kb
  • [2024-02-11 22:48:41]
  • 提交

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 {
		int m=(n-1)/3;
		for(int i=0,t=0;i<m;++i) for(int j:{0,1,2}) id[i][j]=++t;
		for(int i=0;i<m/2;++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 x=i+1,y=i,j=0;j<m;++j) {
				a[x][y]=i+m/2,x=(x+1)%m,y=(y+m-1)%m;
			}
		}
		for(int i=0;i<m/2;++i) printf("%d %d %d\n",id[i][0],id[i][1],id[i][2]);
		for(int i=0;i<m/2;++i) for(int k:{0,1,2}) {
			printf("%d %d %d\n",n,id[i+m/2][k],id[i][(k+1)%3]);
		}
		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]);
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 9.09091
Accepted

Test #1:

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

input:

1

output:


result:

ok accepted

Test #2:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #3:

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

input:

7

output:

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

result:

ok accepted

Test #4:

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

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 #5:

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

input:

31

output:

1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
31 16 2
31 17 3
31 18 1
31 19 5
31 20 6
31 21 4
31 22 8
31 23 9
31 24 7
31 25 11
31 26 12
31 27 10
31 28 14
31 29 15
31 30 13
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 2...

result:

ok accepted

Test #6:

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

input:

63

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
1 4 35
2 5 36
3 6 34
1 7 5
2 8 6
3 9 4
1 10 38
2 11 39
3 12 37
1 13 8
2 14 9
3 15 7
1 16 41
2 17 42
3 18 40
1 19 11
2 20...

result:

ok accepted

Test #7:

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

input:

127

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
127 64 2
127 65 3
127 66 1
127 67 5
127 68 6
127 69 4
127 70 8
127 71 9
127 72 7
127 73 11
127 74 12
127 75 10
127 76 14...

result:

ok accepted

Test #8:

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

input:

255

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 #9:

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

input:

511

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 #10:

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

input:

1023

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 #11:

score: 0
Accepted
time: 68ms
memory: 7712kb

input:

2047

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 #2:

score: 9.09091
Accepted

Test #12:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #13:

score: 0
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 #14:

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

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: 1ms
memory: 4016kb

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: 4232kb

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: 4808kb

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: 6832kb

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: 9.09091
Accepted

Test #19:

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

input:

1

output:


result:

ok accepted

Test #20:

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

input:

25

output:

1 2 3
4 5 6
7 8 9
10 11 12
25 13 2
25 14 3
25 15 1
25 16 5
25 17 6
25 18 4
25 19 8
25 20 9
25 21 7
25 22 11
25 23 12
25 24 10
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
1 22 23
2 23 24
3 24 22
4 7 17
5 8 18
6 9 ...

result:

ok accepted

Test #21:

score: 0
Accepted
time: 166ms
memory: 7824kb

input:

2977

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 #22:

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

input:

2953

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 #23:

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

input:

1777

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 #4:

score: 9.09091
Accepted

Test #24:

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

input:

7

output:

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

result:

ok accepted

Test #25:

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

input:

31

output:

1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
31 16 2
31 17 3
31 18 1
31 19 5
31 20 6
31 21 4
31 22 8
31 23 9
31 24 7
31 25 11
31 26 12
31 27 10
31 28 14
31 29 15
31 30 13
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 2...

result:

ok accepted

Test #26:

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

input:

2983

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 #27:

score: 0
Accepted
time: 144ms
memory: 7652kb

input:

2959

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 #28:

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

input:

871

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 #5:

score: 9.09091
Accepted

Test #29:

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

input:

13

output:

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

result:

ok accepted

Test #30:

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

input:

37

output:

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

result:

ok accepted

Test #31:

score: 0
Accepted
time: 149ms
memory: 7816kb

input:

2989

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 #32:

score: 0
Accepted
time: 123ms
memory: 7808kb

input:

2965

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 #33:

score: 0
Accepted
time: 48ms
memory: 6040kb

input:

1669

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 #6:

score: 9.09091
Accepted

Test #34:

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

input:

19

output:

1 2 3
4 5 6
7 8 9
19 10 2
19 11 3
19 12 1
19 13 5
19 14 6
19 15 4
19 16 8
19 17 9
19 18 7
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
1 16 17
2 17 18
3 18 16
4 7 14
5 8 15
6 9 13
4 10 8
5 11 9
6 12 7
4 13 17
5 14 18
6 15 16
4 16 2
5 17 3
6 18 1
7 10 17
8 11 18...

result:

ok accepted

Test #35:

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

input:

43

output:

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

result:

ok accepted

Test #36:

score: 0
Accepted
time: 147ms
memory: 7840kb

input:

2995

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 #37:

score: 0
Accepted
time: 140ms
memory: 7728kb

input:

2971

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 #38:

score: 0
Accepted
time: 26ms
memory: 7332kb

input:

1171

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 #7:

score: 9.09091
Accepted

Test #39:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #40:

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

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: 142ms
memory: 7676kb

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: 147ms
memory: 7776kb

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: 26ms
memory: 5692kb

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: 3860kb

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: 3972kb

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: 159ms
memory: 7816kb

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: 7796kb

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: 6604kb

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: 3924kb

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: 3964kb

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: 150ms
memory: 7748kb

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: 143ms
memory: 7840kb

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: 62ms
memory: 6856kb

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: 3876kb

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: 4000kb

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: 151ms
memory: 7700kb

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: 7804kb

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: 50ms
memory: 7324kb

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: 9.09091
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Dependency #7:

100%
Accepted

Dependency #8:

100%
Accepted

Dependency #9:

100%
Accepted

Dependency #10:

100%
Accepted

Test #59:

score: 9.09091
Accepted
time: 46ms
memory: 6152kb

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