제출 #914253

#제출 시각아이디문제언어결과실행 시간메모리
914253teacupStone Arranging 2 (JOI23_ho_t1)C++14
100 / 100
177 ms15308 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n), ans(n); for (int i=0; i<n; i++) cin >> a[i]; map<int, int> lst_idx; for (int i=0; i<n; i++) lst_idx[a[i]] = i; int confirmed_nuke = -1; for (int i=0; i<n; i++){ if (i == confirmed_nuke + 1) confirmed_nuke = lst_idx[a[i]]; cout << a[confirmed_nuke] << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...