Submission #774703

#TimeUsernameProblemLanguageResultExecution timeMemory
774703vjudge1Stone Arranging 2 (JOI23_ho_t1)C++17
0 / 100
0 ms212 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 = i;j <= lastpos - i + 1;j++){ cout << cac[i] << '\n'; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...