#include <stdio.h>
int main(int argc, char const *argv[])
{
int vec[] = {23, 2, 1, 13, 23, 13, 5, 2, 1}, n;
n = sizeof(vec)/sizeof(vec[0]);
for(int i = 0; i < n - 1; i++) {
if( vec[i] ) {
for(int j = i + 1; j < n; ++j) {
if(vec[i] == vec[j]) {
vec[j] = 0;
}
}
}
}
if(vec
[n
-1]) printf("%d", vec
[n
-1]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciBjb25zdCAqYXJndltdKQp7CglpbnQgdmVjW10gPSB7MjMsIDIsIDEsIDEzLCAyMywgMTMsIDUsIDIsIDF9LCBuOwoKCW4gPSBzaXplb2YodmVjKS9zaXplb2YodmVjWzBdKTsKCiAgICBmb3IoaW50IGkgPSAwOyBpIDwgbiAtIDE7IGkrKykgewoKICAgIAkgICBpZiggdmVjW2ldICkgewoKICAgIAkgICAJICBwcmludGYoIiVkICIsIHZlY1tpXSk7CgogICAgCSAgIAkgIGZvcihpbnQgaiA9IGkgKyAxOyBqIDwgbjsgKytqKSB7CgogICAgCSAgIAkgIAlpZih2ZWNbaV0gPT0gdmVjW2pdKSB7CgogICAgCSAgIAkgIAkJdmVjW2pdID0gMDsKICAgIAkgICAJICAJfQogICAgCSAgIAkgIH0KICAgIAkgICB9CiAgICB9IAoKICAgIGlmKHZlY1tuLTFdKSBwcmludGYoIiVkIiwgdmVjW24tMV0pOwoKCXJldHVybiAwOwp9