Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
230088 | 2224梁翁思译 | 出操 | C++ | 通过 | 100 | 168 MS | 8100 KB | 525 | 2024-01-07 15:43:13 |
#include<bits/stdc++.h> using namespace std; int n,m; int ma[1000005] = {0}; int a[1000005] = {0}; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> m; int tmp; for(int i = 1;i <= n;i++) { ma[i] = 1; } for(int i = 0;i < m;i++) { cin >> a[i]; } for(int i = m - 1;i >= 0;i--) { if(ma[a[i]]) cout << a[i] << ' '; ma[a[i]] = 0; } for(int i = 1;i <= n;i++) { if(ma[i]) cout << i << ' '; ma[i] = 0; } return 114514; return 1919810; }