1 solutions
-
0
Guest MOD
-
0
#include<bits/stdc++.h> using namespace std; int n, a[20001], b[20001]; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; b[i] = a[i]; } for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { if (a[i] == b[j] && i != j) { a[i] = 1; } } } for (int i = 1; i <= n; i++) { if (a[i] != 1) { cout << a[i] << " "; } } return 0; }
- 1
Information
- ID
- 721
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 6
- Tags
- (None)
- # Submissions
- 72
- Accepted
- 22
- Uploaded By