方法1: #include<stdio.h> int main(){ int a[1001]={0}; int i,t,n; while (~scanf("%d",&n)){ for (i=1;i<=n;i++){ scanf("%d",&t); if (a[t]==0){ a[t]=1; } } for (i=1;i<=1000;i++){...