Submission #759095

#TimeUsernameProblemLanguageResultExecution timeMemory
759095Dan4LifeStone Arranging 2 (JOI23_ho_t1)C++17
0 / 100
0 ms212 KiB
#include <bits/stdc++.h> using namespace std; int n,i; map<int,int> p,a; main() { cin>>n;while(i<n)cin>>a[i],p[a[i]]=i,i++;i=0; while(i<n)while(i<n&&p[a[i]]>=i) cout<<a[i++]<<"\n"; }

Compilation message (stderr)

Main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main() {
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...