| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1333220 | herissonwoww | Stone Arranging 2 (JOI23_ho_t1) | C++20 | 2094 ms | 1092 KiB |
#include <iostream>
using namespace std;
int main()
{
int n; cin >> n;
int stones[n];
for(int i = 0; i < n; i++){
int color; cin >> color;
stones[i] = color;
int lastc = -1;
for(int j = 0; j < i; j++){
if(stones[j] == color)
lastc = j;
}
if(lastc==-1)
continue;
for(int j = lastc; j < i; j++){
stones[j] = color;
}
}
for(int i : stones)
cout << i << '\n';
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
