Description

New convocation of The Fool Land's Parliament consists of N delegates. According to the present regulation delegates should be divided into disjoint groups of different sizes and every day each group has to send one delegate to the conciliatory committee. The composition of the conciliatory committee should be different each day. The Parliament works only while this can be accomplished. 
You are to write a program that will determine how many delegates should contain each group in order for Parliament to work as long as possible. 

Input

The input file contains a single integer N (5<=N<=1000 ).

Output

Write to the output file the sizes of groups that allow the Parliament to work for the maximal possible time. These sizes should be printed on a single line in ascending order and should be separated by spaces.

Sample Input

7

Sample Output

3 4

POJ 1032问题描述的更多相关文章

  1. poj 1032 Parliament 【思维题】

    题目地址:http://poj.org/problem?id=1032 Parliament Time Limit: 1000MS   Memory Limit: 10000K Total Submi ...

  2. POJ 1528问题描述

    Description From the article Number Theory in the 1994 Microsoft Encarta: ``If a, b, c are integers ...

  3. POJ 1041问题描述

    Description Little Johnny has got a new car. He decided to drive around the town to visit his friend ...

  4. POJ 1039问题描述

    Description The GX Light Pipeline Company started to prepare bent pipes for the new transgalactic li ...

  5. POJ 1035题目描述

    Description You, as a member of a development team for a new spell checking program, are to write a ...

  6. POJ 1028题目描述

    Description Standard web browsers contain features to move backward and forward among the pages rece ...

  7. Poj 1032 分类: Translation Mode 2014-04-04 09:09 111人阅读 评论(0) 收藏

    Parliament Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16521   Accepted: 6975 Descr ...

  8. (Relax 水题1.2)POJ 1032 Parliament(将n分解成若干个互不相等的整数的和,并且是这些整数的乘积最大)

    题意:给出一个数n,将其拆分为若干个互不相等的数字的和,要求这些数字的乘积最大. 分析:我们可以发现任何一个数字,只要能拆分成两个大于1的数字之和,那么这两个数字的乘积一定大于等于原数.也就是说,对于 ...

  9. 【贪心】 poj 1032 和为n的若干数最大乘积

    给出n,把n分解为若干不相同数之和,使之乘积最大.贪心,Discuss里面的思路:把n分解为从2开始的连续整数,如果有多,则从高位开始依次加1.如26,我们得到2+3+4+5+6,此时还剩余6(26- ...

随机推荐

  1. 关于ztree异步加载的问题(二)

    本来以为这个异步加载会很难控制,因为考虑到ztree节点图标的控制,结果并不是那么困难,ztree自己控制图标,你只要在json中设置isParent:true,它自己会识别父节点并控制图标,以下是核 ...

  2. for循环下九九乘法表

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. openstack创建虚拟机的步骤

    图片来自互联网. 虚拟机启动过程如下: 1.界面或命令行通过RESTful API向keystone获取认证信息.2.keystone通过用户请求认证信息,并生成auth-token返回给对应的认证请 ...

  4. NOJ 1643 阶乘除法(YY+小技巧)

    [1643] 阶乘除法 时间限制: 5000 ms 内存限制: 65535 K 问题描述 输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 1*2*3*...*n (n>=1) ...

  5. jiffies

    linux中的jiffies变量 全局变量jiffies用来记录自系统启动以来产生的节拍的总数.启动时,内核将该变量初始化为0,此后,每次时钟中断处理程序都会增加该变量的值.一秒内时钟中断的次数等于H ...

  6. hdu1874 最短路模板题

    之所以做了第二道模板题还要写是因为发现了一些自己的问题 用的是dij 最简单的松弛 需要注意的地方是松弛的时候 判断dis[i]<dis[w]+tance[w][i]时 还要再判断 vis[i] ...

  7. DS实验题 最大最小

    题目: 算法设计: 计算最小值算法: 设置一个flag,flag为1的时候代表遇到*号: 遇到数字时: flag为0进栈: flag为1的时候,从栈顶提出一个元素和当前元素运算,结果进栈 最后对栈进行 ...

  8. 常用Ubuntu 命令

    sudo apt-get updatesudo apt-get upgrade以下2選1sudo apt-get install ubuntu-desktop如果你只想安装必要的桌面管理软件而不想安装 ...

  9. ios_常用关键字

    一.关键字说明 1. @synthesize关键字:  根据@property设置,自动生成成员变量相应的存取方法,从而可以使用点操作符来方便的存取该成员变量 . 2. @implementation ...

  10. jsp页面揣出现Invalid action class configuration that references an unknown class解决方案

    jsp页面中,增加和修改用了同一个页面,能正常增加,却不能修改,后来发现页面中有一个hidden的id, 这个input的name写成name="designType.id"时就会 ...