Submission #388730

#TimeUsernameProblemLanguageResultExecution timeMemory
388730IwanttobreakfreeMountains (IOI17_mountains)C++17
0 / 100
1 ms284 KiB
#include "mountains.h" #include <vector> using namespace std; int maximum_deevs(vector<int> y) { int n=y.size(); int cont=0; if(n==1||n==2)return 1; for(int i=0;i<n;i++){ if(i==0){ if(y[i+1]>y[i])cont++; } else if(i==n-1){ if(y[i-1]>y[i])cont++; } else{ if(y[i-1]>y[i]&&y[i]<y[i+1])cont++; } } if(cont==0)return 1; else return cont; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...