제출 #841319

#제출 시각아이디문제언어결과실행 시간메모리
841319yellowtoadStone Arranging 2 (JOI23_ho_t1)C++17
100 / 100
416 ms14364 KiB
#include <iostream> #include <map> using namespace std; map<int,int> lst; int n, a[200010]; int main() { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; lst[a[i]] = i; } for (int i = 1; i <= n; i++) { for (int j = i; j <= lst[a[i]]; j++) cout << a[i] << endl; i = lst[a[i]]; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...