hdu 5138(水题)

题目链接:

http://acm.hdu.edu.cn/showproblem.php?pid=5138

反着来.

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include <queue>
using namespace std; int main()
{
int a[] = {,,,,};
int n;
while(scanf("%d",&n)!=EOF){
int ans[];
int id = ;
while(id<){
if(n-a[id]<=) break;
ans[id++] = n-a[id];
}
for(int i=id-;i>=;i--){
printf("%d ",ans[i]);
}
printf("%d\n",ans[]);
}
return ;
}
上一篇:Linux shell misc


下一篇:Deepin15.8系统下安装QorIQ Linux SDK v2.0 yocto成功完美运行的随笔