| 记录编号 | 94377 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1406.[UVa 11462] 年龄排序 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 2.595 s | ||
| 提交时间 | 2014-03-31 19:26:47 | 内存使用 | 0.28 MiB | ||
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("AgeSort.in");
ofstream fout ("AgeSort.out");
int age[121]={0};
int main()
{
int old,i=0;
while (fin>>old)
{
age[old]++;
i++;
}
for (i=0;i<=120;i++)
{
while (age[i])
{
fout<<i<<" ";
age[i]--;
}
}
return 0;
}