# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
741805 | jamezzz | Stone Arranging 2 (JOI23_ho_t1) | C++17 | 294 ms | 14232 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;
#define sf scanf
#define pf printf
#define maxn 200005
int n,a[maxn];
map<int,int> la;
int main(){
sf("%d",&n);
for(int i=1;i<=n;++i){
sf("%d",&a[i]);
la[a[i]]=i;
}
int cur=1;
while(cur<=n){
for(int i=cur;i<=la[a[cur]];++i){
pf("%d\n",a[cur]);
}
cur=la[a[cur]]+1;
}
}
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... |