AC的,信我就来

lkyLKY(祝忘羡99版)  •  5天前


include

using namespace std; int a[1000005];

int main () {

int n;
cin >> n;
for (int i = 1; i <= n; i++) {
	cin >> a[i];
}
for (int i = 1; i <= n; i++) {
	for (int j = i + 1; j <= n; j++) {
		if (a[i] == a[j]) {
			a[i] = a[j] = -1;
		}
	}
}
for (int i = 1; i <= n; i++) {
	if (a[i] != -1)
		cout << a[i] ;
}
return 0;

}


评论:

请先登录,才能进行评论