제출 #1122639

#제출 시각아이디문제언어결과실행 시간메모리
1122639kasdoStone Arranging 2 (JOI23_ho_t1)C++20
100 / 100
541 ms16488 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n; cin>>n; int a[n + 5]; map<int, int> mp; for(int i=0; i<n; i++) { cin>>a[i]; mp[a[i]] = i; } for(int i=0; i<n; i++) { int j = mp[a[i]]; for(int z=0; z<j-i+1; z++) cout<<a[i]<<endl; i = j; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...