Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
集合划分问题
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KB
Total submit users: 53, Accepted users: 47
Problem 10251 : No special judgement
Problem description
  
n个元素的集合{1,2,, n }可以划分为若干个非空子集。例如,当n=4 时,集合{1,2,
3,4}可以划分为15 个不同的非空子集如下:
{{1},{2},{3},{4}},
{{1,2},{3},{4}},
{{1,3},{2},{4}},
{{1,4},{2},{3}},
{{2,3},{1},{4}},
{{2,4},{1},{3}},
{{3,4},{1},{2}},
{{1,2},{3,4}},
{{1,3},{2,4}},
{{1,4},{2,3}},
{{1,2,3},{4}},
{{1,2,4},{3}},
{{1,3,4},{2}},
{{2,3,4},{1}},
{{1,2,3,4}}

给定正整数n,计算出n 个元素的集合{1,2,, n }可以划分为多少个不同的非空子集。


Input
  输入数据1 行,是元素个数n。

Output
  将计算出的不同的非空子集数输出.

Sample Input
5
Sample Output
52
Judge Tips
  这一题的结果数很大,需要使用64位长整型:__int64。 64位长整型变量的定义:__int64 x,y; 64位长整型变量的输入:scanf("%I64d%I64d",&x,&y); 64位长整型变量的输出:printf("%I64d\n",x);

Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:7783 today,12996920 total, since 2010-05-07