# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
768031 | Trisanu_Das | Stone Arranging 2 (JOI23_ho_t1) | C++17 | 1 ms | 300 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int a[n]; map<int, int> p; for(int i = 0; i < n; i++) cin >> a[i], p[a[i++]];
int i = 0, x;
while(i < n, x = a[i]){
while(i < n && p[x] >= i)cout << x << '\n', i++;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |