| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160643 | 王翊金恩 | 19从小到大进行排序 | C++ | Compile Error | 0 MS | 0 KB | 480 | 2026-09-25 20:32:37 |
#include<bits/stdc++.h> using namespace std; //桶排序-使用较小的数字范围 int a[100005]; int main() { int n,p; cin>>n; for(int i=1;i<=n;i++)// 依次投票 { cin>>p; tpx[p]++;//投给谁,就在谁的投票箱上+1 } //计数过程-箱子 for(int j=0;j<=100000;j++)//依次比较每个投票箱的个数 { for(int k=1;k<=tpx[j];k++)//投票箱有多少个,就输出几 { cout<<j<<" "; } } return 0; }
Main.cc: In function 'int main()':
Main.cc:12:3: error: 'tpx' was not declared in this scope
tpx[p]++;//投给谁,就在谁的投票箱上+1
^
Main.cc:17:21: error: 'tpx' was not declared in this scope
for(int k=1;k<=tpx[j];k++)//投票箱有多少个,就输出几
^