Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
81198 赵文浚 处理随机数 C++ Wrong Answer 0 MS 264 KB 310 2024-07-12 10:56:08

Tests(0/10):


Code:

#include<iostream> using namespace std; int a[1001]; int main() { int n,k,sum=0; for (int i=1;i<=n;i++) { cin>>k; if(a[k]==0) { a[k]=1; sum++; } } cout<<sum<<endl; for(int j=1;j<=1000;j++) { if(a[j] !=0) { cout<<j<<" "; } } return 0; }


Run Info:

------Input------
9 10 29 39 67 58 48 29 57 23
------Answer-----
8 10 23 29 39 48 57 58 67
------Your output-----
0