Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
230108 232218施彦恺 出操 C++ 通过 100 336 MS 6116 KB 359 2024-01-07 16:08:25

Tests(5/5):


#include<bits/stdc++.h> using namespace std; int b[1000002]; bool f[1000002]; int main(){ int n,m; cin>>n>>m; for(int i=1;i<=m;i++){ cin>>b[i]; } for(int i=m;i>=1;i--){ if(f[b[i]]==false){ cout<<b[i]<<" "; f[b[i]]=true; } } for(int i=1;i<=n;i++){ if(f[i]==false){ cout<<i<<" "; } } return 0; }


测评信息: