제출 #774711

#제출 시각아이디문제언어결과실행 시간메모리
774711vjudge1Stone Arranging 2 (JOI23_ho_t1)C++17
100 / 100
198 ms12460 KiB
#include<bits/stdc++.h> #define loli long long using namespace std; const int lmod = 1e9+7; int cac[200001]; map<int,int> db; int main() { // freopen("input.inp", "r", stdin); // freopen("output.out", "w", stdout); int n; cin >> n; for(int i = 1;i <= n;i++) { cin >> cac[i]; db[cac[i]] = i; } int lastpos; for(int i = 1;i <= n;i++) { lastpos = db[cac[i]]; for(int j = 1;j <= lastpos - i + 1;j++){ cout << cac[i] << '\n'; } i = lastpos; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...