# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
382934 | 2021-03-28T14:39:47 Z | Iwanttobreakfree | Baloni (COCI15_baloni) | C++17 | 2000 ms | 1092 KB |
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n,h,num; cin>>n; vector<int> v; cin>>h; v.push_back(h); for(int i=1;i<n;i++){ cin>>num; bool pos=false; if(num<h){ for(int j=0;j<v.size();j++){ if(v[j]==num+1){ v[j]=num; pos=true; } } } if(!pos){ v.push_back(num); if(num>h)h=num; } } cout<<v.size(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 364 KB | Output isn't correct |
2 | Incorrect | 5 ms | 364 KB | Output isn't correct |
3 | Incorrect | 10 ms | 396 KB | Output isn't correct |
4 | Incorrect | 21 ms | 364 KB | Output isn't correct |
5 | Execution timed out | 2073 ms | 596 KB | Time limit exceeded |
6 | Execution timed out | 2060 ms | 716 KB | Time limit exceeded |
7 | Execution timed out | 2071 ms | 724 KB | Time limit exceeded |
8 | Execution timed out | 2064 ms | 752 KB | Time limit exceeded |
9 | Execution timed out | 2070 ms | 816 KB | Time limit exceeded |
10 | Execution timed out | 2081 ms | 1092 KB | Time limit exceeded |