Submission #738797

#TimeUsernameProblemLanguageResultExecution timeMemory
738797tooxpertStone Arranging 2 (JOI23_ho_t1)C++17
35 / 100
41 ms4008 KiB
//runner code : //cd "c:\Users\410-15\Desktop\" ; if ($?) { g++ cow.cpp -o cow } ; if ($?) { .\cow } //designed by tooxpert #include <bits/stdc++.h> #define ll unsigned long long #define in insert #define needforspeed ios_base::sync_with_stdio(false); cin.tie(); cout.tie() #define pb push_back #define mp make_pair #define sil erase #define em emplace #define INF 1e9 #define LF 1e10-10 #define MOD 1e9+7 #define MIN -1e9 #define F first #define S second #define sort(v) sort(v.begin(), v.end()); using namespace std; int main(){ needforspeed; ll n, m, t, i, j; cin>>n; vector<ll>v(n), vr(n); for(i=0; i<n; i++){ cin>>v[i]; vr[v[i]]=i; } for(i=0; i<n; i++){ for(j=i; j<=vr[v[i]]; j++) cout<<v[i]<<'\n'; i=vr[v[i]]; } }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:22:11: warning: unused variable 'm' [-Wunused-variable]
   22 |     ll n, m, t, i, j;
      |           ^
Main.cpp:22:14: warning: unused variable 't' [-Wunused-variable]
   22 |     ll n, m, t, i, j;
      |              ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...