Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133444 王丞杰 处理随机数 C++ Wrong Answer 1 MS 272 KB 277 2025-10-18 17:23:40

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int a[1000]; int main() { int n,p,s; cin>>n; for(int i=1;i<=n;i++){ cin>>p; if(a[p]==0){ a[p]++; s++; } } cout<<s<<endl; for(int i=0;i<=1000;i++){ if(a[i] != 0){ cout<<i<<" "; } } }


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-----
8032288 10 23 29 39 48 57 58 67