QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#541472#8934. Challenge NPCucup-team4504#AC ✓17ms3708kbC++14775b2024-08-31 19:34:572024-08-31 19:35:00

Judging History

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

  • [2024-08-31 19:35:00]
  • 评测
  • 测评结果:AC
  • 用时:17ms
  • 内存:3708kb
  • [2024-08-31 19:34:57]
  • 提交

answer

#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int n, k;
int main(){
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//	freopen("in.txt", "r", stdin);
//	freopen("out2.txt", "w", stdout);
	cin >> k;
	n = k + 2;
	cout << n * 2 << ' ' << n * (n - 1) << ' ' << 2 << endl;
	for (int i = 1; i <= n; i++)
		if (i & 1) cout << 1 << ' ' << 2 << ' ';
		else cout << 2 << ' ' << 1 << ' ';
	cout << endl;
	for (int i = 2; i <= n; i++){
		for (int j = 1; j < i; j++)
			if ((i - j) & 1) cout << i * 2 - 1 << ' ' << j * 2 - 1 << endl;
			else cout << i * 2 - 1 << ' ' << j * 2 << endl;
		for (int j = 1; j < i; j++)
			if ((i - j) & 1) cout << i * 2 << ' ' << j * 2 << endl;
			else cout << i * 2 << ' ' << j * 2 - 1 << endl;
	}
    return 0;
}

这程序好像有点Bug,我给组数据试试?

详细

Test #1:

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

input:

1

output:

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

result:

ok ok

Test #2:

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

input:

2

output:

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

result:

ok ok

Test #3:

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

input:

3

output:

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

result:

ok ok

Test #4:

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

input:

4

output:

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

result:

ok ok

Test #5:

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

input:

5

output:

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

result:

ok ok

Test #6:

score: 0
Accepted
time: 13ms
memory: 3552kb

input:

433

output:

870 188790 2
1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1...

result:

ok ok

Test #7:

score: 0
Accepted
time: 13ms
memory: 3552kb

input:

500

output:

1004 251502 2
1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 ...

result:

ok ok

Test #8:

score: 0
Accepted
time: 17ms
memory: 3708kb

input:

499

output:

1002 250500 2
1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 ...

result:

ok ok

Test #9:

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

input:

457

output:

918 210222 2
1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1...

result:

ok ok

Test #10:

score: 0
Accepted
time: 17ms
memory: 3704kb

input:

497

output:

998 248502 2
1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1...

result:

ok ok

Extra Test:

score: 0
Extra Test Passed