0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2025-01-12 11:31:58 +00:00

P4305 [JLOI2011]不重复数字

R44293313
This commit is contained in:
Baoshuo Ren 2020-12-27 11:07:47 +08:00 committed by Baoshuo Ren
parent 75ab6b2190
commit 9c20446432
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -2,29 +2,15 @@
using namespace std;
inline void read(int& ret) {
ret = 0;
int f = 1;
char ch = getchar();
while (!isdigit(ch)) {
if (ch == '-') f = -f;
ch = getchar();
}
while (isdigit(ch)) {
ret = ret * 10 + ch - '0', ch = getchar();
}
ret *= f;
}
int main() {
int t;
read(t);
scanf("%d", &t);
while (t--) {
int n, x;
unordered_map<int, bool> m;
read(n);
scanf("%d", &n);
for (int i = 0; i < n; i++) {
read(x);
scanf("%d", &x);
if (!m[x]) {
m[x] = true;
printf("%d ", x);