SYSU暑假热身赛A

A - Relations
Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u

Description

Background

Consider a specific set of comparable objects. Between two objects  a and  b, there exits one of the following three classified relations:
a =  b
a
 <  b
b
 <  a
Because relation '=' is symmetric, it is not repeated above.
So, with 3 objects ( abc), there can exist 13 classified relations:
a = b = c       a = b < c       c < a = b       a < b = c
b = c < a       a = c < b       b < a = c       a < b < c
a < c < b       b < a < c       b < c < a       c < a < b
c < b < a

Problem

Given  N, determine the number of different classified relations between  N objects.

Input

Includes many integers  N (in the range from 2 to 10), each number on one line. Ends with −1.

Output

For each  N of input, print the number of classified relations found, each number on one line.

Sample Input

input output
2
3
-1
3
13

解题思路:dp[i][j]表示i个元素组成j个内部全等的集合,再插入一个元素时,dp[i+1][j]+=dp[i][j]*j就是这个元素插入到某个集合中,
<strong>dp[i+1][j+1]+=dp[i][j]*(j+1)插入到集合之间</strong>
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int dp[15][15],ans[11];
void DP()
{
	memset(dp,0,sizeof(dp));
	memset(ans,0,sizeof(ans));
	dp[1][1]=1;
	for(int i=1;i<=10;i++)
		for(int j=1;j<=i;j++)
		{
			dp[i+1][j]+=dp[i][j]*j;
			dp[i+1][j+1]+=dp[i][j]*(j+1);
		}
	for(int i=1;i<=10;i++)
		for(int j=1;j<=i;j++)
			ans[i]+=dp[i][j];
}
int main()
{
	int n;
	DP();
	while(scanf("%d",&n),n!=-1)
	{
		printf("%d\n",ans[n]);
	}
	return 0;
}


sysu-mm01数据集是中山大学视觉与人机智能实验室发布的一个用于多目标跟踪的数据集。该数据集包含了多个摄像头下的行人、车辆等多种目标的视频序列。 想要下载sysu-mm01数据集,首先需要访问中山大学视觉与人机智能实验室的官方网站。在网站上,我们可以找到sysu-mm01数据集的介绍和下载链接。 点击数据集的下载链接后,我们将进入到数据集的下载页面。在下载页面上,我们会看到各种版本的sysu-mm01数据集。根据我们的需求,我们可以选择相应的版本进行下载。 在选择版本后,我们需要提供一些必要的信息,例如我们的名称、邮箱等。这些信息的目的是为了方便数据集的使用者进行统计和联系。 填写完信息后,我们可以点击下载按钮开始下载sysu-mm01数据集。数据集的下载速度将取决于我们的网络状态和数据集的大小。 下载完成后,我们可以将sysu-mm01数据集解压缩到本地文件夹中。解压缩后,我们将可以看到数据集包含的视频序列文件夹。 通过这些视频序列,我们可以进行多目标跟踪算法的研究和评估。sysu-mm01数据集的丰富内容和真实场景将为我们的研究提供宝贵的参考和数据支持。 总之,要下载sysu-mm01数据集,我们需要访问中山大学视觉与人机智能实验室的官方网站,选择合适的版本并填写必要的信息,然后进行下载和解压缩即可。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值