社区讨论

提供几组Hack

AT_abc447_f[ABC447F] Centipede Graph参与者 1已保存回复 0

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
0 条
当前快照
1 份
快照标识符
@mm8oogi0
此快照首次捕获于
2026/03/02 12:33
上周
此快照最后确认于
2026/03/05 09:30
5 天前
查看原帖
给几组比较强的数据:
CPP
input:
1
12
2 1
3 1
5 1
6 3
12 3
4 3
7 5
8 5
9 1
10 6
11 6
output:
4
CPP
input:
1
17
1 2
2 3
2 4
4 5
4 6
4 7
7 8
7 10
8 9
7 11
11 12
11 13
11 14
14 15
14 16
14 17
output:
5
CPP
input:
1
17
1 2
2 3
3 4
3 5
5 6
5 7
5 8
8 9
8 10
3 11
11 12
11 13
11 14
14 15
14 16
14 17
output:
5
CPP
input:
1
16
1 2
2 3
3 4
3 5
5 6
5 7
5 8
8 10
3 11
11 12
11 13
11 14
14 15
14 16
14 9
output:
4
以及对拍生成数据的gen(比较弱:)CPP
#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
	srand(time(0));
	printf("1\n");
	n=rand()%15+1;
	printf("%d\n",n);
	for (int i=2;i<=n;i++) printf("%d %d\n",i,rand()%(i-1)+1);
	printf("\n");
}

回复

0 条回复,欢迎继续交流。

正在加载回复...