| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1356725 | Zone_zonee | Global Warming (NOI13_gw) | C++20 | 59 ms | 8296 KiB |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6+10;
int a[N];
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> v;
for(int i = 1; i <= n; ++i){
cin >> a[i];
if(a[i] != a[i-1]) v.push_back(a[i]);
}
int cnt = 0;
n = v.size();
for(int i = 1; i < n-1; ++i){
if(a[i] > a[i-1] && a[i] > a[i+1]) cnt++;
}
if(a[0] > a[1]) cnt++;
if(a[n-1] > a[n-2]) cnt++;
cout << cnt << '\n';
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
