제출 #1014715

#제출 시각아이디문제언어결과실행 시간메모리
1014715snpmrnhlolStone Arranging 2 (JOI23_ho_t1)C++17
100 / 100
175 ms14472 KiB
#include<bits/stdc++.h> using namespace std; const int N = 2e5; int v[N]; map<int,int>f; int main(){ int n; cin>>n; for(int i = 0;i < n;i++){ cin>>v[i]; f[v[i]] = i; } int i = 0; while(i < n){ int j = f[v[i]]; while(i <= j){ cout<<v[j]<<'\n'; i++; } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...