제출 #905229

#제출 시각아이디문제언어결과실행 시간메모리
905229PetrixStone Arranging 2 (JOI23_ho_t1)C++17
100 / 100
226 ms15424 KiB
#include <iostream> #include <map> #include <vector> using namespace std; int v[200000]; map<int,int> frv; vector<int> rasp; int main() { int n,i,poz,npoz; cin>>n; for(i=0;i<n;i++){ cin>>v[i]; frv[v[i]]=i; } poz=0; while(poz!=n){ npoz=frv[v[poz]]+1; for(i=poz;i<npoz;i++) rasp.push_back(v[poz]); poz=npoz; } for(i=0;i<n;i++){ cout<<rasp[i]<<"\n"; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...