#include<iostream>
#include<stdio.h>
#define MAXN 10000001
using namespace std; int a[MAXN];
void give_set();
int min(int i,int j);
int main()
{
//freopen("acm.acm","r",stdin);
give_set();
int num;
while(cin>>num)
{
cout<<a[num-]<<endl;
}
} void give_set()
{
a[] = ;
int m;
int len = ;
int x;
int y;
x = ;
y = ;
while(len < MAXN)
{
m = min(*a[x]+,*a[y]+);
if(m == *a[x]+)
++ x;
if(m == *a[y]+)
++ y;
a[len++] = m;
}
}
int min(int a,int b)
{
return a < b ? a : b;
}

POJ 2591的更多相关文章

  1. POJ 2591 1338 2545 2247(数列递归衍生问题,思路挺妙)

    四道题的难度: 2591<1338<2545<2247 POJ 2591 Set Definition: 这是从discuss里看来的,写的挺好,直接copy,根据我的代码稍有改动( ...

  2. poj 2591 Set Definition

    题目 这道题是个水题,写博客上的人好像都不屑于写这这道题.但是我为什么还是觉得挺难的呢? 我也是看了别人的博客才过了的,感觉这种写法很新颖,这样就可以不用在排序了. 下面给出正解: #include& ...

  3. POJ 2545+2591+2247+1338简单水题

    [题意简述]:就是有这种一个序列.就拿当p1 = 2,p2 = 3, p3 = 5,来举例.由这三个数为基准组成的序列是: 2,3,4,5,6,8,9,10,12--如今给你这个序列数组的下标,让你求 ...

  4. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  5. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  6. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  7. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  8. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  9. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

随机推荐

  1. SQL MAP 注入测试

    SQL MAP是一款测试系统是否有SQL漏洞的工具 下载地址: http://sqlmap.org/ sqlmap 是一款使用python编写的工具,所以需要安装python,需要安装python 为 ...

  2. 微信小程序设置全局字体

    微信小程序设置全局css,需要在app.wxss文件中设置page的样式 page { font-family:"PingFangSC-Thin"; font-size:32rpx ...

  3. Educational Codeforces Round 53 (Rated for Div. 2) E. Segment Sum

    https://codeforces.com/contest/1073/problem/E 题意 求出l到r之间的符合要求的数之和,结果取模998244353 要求:组成数的数位所用的数字种类不超过k ...

  4. 证明解析函数u=c1 与 v=c2 正交

    方程u(x,y)=c1对应平面上的曲线, 求导dy/dx=  -ux/uy   类似有v曲线的dy/dx=-vx/vy   两者相乘,使用柯西-黎曼方程结果是-1 表示在相交点两者的切线互相垂直. 另 ...

  5. vue的过渡和动画

    简单过渡 .fade-enter-active, .fade-leave-active { transition: all .5s; } /*.fade-enter, .fade-leave-to { ...

  6. 微信小程序 js结构

    // pages/index/index.js Page({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数--监听页面加载 */ onLoad: function ...

  7. Silverlight中关于ComboBox的各种使用

    前端放置了几个ComboBox的控件. <Grid x:Name="LayoutRoot" Background="White"> <Comb ...

  8. C++编译器详解(二)常见precompiling 指令介绍

    VC++编译器中一些常见precompiling 指令介绍 我们在利用vc6.0 project wizard生成的代码中,经常看到大量的precompiling指令.本文讲解了常见的这些指令的作用 ...

  9. 转一篇用分布式解决ERP问题

    https://www.cnblogs.com/liuche/p/7955462.html

  10. Maven中的配置文件

    <span style="padding:0px; margin:0px"><project xmlns="http://maven.apache.or ...