POJ 2591

 #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;
}
上一篇:MVC视图中读取ViewBag传递过来的HashTable表数据


下一篇:Google十大惊人产品