Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
229917 232214陈皓轩 出操 C++ 运行超时 80 1000 MS 94016 KB 347 2024-01-07 13:53:23

Tests(4/5):


#include <iostream> #include <map> using namespace std; map<int, int> a, b; int main() { int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) { a[i] = i; b[i] = i; } int idx(0); while (m--) { int t; cin >> t; a[--idx] = t; a.erase(b[t]); b[t] = idx; } for (auto &v: a) { cout << v.second << ' '; } }


测评信息: