# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
774718 | vjudge1 | Stone Arranging 2 (JOI23_ho_t1) | C++17 | 183 ms | 12496 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;
main()
{
int n; cin >> n;
int stone[n + 1]; map<int, int> stor;
for(int i = 1; i <= n; i++)
{
cin >> stone[i];
stor[stone[i]] = i;
}
for(int i = 1; i <= n; i++)
{
int color = stone[i], ed = stor[stone[i]];
while(i < ed)
{
stone[i] = color;
i++;
}
}
for(int i = 1; i <= n; i++)
{
cout << stone[i] << "\n";
}
}
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... |