Submission #841318

#TimeUsernameProblemLanguageResultExecution timeMemory
841318yellowtoadStone Arranging 2 (JOI23_ho_t1)C++17
35 / 100
263 ms1868 KiB
#include <iostream> using namespace std; int n, a[200010], lst[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...