60分求助!!!四个TLE

P4305 [JLOI2011] 不重复数字

```cpp #include<bits/stdc++.h> using namespace std; map<int,int>vis; int a,n; void work() { cin.tie(0); cout.tie(0); cin>>n; vis.clear(); for(int i=1;i<=n;i++) { cin>>a; if(vis[a]==0) { cout<<a<<" "; vis[a]=1; } } cout<<"\n"; return ; } int main() { cin.tie(0); cout.tie(0); int T; cin>>T; while(T--) work(); return 0; } ``` 加一下速
by AcxxMz @ 2023-07-26 17:23:28


@[dongrq_cs](/user/644394)
by AcxxMz @ 2023-07-26 17:23:43


对于 100\%100% 的数据,1 \le T\le 501≤T≤50,1 \le n \le 5 \times 10^41≤n≤5×10 4 ,给出的数在 3232 位有符号整数范围内。
by gongqiheng @ 2023-08-13 10:06:48


会超时
by gongqiheng @ 2023-08-13 10:07:15


|