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. 使用Objective-C的文档生成工具:appledoc

    使用Objective-C的文档生成工具:appledoc 前言 做项目的人多了,就需要文档了.今天开始尝试写一些项目文档.但是就源代码来说,文档最好和源码在一起,这样更新起来更加方便和顺手.象 Ja ...

  2. hdu Random Sequence

    这道题是道规律极强的题...真佩服在赛场上快速找到规律的人. d[i]              a[i]            res[i] 0                 1.000000 C ...

  3. JS - 超强大文本动画插件Textillate.js

    http://www.yyyweb.com/demo/textillate/ Textillate.js AsimplepluginforCSS3textanimations.

  4. php连接redis数据库 操作redis任务队列

    首先你的安装phpredis扩展在你的服务器上 $redis = new Redis(); $redis->connect('119.29.10.xx',6379); $redis->au ...

  5. ZOJ 2974 矩阵快速幂

    题意 给出n个杯子与初始其中有多少水 “同时”进行如下指令 将其中的水同时分入所指定的杯子 进行x次后 输出杯子剩余水量 队友想出应该是一道快速幂 但并不是过去的用初始杯子的水组成的矩阵乘某个矩阵 可 ...

  6. python实践3:cursor() — 数据库连接操作

    python 操作数据库,要安装一个Python和数据库交互的包MySQL-python-1.2.2.win32-py2.5.exe,然后我们就可以使用MySQLdb这个包进行数据库操作了. 操作步骤 ...

  7. memcached学习笔记4--memcache扩展操作memcached

    1. 安装并配置memcache扩展库 找到php.ini文件 添加: extendsion= php_memcache.dll 并把对应的dll文件拷贝到ext目录 2. 使用PHP对Memcahc ...

  8. Computer architecture Computer organization

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCEComputer architectureNINTH EDITION C ...

  9. Anti-pattern

    https://en.wikipedia.org/wiki/Anti-pattern https://zh.wikipedia.org/wiki/反面模式 An anti-pattern is a c ...

  10. VS C++ 从一个窗口创建另一个窗口

    一.在stdafx.h文件中,添加: #include "Form2.h" / stdafx.h : 标准系统包含文件的包含文件, // 或是经常使用但不常更改的 // 特定于项目 ...