제출 #739042

#제출 시각아이디문제언어결과실행 시간메모리
739042ToxtaqStone Arranging 2 (JOI23_ho_t1)C++17
25 / 100
2058 ms1756 KiB
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int>v(n); for(int i = 0;i < n;++i){ cin >> v[i]; int pos = -1; for(int j = i - 1;j >= 0;--j){ if(v[i] == v[j]){ pos = j; break; } } if(pos == -1)continue; for(int j = pos;j < i;++j){ v[j] = v[i]; } } for(int i : v)cout << i << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...