# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1122639 | kasdo | Stone Arranging 2 (JOI23_ho_t1) | C++20 | 541 ms | 16488 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int n;
cin>>n;
int a[n + 5];
map<int, int> mp;
for(int i=0; i<n; i++)
{
cin>>a[i];
mp[a[i]] = i;
}
for(int i=0; i<n; i++)
{
int j = mp[a[i]];
for(int z=0; z<j-i+1; z++) cout<<a[i]<<endl;
i = j;
}
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... |