| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 86665 | 李雨昊 | 整数去重 | C++ | Wrong Answer | 0 MS | 280 KB | 269 | 2024-07-27 09:54:10 |
#include<iostream> using namespace std; int main() { int n,a[1001]; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n;i++) { for(int u=0;u<n;u++) { if(a[i]==a[u]&&i!=u) a[i]=0; } } for(int i=0;i<n;i++) if(a[i]!=0) cout<<a[i]<<" "; }
------Input------
5 10 12 93 12 75
------Answer-----
10 12 93 75
------Your output-----
10 93 12 75