QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#426472#6320. Parallel Processing (Hard)Kevin5307WA 2ms3908kbC++231.0kb2024-05-31 12:31:002024-05-31 12:31:01

Judging History

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

  • [2024-05-31 12:31:01]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3908kb
  • [2024-05-31 12:31:00]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int id,n;
	cin>>n;
	int s=(int)(ceil(0.4*(n-1)));
	cout<<s<<endl;
	vector<array<int,3>> vec;
	auto print=[&](int a,int b,int c)
	{
		vec.push_back({c,a,b});
	};
	for(int i=1;i<n;i+=10)
	{
		if(n==i+7)
		{
			print(i,i+1,i+1);
			print(i+2,i+3,i+3);
			print(i+4,i+5,i+5);
			print(i+6,i+7,i+7);
			print(i+1,i+2,i+2);
			print(i+1,i+3,i+3);
			print(i+5,i+6,i+6);
			print(i+5,i+7,i+7);
			print(i+3,i+4,i+4);
			print(i+3,i+5,i+5);
			print(i+3,i+6,i+6);
			print(i+3,i+7,i+7);
			break;
		}
		print(i,i+1,i+1);
		print(i+2,i+3,i+3);
		print(i+4,i+5,i+5);
		print(i+7,i+8,i+8);
		print(i+1,i+2,i+2);
		print(i+1,i+3,i+3);
		print(i+5,i+6,i+6);
		print(i+8,i+9,i+9);
		print(i+3,i+4,i+4);
		print(i+3,i+5,i+5);
		print(i+3,i+6,i+6);
		print(i+9,i+10,i+10);
		print(i+6,i+7,i+7);
		print(i+6,i+8,i+8);
		print(i+6,i+9,i+9);
		print(i+6,i+10,i+10);
	}
	for(int i=0;i<s*4;i++)
		cout<<vec[i][0]<<" "<<vec[i][1]<<" "<<vec[i][2]<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3636kb

input:

17

output:

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

result:

ok AC

Test #2:

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

input:

18

output:

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

result:

ok AC

Test #3:

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

input:

19

output:

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

result:

ok AC

Test #4:

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

input:

20

output:

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

result:

ok AC

Test #5:

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

input:

21

output:

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

result:

ok AC

Test #6:

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

input:

120

output:

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

result:

ok AC

Test #7:

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

input:

421

output:

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

result:

ok AC

Test #8:

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

input:

464

output:

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

result:

ok AC

Test #9:

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

input:

812

output:

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

result:

ok AC

Test #10:

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

input:

862

output:

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

result:

ok AC

Test #11:

score: -100
Wrong Answer
time: 0ms
memory: 3608kb

input:

996

output:

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

result:

wrong answer A[995] is not (1, …, 995)