#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;
}
相关文章
- 10-11POJ-1679 The Unique MST,次小生成树模板题
- 10-11POJ 3126 Prime Path 素数筛,bfs
- 10-11dp跳板,若为7ffffff则相加时会越界,然后WA!!需要复习poj-1661:帮助 Jimmy
- 10-11POJ 1436 (线段树 区间染色) Horizontally Visible Segments
- 10-11ZOJ 2158 POJ 1789 Truck History
- 10-11poj 2681(水题)
- 10-11Tram POJ - 1847 spfa
- 10-11Segments - POJ 3304 (判断直线与线段是否相交)
- 10-11Firing POJ - 2987 最大权闭合子图
- 10-11POJ 2449 Remmarguts' Date