Submission #951482

#TimeUsernameProblemLanguageResultExecution timeMemory
951482Trisanu_DasEditor (BOI15_edi)C++17
15 / 100
415 ms3616 KiB
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; stack<int> st; st.push(0); for(int i = 0; i < n; i++){ int a; cin >> a; if(a < 0) st.pop(); else st.push(a); cout << st.top() << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...