QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#542556#8934. Challenge NPCucup-team3695#AC ✓17ms4484kbC++20557b2024-09-01 02:36:122024-09-01 02:36:13

Judging History

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

  • [2024-09-01 02:36:13]
  • 评测
  • 测评结果:AC
  • 用时:17ms
  • 内存:4484kb
  • [2024-09-01 02:36:12]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

int main()
{
	cin.tie(0)->sync_with_stdio(0);

	int k;
	cin >> k;
	k += 2;

	int n = 2 * k;
	int m = 0;
	vector<vector<int>> G(n);
	for (int i = 0; i < k; i++)
		for (int j = 0; j < i; j++)
		{
			G[i * 2].push_back(j * 2 + 1);
			G[i * 2 + 1].push_back(j * 2);
			m += 2;
		}

	cout << n << ' ' << m << ' ' << 2 << '\n';
	for (int i = 0; i < k; i++)
		cout << "1 2 ";
	cout << '\n';
	for (int i = 0; i < n; i++)
		for (int j : G[i])
			cout << j + 1 << ' ' << i + 1 << '\n';
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

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

result:

ok ok

Test #2:

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

input:

2

output:

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

result:

ok ok

Test #3:

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

input:

3

output:

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

result:

ok ok

Test #4:

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

input:

4

output:

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

result:

ok ok

Test #5:

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

input:

5

output:

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

result:

ok ok

Test #6:

score: 0
Accepted
time: 6ms
memory: 4084kb

input:

433

output:

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

result:

ok ok

Test #7:

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

input:

500

output:

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

result:

ok ok

Test #8:

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

input:

499

output:

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

result:

ok ok

Test #9:

score: 0
Accepted
time: 11ms
memory: 4484kb

input:

457

output:

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

result:

ok ok

Test #10:

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

input:

497

output:

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

result:

ok ok

Extra Test:

score: 0
Extra Test Passed